Lesson 1.8core2 h 30 min

Statistics essentials

Estimators, error bars and the honest evaluation of models

Every number you will ever report — an accuracy, a benchmark score, a difference between two models — is an estimate from a finite sample, and it comes with uncertainty whether you report it or not. Statistics gives you the tools to size that uncertainty: the bias and variance of estimators, standard errors, confidence intervals, hypothesis tests and the bootstrap. These are what separate "my model is better" from a claim you can defend, and they return in model selection (3.5 Evaluating models: metrics, validation and the bias–variance trade-off), benchmark evaluation (8.7 Evaluating LLMs) and agent evals (10.9 Evaluating agents).

You'll be able to

  • Define bias, variance and mean squared error of an estimator and derive the n − 1 correction for the sample variance
  • State the law of large numbers and the central limit theorem and compute standard errors
  • Build and correctly interpret confidence intervals for means and proportions, including for benchmark accuracies
  • Use p-values, paired comparisons and the bootstrap to decide whether a difference between two models is real

Key ideas

  1. MSE of an estimator = bias² + variance; the sample mean is unbiased with variance σ²/n.
  2. The 1/n sample variance is biased by (n − 1)/n because the mean was fit to the same data; dividing by n − 1 (Bessel) fixes it.
  3. CLT: √n (x̄ − μ)/σ → N(0, 1) regardless of the data's distribution; standard error = s/√n; halving error bars needs 4× the data.
Show 4 more key ideas
  1. 95% CI: x̄ ± 1.96 SE, or p̂ ± 1.96 √(p̂(1 − p̂)/n) for accuracies; 80% on 500 questions is [76.5%, 83.5%].
  2. A p-value is P(data at least this extreme | H₀), not P(H₀ | data); watch out for multiple comparisons and effect size.
  3. Compare models on the same test set with paired statistics; the bootstrap (resample with replacement, take percentiles) gives intervals for any metric.
  4. Report mean ± std across seeds; differences inside the confidence interval are ties.

Suggested path through this lesson