Mediation
Borrowing-cost pressure affects repayment stress via a payment-burden pathway in the simulated chain. Adjusting for the mediator removes the modelled indirect association.
ENGINEERING & FINANCE / LIVE EXPERIMENT
When two credit-risk signals move together, does one cause the other? Or are we overlooking a shared driver, an indirect pathway, or selection bias?
Imagine analysing lending data. A correlation may look compelling, but changing what you control for can tell a very different story. Explore three hypothetical causal structures and see why choosing the right variables matters.
01 / DESIGN THE SCENARIO
Each scenario has a known, simplified causal structure. The arrows are assumptions of this simulation, not discoveries about real borrowers.
Higher borrowing costs increase repayment burden, which in turn increases repayment stress.
Identical settings and seed generate identical sample values. All indices are unitless simulated scores, not actual interest rates, credit scores, probabilities or customer outcomes.
02 / READ THE EVIDENCE
Does rate pressure affect repayment stress through higher payment burden?
The diagram is the assumed data-generating model. The correlations below are calculated from the randomly generated observations.
Correlation (r) ranges from −1 to +1. Adjusting here means removing the linear association of both X and Y with M. It is not the same as changing M in the real world.
Run the experiment to see how the assumed structure changes the interpretation.
Unadjusted: Approximate p-value. Adjusted: Approximate p-value.
Approximate two-sided Fisher-z p-values under Gaussian assumptions. Sample association and significance do not prove a causal direction.
03 / AN ASSUMED CREDIT-RISK STRESS TEST
This is different from statistical adjustment. Using the causal arrows and equations we specified, intervene on one input and calculate how the other modelled signals would change, holding random shocks fixed.
Raise borrowing-cost pressure by one synthetic score unit.
An index-point change in the toy model, not a 1% interest-rate change or a forecast of real-world defaults.
The stipulated X → M → Y pathway transmits the input change through both links.
04 / UNDER THE HOOD
A small structural equation model generates independent random shocks and a known causal graph. The page computes correlations, adjustments and hypothetical changes in real time. Everything is transparent and reproducible.
Borrowing-cost pressure affects repayment stress via a payment-burden pathway in the simulated chain. Adjusting for the mediator removes the modelled indirect association.
Income volatility generates both credit use and repayment stress in the simulated fork. Their correlation does not mean credit use causes stress.
Credit use and historical arrears are independent in the toy model, but both influence a review-priority score. Conditioning on that score can induce an association.
Seeded synthetic observations, Pearson and partial correlations, and residual scatter plots. The underlying equations and limitations are documented.
MODEL LIMITATIONS
The finance stories are illustrative hypotheses, not empirical findings about actual borrowers. They assume linear effects, independent Gaussian shocks and correctly specified arrows. No customer or employer data is used. This is neither an underwriting model nor proof of causal discovery.