Labs
One lab per part. Each is seeded, runs in seconds with nothing to download, checks its own result against the theory it illustrates, and ends with three things to change. They are written on statkit and the World: the series' statistics library (numpy and scipy only), with the simulated World, the exact probability engine and the Museum's datasets beside it in explainer/stats.
pip install numpy scipy matplotlib
python -m videos.stats.labs --list
python -m videos.stats.labs 1 --show
python -m pytest -q tests/test_courses.py -k stats
Lab 1 · The Shape of DataCentres as minimizers, and a statistic that is random
Lab 2 · Chance, CountedExact answers, checked by simulation
Lab 3 · The Family of DistributionsThe law of rare events, with Le Cam's bound
Lab 4 · Matrices for StatisticsThe hat matrix and degrees of freedom
Lab 5 · Many Variables at OnceSlicing an ellipse: conditional means, Eve's law and regression to the mean
Lab 6 · The Laws of AveragesThe speed of the central limit theorem, and where it stops
Lab 7 · Randomness on DemandA bad generator and an honest simulation study
Lab 8 · From Sample to PopulationStudent's cards: 1.96 against the t multiplier
Lab 9 · EstimationThe tank factory game
Lab 10 · SignificanceWhat a 5% test promises, and two ways to break it
Lab 11 · Honest IntervalsThe sawtooth: exact coverage of intervals for a proportion
Lab 12 · Least SquaresLeast squares under even and uneven noise
Lab 13 · Experiments by DesignSystematic, randomized, blocked: three layouts on one field
Lab 14 · Counts and CategoriesThe Challenger fit, and what sampling on the outcome preserves
Lab 15 · First BayesCredible intervals on the Coverage Board
Lab 16 · Without AssumptionsThe bootstrap, where it works and where it fails
Lab 17 · Time SeriesStatistics on series that remember
Lab 18 · Who Did You Ask? Sampling and SurveysA huge biased sample against a small random one
Lab 19 · Learning from DataLeakage: selecting features before cross-validation
Lab 20 · The AnalysisOne day's recall against usual intake
Lab 21 · Optimization for StatisticsISTA against FISTA, with a certificate
Lab 22 · Likelihood in DepthThe sandwich under a wrong variance, and Neyman-Scott
Lab 23 · The Linear Model in DepthMoulton's factor, and cluster-robust errors with few clusters
Lab 24 · Generalized Linear ModelsBliss's beetles, and when the deviance is chi-squared
Lab 25 · Borrowing StrengthJames-Stein on the hitters, and its risk for every theta
Lab 26 · Bayesian Data AnalysisThe eight schools: tau on a grid, then mu, then the effects
Lab 27 · Bayesian ComputationThree samplers, one correlated normal
Lab 28 · Which Model?Freedman's paradox and the price of a parameter
Lab 29 · SmoothingThe bandwidth trade-off, exactly and by simulation
Lab 30 · Robust StatisticsA little contamination: efficiency, variance and breakdown
Lab 31 · Multivariate AnalysisHotelling's T-squared when p approaches n
Lab 32 · SparsityBasis pursuit, least norm, and the phase transition
Lab 33 · Thousands of QuestionsThe false discovery rate is pi0 times q, on average
Lab 34 · Prediction with GuaranteesSplit conformal: what 90% promises
Lab 35 · What If? Experiments and Potential OutcomesOne science table, four thousand coins
Lab 36 · Causes Without ExperimentsDouble robustness: two chances to be right
Lab 37 · Natural ExperimentsStaggered adoption: the regression that gets the sign wrong
Lab 38 · Time Series in DepthThe unit-root test has its own distribution
Lab 39 · SpaceKriging along the ridge: what need not be learned
Lab 40 · Time to EventKaplan-Meier against the two easy mistakes
Lab 41 · What You Didn't SeeComplete cases, one imputation, and Rubin's rules
Lab 42 · The Comprehensive ExamA cluster trial analysed two ways
Lab 43 · Measure-Theoretic ProbabilityHow fast is the central limit theorem?
Lab 44 · Martingales, Markov Chains and Brownian MotionFair games in time: Ville's inequality, gambler's ruin and coupling
Lab 45 · The Theory of EstimationA risk set, its minimax rule, and Stein's paradox
Lab 46 · The Theory of Testing and ConfidenceSimilar tests, unbiased tests, and an interval that must sometimes be infinite
Lab 47 · Asymptotic StatisticsHodges's bump and local asymptotic normality
Lab 48 · Empirical ProcessesThe empirical process: Kolmogorov's law, symmetrization, and estimated parameters
Lab 49 · Semiparametric EfficiencyThe efficient influence function as a projection, and double robustness as a product
Lab 50 · Minimax Theory: the Limits of EstimationPinsker's theorem in the Gaussian sequence model
Lab 51 · High-Dimensional ProbabilityConcentration in high dimensions: the equator, the shell, and root n plus or minus root p
Lab 52 · High-Dimensional StatisticsThe bulk, its edges, and the spike that PCA can or cannot see
Lab 53 · Bayesian Asymptotics and Nonparametric BayesContraction rates and credible balls in the Gaussian sequence model
Lab 54 · Statistical Learning TheoryUniform deviations, ERM's excess risk, and the best of a thousand classifiers
Lab 55 · The Qualifying ExamChecking three qualifying-exam proofs with numbers
Lab 56 · Inference After SelectionThe winner's curse and the interval that conditions on winning
Lab 57 · Distribution-Free InferenceNo interval for the mean, an exact one for the next draw
Lab 58 · Anytime-Valid Inference and Adaptive ExperimentsPeeking, Ville's inequality and the SPRT
Lab 59 · High-Dimensional AsymptoticsDouble descent and state evolution, theory against simulation
Lab 60 · Robustness and Distribution ShiftA planted cluster, and a shifted population
Lab 61 · Optimal Transport in StatisticsTransport on a line: quantiles, areas, a linear program and Sinkhorn
Lab 62 · Frontiers of Causal InferenceProximal inference: two proxies in place of a hidden confounder
Lab 63 · Privacy and FairnessPrivacy as a test, and its cost in coverage
Lab 64 · Statistics in the Age of AIBenchmarks are samples; a model fed its own output forgets
Lab 65 · The DissertationWeighted conformal under shift: coverage against the total-variation bound