See the mathematics move
One interactive simulator for every day. Change a parameter, redraw the data and watch the theorem hold (or fail). Each simulator also appears at the end of its day's lesson. Everything runs in your browser.
PHASE 1Probability & Statistical Inference
Set P(A), P(B) and their overlap; watch the union, the complement and the feasible range of the joint move.
A probability tree and a 1,000-person grid: see how prevalence drives the meaning of a positive test.
Transform X into aX + b and watch the mean shift and the spread scale by |a|.
Seven distributions, their exact shape, moments, and a histogram of simulated draws.
Drag to rotate the joint density; change the correlation and see the contours and the regression line.
Two groups, their means and spreads: split total variance into within and between parts.
Draw thousands of sample means from skewed or bimodal parents and watch the normal shape appear.
Mean, median and a shrinkage estimator compete across repeated samples.
One hundred intervals from one hundred samples: count how many catch the true mean.
The null and alternative sampling distributions, the rejection region, α, β and power.
Move the parameter along a Bernoulli log-likelihood; see the peak, its curvature and the LR test.
Push a normal estimate through ln, √, 1/x or x² and compare the delta-method normal with the truth.
Prior × likelihood = posterior. Change prior strength and data and watch the posterior move.
MCAR, MAR and MNAR on an education–wage scatter: complete-case bias, IPW repair and slope attenuation.
Change who gets which treatment and watch the pooled comparison reverse the stratified one.
PHASE 2Linear Algebra & Optimization
Drag two vectors and watch the dot product, the angle and the projection; the geometry behind correlation and slopes.
Edit a 2×2 matrix and see the plane stretch, rotate, shear or collapse; the determinant is the area of the image square.
Raise the correlation between two regressors and watch the cloud of coefficient estimates stretch along a line.
Two equations as two lines: as the determinant shrinks, the solution becomes fragile and then disappears.
Move a candidate line; only the OLS line makes the residuals orthogonal to the regressors and the SSR minimal.
A symmetric matrix turns the unit circle into an ellipse whose axes are its eigenvectors.
Correlated draws built with a Cholesky factor, their covariance ellipses, and the variance of any linear combination.
Approximate eˣ, ln(1+x), sin x or the logistic function by polynomials of order 1–4 around any point.
Click anywhere on the SSR surface to see −∇S = 2X′(y − Xβ) point downhill toward the OLS estimate.
Race the two algorithms on an ill-conditioned bowl and on a curved valley; tune the step size until it breaks.
Utility maximisation on a budget line: tangency, the Lagrange multiplier and the cost of a non-optimal bundle.
Simulated data with X′X, (X′X)⁻¹, β̂, s² and standard errors computed live from the matrix formulas.
A confounded scatter beside its added-variable plot: the residual-on-residual slope equals the multiple-regression coefficient.
Fan-shaped errors make classical intervals under-cover; robust (sandwich) intervals restore 95%.
Estimate a Poisson rate from two moments, compare identity and optimal weighting, and watch the J test catch overdispersion.
PHASE 3The Potential Outcomes Framework
Twelve workers with both potential outcomes: hide the missing half, randomise, and watch estimates centre on the ATE.
Direct and spillover effects of deworming-style treatment; why within-village comparisons miss the total effect.
A heterogeneous effect τ(x) averaged over three different populations — and when they coincide.
Workers enrol when their gain beats the cost: decompose the naive gap into ATE, selection bias and heterogeneity bias.
Thousands of re-assignments: baseline imbalance and estimates under complete, Bernoulli and self-selected assignment.
The true design variance versus the Neyman estimator as effect heterogeneity grows; coverage of the 95% interval.
Enumerate every possible assignment under the sharp null and read off an exact p-value — for means or ranks.
Complete versus within-district randomisation of a schooling programme: the variance gain from blocking.
Re-randomise a training experiment and compare the spread of three estimators when slopes differ by arm.
Minimum detectable effect against the number of schools for any ICC, cluster size and baseline R².
An insurance lottery with compliers, always-takers and never-takers: only the Wald ratio recovers the CACE.
Mirrored propensity-score histograms, extreme weights, effective sample size and what trimming costs.
Stratify on the estimated score: covariate imbalance vanishes within strata and the bias with it.
Monte Carlo of two IPW estimators; shift the outcome level and only the normalised (Hájek) version stays stable.
Switch the outcome and propensity models between right and wrong: AIPW survives as long as one is right.