What to explore
Change parameters and watch the model adjust.
- True intercept, true slope, noise scale, and sample size
- The native diagram and full notebook use the same four controls but separate deterministic random draws
Upper-undergraduate econometrics
An immediate native simulation for simple linear regression compares observed outcomes, the true conditional mean, and the fitted OLS line; the retained notebook adds sample and residual diagnostics.
Fitted line, residuals, precision, and known truth
Adjust the true intercept, slope, noise, and sample size to relate realised estimates to fit, slope estimation error, and an approximate 95% slope interval.Interactive diagram
Each dot is one observed pair of an explanatory variable x and outcome y. The solid line is the true conditional mean used to generate the data; the dashed line is the OLS estimate from the observations currently in the sample.
Move the true intercept or slope to change the underlying relationship. Noise spreads outcomes around that relationship, so the realised fitted line does not generally equal the truth even though OLS targets the average linear relationship.
Increase the sample size to append observations from the same deterministic latent bank. Compare the slope estimation error and the approximate interval: more data usually improves precision, but a single realised estimate need not move monotonically towards the truth.
Econometrics and causal inference
What to explore
Core ideas
Learning goals
Prerequisites
Newsletter
Next models to study
Upper-undergraduate econometrics
Change confounding strength and the omitted variable's effect to compare the true coefficient, the naive regression, and the fully controlled benchmark.
Upper-undergraduate econometrics
Adjust treatment effects, group gaps, noise, and trend violations to see exactly when the DiD estimate matches the truth and when it drifts.
Intermediate econometrics
Drag the persistence parameter through one and watch a stationary, mean-reverting series become a random walk and then explosive — while the sample ACF tracks the theoretical geometric decay φᵏ.