SStatistics, Built

A sixty-five-part course in statistics, from a first course to a PhD

Statistics, Built

In 1662 John Graunt read half a century of London's Bills of Mortality and worked out things about the living city that nobody had counted. Statistics is his question made precise: what can we know about what we cannot see, from what we can, and how often will we be wrong? The course runs through five stages of a real degree, builds its own statistics library, and tests every promise a method makes on a simulated world whose truth is known.

65 parts62 hours of lectures888 chapters65 runnable labs65 interactives65 problem sets with solutions

Contents

Each part opens as lecture notes: the text of every chapter, its key results, an interactive and a lab, problems with solutions, and sources.

Stage IBachelor's: Foundations

Stage IIBachelor's: Methods

Stage IIIMaster's

21Optimization for StatisticsHow are estimators actually computed, and what does the shape of the problem say about them?Master's13 chapters · 55 min22Likelihood in DepthWhy does maximum likelihood work, and what happens when the model is wrong?Master's15 chapters · 54 min23The Linear Model in DepthWhat does the linear model really estimate, and how far can its standard errors be trusted?Master's13 chapters · 56 min24Generalized Linear ModelsHow does one theory fit binary, count, positive and ordinal outcomes?Master's14 chapters · 55 min25Borrowing StrengthHow do you estimate many related things at once?Master's15 chapters · 54 min26Bayesian Data AnalysisHow do you build, fit and check a Bayesian model with many parameters, honestly?Master's15 chapters · 53 min27Bayesian ComputationHow do you compute an integral you cannot do, in a hundred dimensions?Master's15 chapters · 53 min28Which Model?How do you choose a model without fooling yourself?Master's13 chapters · 55 min29SmoothingHow do you estimate a whole curve, and how much data does it take?Master's14 chapters · 53 min30Robust StatisticsWhat survives when a few observations are wrong, or the tails are heavier than the model admits?Master's12 chapters · 54 min31Multivariate AnalysisWhat structure hides in many correlated variables measured at once?Master's12 chapters · 54 min32SparsityHow can you solve for a thousand unknowns from a hundred equations?Master's13 chapters · 59 min33Thousands of QuestionsAsk enough questions and chance will answer some: which answers are real?Master's14 chapters · 55 min34Prediction with GuaranteesCan any prediction, from any model, come with an honest guarantee?Master's13 chapters · 84 min35What If? Experiments and Potential OutcomesWhat does it mean for one thing to cause another, and why does randomization let us find out?Master's16 chapters · 57 min36Causes Without ExperimentsWhen you cannot randomize, what can still be learned, and at what cost in assumptions?Master's17 chapters · 58 min37Natural ExperimentsWhen the world runs an experiment by accident, how do you read it?Master's16 chapters · 63 min38Time Series in DepthWhat changes when memory is long, the variance moves, or the state is hidden?Master's14 chapters · 53 min39SpaceHow do you predict where nobody measured?Master's16 chapters · 55 min40Time to EventHow do you average lifetimes you have not finished watching?Master's17 chapters · 53 min41What You Didn't SeeData are missing or mismeasured: when does it matter, and what can be done?Master's11 chapters · 56 min42The Comprehensive ExamA client writes with two questions and a deadline: can you do the master's?Master's12 chapters · 61 min

Stage IVPhD Core

43Measure-Theoretic ProbabilityWhat exactly is a random variable, and what do the limit theorems really say?PhD15 chapters · 64 min44Martingales, Markov Chains and Brownian MotionWhat can be proved about randomness that unfolds in time?PhD15 chapters · 57 min45The Theory of EstimationWhat does 'best' mean for an estimator, and why is the obvious estimator inadmissible in three dimensions?PhD15 chapters · 70 min46The Theory of Testing and ConfidenceWhen is a test optimal, and what can an interval honestly promise?PhD14 chapters · 57 min47Asymptotic StatisticsWhat is the best possible estimator in large samples, and why is 'best' so hard to define?PhD15 chapters · 58 min48Empirical ProcessesWhen does an average converge uniformly over a whole class of functions, and at what rate?PhD14 chapters · 54 min49Semiparametric EfficiencyHow well can you estimate one number when the rest of the model is infinite dimensional?PhD13 chapters · 54 min50Minimax Theory: the Limits of EstimationHow well can anyone estimate a function, with any method at all?PhD12 chapters · 55 min51High-Dimensional ProbabilityWhat does randomness look like in a thousand dimensions?PhD12 chapters · 51 min52High-Dimensional StatisticsWhat can be estimated, and how fast, when parameters outnumber observations?PhD13 chapters · 53 min53Bayesian Asymptotics and Nonparametric BayesWhen does the posterior find the truth, and are its credible sets honest?PhD13 chapters · 54 min54Statistical Learning TheoryWhy does fitting data generalize at all, and why do interpolating models seem to break the theory?PhD12 chapters · 49 min55The Qualifying ExamCan you prove the core of a statistics PhD, twelve problems in six hours?PhD8 chapters · 53 min

Stage VPhD Research

How to use the course

1 · Read or watch

Each part is a lecture built in code: derivations in full, every number computed or cited. Its page carries the lecture as text, chapter by chapter, so you can follow along with the film or read it on its own.

2 · Revise

Each part's page ends with its key results, the glossary, where each idea comes back, and what the film computes and builds.

3 · Run the lab

One lab per part, on statkit and the World. Seeded, a few seconds each, nothing to download. Each checks its own result and ends with three things to change.

4 · Work the problems

Problem sets with worked solutions, in English and (where the part has them) Chinese. Try them before opening the solutions.

5 · Check the sources

Every page lists the papers, books and data the film was checked against.

Four tracks through the same material

Every chapter has a home level. A track is the set of chapters to watch at that level; on each part's page a button shows them.

The story and the devices

The story

Graunt's question. In 1662 John Graunt, a London haberdasher, read half a century of weekly Bills of Mortality. From them he worked out things about the living city that nobody had counted: how many people lived there, how many boys were born for every girl, how long a Londoner could expect to live. Statistics is his question made precise: what can we know about what we cannot see, from what we can, and how often will we be wrong?

The series tells three stories at once:

  1. A student's journey. The first stage asks what a histogram is. The last stage writes a dissertation. Every stage ends at a milestone of a real degree: the capstone analysis (BSc), the comprehensive exam (MSc), the qualifying exam (PhD candidacy) and the dissertation (PhD).
  2. The history of the field, moving forward as the level rises. The bachelor's stages cover the classical era, from Graunt to Fisher and Neyman. The master's covers the methods of 1950–2000: the bootstrap, GLMs, MCMC, the lasso and causal inference. The PhD core covers the theory that justified them, from Le Cam and empirical processes to minimax theory. The research stage covers the work of the last fifteen years.
  3. One promise, tested. Every method promises something: an unbiased estimate, a 5% false-alarm rate, a 95% interval, a controlled false discovery rate. The series asks which promises are kept, under what assumptions, and what breaks them. It answers by measuring, on the Coverage Board.
The five stages
Stage Parts Level Rigour After it you can
I. Bachelor's: Foundations (years 1–2) 1–10 calculus and a first look at matrices every result derived; proofs at the level of Rice or Casella & Berger reason with probability, estimate, test and simulate
II. Bachelor's: Methods (years 3–4) 11–20 Stage I full derivations; practice on real data analyse a dataset start to finish: regression, design, categorical data, Bayes, resampling, time series, surveys, prediction
III. Master's 21–42 a BSc in statistics, or Stages I–II matrix calculus, optimization, asymptotics stated precisely use and justify the modern toolkit: likelihood, linear and generalized models, mixed models, Bayesian computation, model choice, smoothing, robustness, multivariate and sparse methods, multiple testing, conformal prediction, causal inference, time series, spatial, survival and missing data
IV. PhD core (qualifying-exam year) 43–55 an MSc, plus the real analysis of Analysis, Built Parts 1–6 measure-theoretic; exact conditions, with counterexamples showing why each is needed prove: probability, estimation and testing theory, asymptotics, empirical processes, semiparametric efficiency, minimax lower bounds, high-dimensional probability and statistics, Bayesian asymptotics, learning theory
V. PhD research 56–65 Stage IV research papers, with open problems read and extend the frontier: selective, distribution-free and anytime-valid inference, high-dimensional asymptotics, robustness and shift, optimal transport, causal frontiers, privacy and fairness, statistics for AI; then write a dissertation

Entry points. Each stage opens with a placement chapter: what the stage assumes, with links back to the parts that taught it. A viewer with a statistics degree can start at Part 21, and a PhD student at Part 43.

The devices that hold it together
  1. The World (explainer.stats.world). A seeded, simulated population of one million residents in households, towns and regions. It holds heights inherited through families, skewed incomes, schools, a disease with a screening test, a treatment taken for confounded reasons with both potential outcomes recorded for everyone, an instrument, a staggered policy, a scholarship cutoff, survival times, a spatial pollution field, daily time series with change points, survey response propensities, missingness mechanisms, data-entry errors, and 10,000 genetic markers with 20 real effects. In real life the truth is never visible. In the World it is, so every estimator, test and interval in the series can be graded against it. It is always labelled simulated on screen.
  2. The Coverage Board (explainer.stats.board). This is the series' scoreboard. Each interval or test is run thousands of times on the World. The board records its actual coverage (or false-alarm rate) against the nominal 95% (or 5%), with Monte Carlo error bands. Green means the promise is kept, red means it is broken, blue means it is conservative. There are more than a hundred rows by the end. Some are classic failures: the Wald binomial interval, peeking, heteroskedasticity, selection, weak instruments, staggered adoption, high-dimensional logistic regression, nonparametric credible bands. Others show honest methods keeping the promise: conformal prediction, confidence sequences, debiased and orthogonalized estimators.
  3. The Spiral. The central results are met three times, each time sharper. The CLT, for example: by moment generating functions in Part 6, as the delta method and the bootstrap in Parts 16 and 22, and then as Lindeberg–Feller, Stein's method and Donsker in Parts 43 and 48. Each return opens with an upgrade card: the earlier statement, what it quietly assumed, and what will now be proved.
  4. The Transcript. Each part is a "course" on an on-screen transcript. Stage milestones show what has been earned: the BSc (Part 20), the MSc (Part 42), candidacy (Part 55) and the PhD (Part 65).
  5. The Museum (explainer.stats.museum). Real historical data, transcribed from the original publication with its source on screen. Examples: Graunt (1662), Arbuthnot (1710), Snow (1855), Galton (1886), Weldon's crabs (1893), Bortkiewicz (1898), Student (1908), Bliss's beetles (1935), the Salk trial (1954), Freireich (1963), Efron–Morris (1975), the eight schools (1981), Challenger (1986).
  6. statkit, built (explainer/stats/kit/). The series writes its own small, readable statistics library, one piece per part, from the first random number generator to NUTS, double machine learning, Sinkhorn and confidence sequences. Each module is checked against SciPy and statsmodels in tests/.
  7. The timeline strip, 1650–2030, lit on every chapter card; payoff cards ("where this comes back"); cross-series links to Analysis, Built (measure, Hilbert space, Fourier) and AI, Built (information, learning theory, diffusion).
The Spiral: results met three times
Result First pass (BSc) Second pass (MSc) Third pass (PhD)
Laws of large numbers and the CLT 6 (Chebyshev, MGFs) 16, 22 (bootstrap, delta method in many dimensions) 43, 44, 48 (Kolmogorov, Lindeberg–Feller, Stein's method, martingale CLT, Donsker)
Estimation and optimality 9 (MLE, Cramér–Rao, Rao–Blackwell) 22, 25 (asymptotics, James–Stein) 45, 47, 49, 50 (complete classes, Le Cam–Hájek, semiparametric and minimax bounds)
Testing and intervals 10, 11 22, 33 46, 56, 57, 58
Regression 12, 14 23, 24, 32 52, 59
Bayes 15 26, 27 53
Resampling and ranks 16 30 47, 48
Prediction 19 34 54, 57
Causation 1, 14 (Simpson), 13 (randomization) 35–37 49, 62
Dependence in time 7, 17 38 44, 58
Missing and selected data 18 41 49, 56, 63
Course map, for orientation

The stages cover what these programmes teach; course numbers and contents vary by year.

Stage Comparable courses
I undergraduate probability (e.g. Harvard Stat 110, Berkeley Stat 134) and mathematical statistics (Harvard Stat 111, Berkeley Stat 135); linear algebra for statistics
II regression, experimental design, categorical data, Bayesian statistics, nonparametrics, time series, sampling, statistical learning, a capstone
III first-year MS and applied PhD sequences (e.g. Stanford STATS 305A–C, CMU 36-705) and electives (Bayesian, causal, survival, spatial, computing)
IV PhD probability and theory (e.g. Stanford STATS 310A–C and 300A–C, Berkeley STAT 205A–B and 210A–B, CMU 36-709/710)
V topics courses and reading groups
The bookshelf
Stage Main texts
I Blitzstein & Hwang; Ross; Feller vol. 1; Rice; Casella & Berger; Wasserman All of Statistics; Freedman, Pisani & Purves; Tukey EDA; Harville Matrix Algebra from a Statistician's Perspective
II Seber & Lee; Weisberg; Box, Hunter & Hunter; Montgomery; Agresti Categorical Data Analysis; Hoff; Efron & Tibshirani; Hollander, Wolfe & Chicken; Shumway & Stoffer; Brockwell & Davis; Hyndman & Athanasopoulos; Lohr; Cochran; James, Witten, Hastie & Tibshirani (ISLR); Gelman, Hill & Vehtari
III Boyd & Vandenberghe; Lange Optimization; Pawitan; Christensen; Agresti Foundations; McCullagh & Nelder; Gelman & Hill; Gelman et al. BDA3; McElreath; Robert & Casella; Burnham & Anderson; Wand & Jones; Wood; Huber & Ronchetti; Maronna et al.; Anderson; Mardia, Kent & Bibby; Hastie, Tibshirani & Friedman (ESL); Hastie, Tibshirani & Wainwright; Efron Large-Scale Inference; Angelopoulos & Bates; Imbens & Rubin; Hernán & Robins; Pearl; Angrist & Pischke; Cunningham; Hamilton; Durbin & Koopman; Cressie; Rasmussen & Williams; Kalbfleisch & Prentice; Klein & Moeschberger; Little & Rubin; van Buuren
IV Durrett; Billingsley Probability and Measure and Convergence of Probability Measures; Williams; Kallenberg; Meyn & Tweedie; Levin, Peres & Wilmer; Lehmann & Casella; Lehmann & Romano; Keener; Schervish; Berger; Ferguson; van der Vaart Asymptotic Statistics; Le Cam & Yang; van der Vaart & Wellner; Kosorok; Giné & Nickl; Bickel, Klaassen, Ritov & Wellner; Tsiatis; Tsybakov; Johnstone Gaussian Estimation; Polyanskiy & Wu; Vershynin; Boucheron, Lugosi & Massart; Wainwright High-Dimensional Statistics; Bühlmann & van de Geer; Bai & Silverstein; Ghosal & van der Vaart; Ghosh & Ramamoorthi; Shalev-Shwartz & Ben-David; Bach Learning Theory from First Principles; Mohri, Rostamizadeh & Talwalkar
V Angelopoulos, Barber & Bates Theoretical Foundations of Conformal Prediction; Vovk, Gammerman & Shafer; Ramdas & Wang Hypothesis Testing with E-values; Shafer & Vovk; Jennison & Turnbull; Diakonikolas & Kane; Villani; Peyré & Cuturi; Panaretos & Zemel; Chewi, Niles-Weed & Rigollet Statistical Optimal Transport; Couillet & Liao; Pearl & Bareinboim's papers; Wager Causal Inference; Chernozhukov et al. Applied Causal Inference Powered by ML and AI; Dwork & Roth; Barocas, Hardt & Narayanan Fairness and Machine Learning; the primary papers on each part's reference card
History, throughout Stigler (The History of Statistics, Statistics on the Table, The Seven Pillars); Hald; Hacking; Porter; Salsburg; McGrayne

Setup

git clone https://github.com/Sir-Teo/explainer-videos.git
cd explainer-videos
bash tools/setup_linux.sh && source .venv/bin/activate
python -m videos.stats.stats1.compute   # the first part's numbers
python tools/build.py stats1             # the first part

The plan of record is the syllabus: the standard every part meets and all 65 parts chapter by chapter. The sources are in the repository; the other courses are on the front page.