Distributions, regression & inference — how we reason under uncertainty and find patterns in data, from sampling and Bayes to clustering and overfitting.
Draw repeatable samples from normal, binomial and uniform models and compare the growing histogram with the theoretical mean and variance.
Move one observation and watch the mean balance point, the sorted median pair and squared-deviation columns respond differently.
Average repeated samples from skewed or binary populations and watch the distribution of sample means tighten and become bell shaped.
Link X and Y through a hidden common cause, then intervene on X to see that association and true effect can disagree.
Fit a line to thirty noisy points, inspect every residual square, and compare your line with the least-squares optimum.
Sample a two-group population with fair and unequal selection rules and see how bias moves the sample mean away from the truth.
Shade two-sided p-value tails on a normal null model, pick a significance level, and simulate repeated true-null tests.
Follow a screening probability tree from prevalence, sensitivity and specificity to the chance a positive result is a real defect.
Run real k-means iterations on a point cloud and watch memberships flip and centroids converge as k and separation change.
Fit polynomials of rising degree to noisy data and compare training and held-out error with and without ridge regularization.