SStatistics, Built

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 randomLab 2 · Chance, CountedExact answers, checked by simulationLab 3 · The Family of DistributionsThe law of rare events, with Le Cam's boundLab 4 · Matrices for StatisticsThe hat matrix and degrees of freedomLab 5 · Many Variables at OnceSlicing an ellipse: conditional means, Eve's law and regression to the meanLab 6 · The Laws of AveragesThe speed of the central limit theorem, and where it stopsLab 7 · Randomness on DemandA bad generator and an honest simulation studyLab 8 · From Sample to PopulationStudent's cards: 1.96 against the t multiplierLab 9 · EstimationThe tank factory gameLab 10 · SignificanceWhat a 5% test promises, and two ways to break itLab 11 · Honest IntervalsThe sawtooth: exact coverage of intervals for a proportionLab 12 · Least SquaresLeast squares under even and uneven noiseLab 13 · Experiments by DesignSystematic, randomized, blocked: three layouts on one fieldLab 14 · Counts and CategoriesThe Challenger fit, and what sampling on the outcome preservesLab 15 · First BayesCredible intervals on the Coverage BoardLab 16 · Without AssumptionsThe bootstrap, where it works and where it failsLab 17 · Time SeriesStatistics on series that rememberLab 18 · Who Did You Ask? Sampling and SurveysA huge biased sample against a small random oneLab 19 · Learning from DataLeakage: selecting features before cross-validationLab 20 · The AnalysisOne day's recall against usual intakeLab 21 · Optimization for StatisticsISTA against FISTA, with a certificateLab 22 · Likelihood in DepthThe sandwich under a wrong variance, and Neyman-ScottLab 23 · The Linear Model in DepthMoulton's factor, and cluster-robust errors with few clustersLab 24 · Generalized Linear ModelsBliss's beetles, and when the deviance is chi-squaredLab 25 · Borrowing StrengthJames-Stein on the hitters, and its risk for every thetaLab 26 · Bayesian Data AnalysisThe eight schools: tau on a grid, then mu, then the effectsLab 27 · Bayesian ComputationThree samplers, one correlated normalLab 28 · Which Model?Freedman's paradox and the price of a parameterLab 29 · SmoothingThe bandwidth trade-off, exactly and by simulationLab 30 · Robust StatisticsA little contamination: efficiency, variance and breakdownLab 31 · Multivariate AnalysisHotelling's T-squared when p approaches nLab 32 · SparsityBasis pursuit, least norm, and the phase transitionLab 33 · Thousands of QuestionsThe false discovery rate is pi0 times q, on averageLab 34 · Prediction with GuaranteesSplit conformal: what 90% promisesLab 35 · What If? Experiments and Potential OutcomesOne science table, four thousand coinsLab 36 · Causes Without ExperimentsDouble robustness: two chances to be rightLab 37 · Natural ExperimentsStaggered adoption: the regression that gets the sign wrongLab 38 · Time Series in DepthThe unit-root test has its own distributionLab 39 · SpaceKriging along the ridge: what need not be learnedLab 40 · Time to EventKaplan-Meier against the two easy mistakesLab 41 · What You Didn't SeeComplete cases, one imputation, and Rubin's rulesLab 42 · The Comprehensive ExamA cluster trial analysed two waysLab 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 couplingLab 45 · The Theory of EstimationA risk set, its minimax rule, and Stein's paradoxLab 46 · The Theory of Testing and ConfidenceSimilar tests, unbiased tests, and an interval that must sometimes be infiniteLab 47 · Asymptotic StatisticsHodges's bump and local asymptotic normalityLab 48 · Empirical ProcessesThe empirical process: Kolmogorov's law, symmetrization, and estimated parametersLab 49 · Semiparametric EfficiencyThe efficient influence function as a projection, and double robustness as a productLab 50 · Minimax Theory: the Limits of EstimationPinsker's theorem in the Gaussian sequence modelLab 51 · High-Dimensional ProbabilityConcentration in high dimensions: the equator, the shell, and root n plus or minus root pLab 52 · High-Dimensional StatisticsThe bulk, its edges, and the spike that PCA can or cannot seeLab 53 · Bayesian Asymptotics and Nonparametric BayesContraction rates and credible balls in the Gaussian sequence modelLab 54 · Statistical Learning TheoryUniform deviations, ERM's excess risk, and the best of a thousand classifiersLab 55 · The Qualifying ExamChecking three qualifying-exam proofs with numbersLab 56 · Inference After SelectionThe winner's curse and the interval that conditions on winningLab 57 · Distribution-Free InferenceNo interval for the mean, an exact one for the next drawLab 58 · Anytime-Valid Inference and Adaptive ExperimentsPeeking, Ville's inequality and the SPRTLab 59 · High-Dimensional AsymptoticsDouble descent and state evolution, theory against simulationLab 60 · Robustness and Distribution ShiftA planted cluster, and a shifted populationLab 61 · Optimal Transport in StatisticsTransport on a line: quantiles, areas, a linear program and SinkhornLab 62 · Frontiers of Causal InferenceProximal inference: two proxies in place of a hidden confounderLab 63 · Privacy and FairnessPrivacy as a test, and its cost in coverageLab 64 · Statistics in the Age of AIBenchmarks are samples; a model fed its own output forgetsLab 65 · The DissertationWeighted conformal under shift: coverage against the total-variation bound