Experiments / live

Linear regression playground

Least squares hands you a line; regression treats that line as an estimate of a true one hiding behind noise. The dashed line is the truth the data was generated from; the solid steel line is the OLS fit computed from this particular sample. Hit Resample and watch the fit wobble around the truth — never landing exactly, but never systematically off either. The shaded band is the 95% confidence band for the mean prediction: narrow where data is dense, fanning out toward the edges. Turn on the sampling cloud to see the estimator's whole variance at once. The full story — Gauss–Markov, bias–variance, and what each coefficient really means — is in the essay.

data, true line & OLS fit

ŷ = a·x + b