Module 05
Statistics and Inference
How can we draw reliable conclusions about a population from limited observations?
- lessons
- 27
- duration
- 45 h 55 min
- concepts
- 163
- available in English
- 27 / 27
- completed by you
0 of 27
Where it fits
Prerequisites
Leads to
Overview
Explore statistical inference from data description and sampling to estimator theory, maximum likelihood and asymptotics, confidence intervals, hypothesis tests, regression, and basic Bayesian inference. Each classical idea is paired with a computational version (simulation, bootstrap, permutation tests) and a simulation study checking whether the method delivers what it promises. The module ends with experimental design, anytime-valid sequential inference, and post-selection inference, where statistics meets modern machine learning.
Why it matters
Training a GPT minimizes negative log-likelihood, and determining whether an ablation truly improves results requires intervals, power, and multiple-comparison control. In quantitative work, separating signal from noise in a backtest is a problem of multiple testing, dependence, and estimation error. For researchers and CTOs, this module provides the language to read results critically and design experiments (A/B tests, model and detector evaluations) whose conclusions withstand scrutiny.
Lessons 27
- 01Descriptive statistics and exploratory data analysisA dense review of summarizing and examining data before modeling: location, spread, shape, quantiles, the empirical distribution function, and linear and rank correlations. Introduce robustness (breakdown point) and use Anscombe’s quartet and the Datasaurus dozen to show why summaries without visualization mislead.
- 02Statistical models and sampling distributionsEstablish the language of inference: a statistical model is a family of distributions indexed by a parameter, and a statistic is a sample function whose sampling distribution quantifies variation when the experiment is repeated. Construct sampling distributions by simulation and derive exact ones for normal samples (χ², Student’s t, and F), the basis of classical intervals and tests.
- 03Survey sampling design: simple random, stratified, cluster and weightedStudy how observations are drawn from a finite population and how design determines estimator precision and bias. Cover simple random sampling with finite population correction, stratification with optimal Neyman allocation, clusters and design effect, Horvitz–Thompson estimation for unequal inclusion probabilities, and selection biases no sample size can correct.
- 04Estimators: bias, variance, MSE, consistency and the method of momentsDefine what makes an estimator good: bias, variance, mean squared error and its decomposition, consistency, and relative efficiency. Introduce the first general construction method, the method of moments, and a tool used throughout the module: ADEMP simulation studies for honest evaluation of procedures.
- 05Maximum likelihood estimationThe platform’s home for maximum likelihood. Define likelihood, log-likelihood, and score; derive classical estimators and prove invariance. Solve cases without closed form numerically using stable log-sum-exp and unconstrained reparameterization, and show that the cross-entropy used to train networks is a negative log-likelihood.
- 06Fisher information and the Cramér-Rao boundMeasure how much information an observation contains about a parameter. Prove score properties (zero mean and variance equal to information), both Fisher-information expressions and their matrix form, and the Cramér–Rao lower bound on variance of unbiased estimators. Interpret information as log-likelihood curvature and a metric leading to the natural gradient.
- 07Sufficiency, exponential families and optimal unbiased estimationUnderstand sufficient statistics and exponential families, derive moments and maximum-likelihood estimates from the log-partition function, and use Rao–Blackwell and Lehmann–Scheffé to improve unbiased estimators.
- 08Asymptotic theory: normality of the MLE, the delta method and M-estimatorsDerive consistency and asymptotic normality of maximum likelihood, propagate uncertainty with the delta method, and analyze sandwich variance, misspecification, robust estimation and failures of classical asymptotics.
- 09Confidence intervalsConstruct and interpret confidence and prediction intervals, compare proportion intervals and profile likelihood, and measure coverage and tail behavior under realistic sampling.
- 10Hypothesis testing and p-valuesUnderstand hypothesis tests and p-values, interpret type I and II errors and test–interval duality, quantify false positive risk and use equivalence testing.
- 11Optimal tests and the asymptotic trinity: Neyman-Pearson, likelihood ratio, Wald and scoreDerive Neyman–Pearson and Karlin–Rubin optimal tests, compare likelihood-ratio, Wald and score tests, and recognize when Wilks fails or universal inference applies.
- 12Power, effect size and sample sizeCalculate power and sample size, compare effect-size scales, simulate power for complex designs, and understand selection exaggeration and post hoc power.
- 13Classical parametric tests: t, proportions, chi-squared and correlationApply classical parametric tests, examine their assumptions and robustness, and choose paired, Welch, proportion, contingency, agreement and correlation methods appropriately.
- 14Permutation and randomization testsBuild exact and Monte Carlo permutation tests, connect Fisher’s exact test to randomization inference, invert tests for intervals and identify failures of exchangeability.
- 15Nonparametric tests: ranks, signs and goodness of fitUnderstand rank tests, distribution-free inference, asymptotic efficiency and empirical-distribution goodness-of-fit methods, including DKW bands and QQ plots.
- 16The bootstrap and the jackknifeUse bootstrap and jackknife resampling to estimate uncertainty, bias, and confidence intervals, and recognize their limitations.
- 17Advanced bootstrap: second-order intervals, failures and dependent dataImprove bootstrap intervals, test hypotheses by resampling, and diagnose failure and dependence.
- 18Multiple comparisons: FWER, FDR and the garden of forking pathsControl familywise error and false discoveries, and recognize hidden multiplicity in analysis choices.
- 19The linear model as a statistical modelDerive exact Gaussian regression inference, interpret predictions and diagnose model failures.
- 20Generalized linear modelsBuild generalized linear models using exponential families, links, IRLS, deviance and overdispersion remedies.
- 21Bayesian inference: prior, posterior and conjugacyUpdate priors into posterior and predictive distributions, summarize uncertainty, and connect MAP to regularization.
- 22Priors, Bayesian model comparison and Bernstein-von MisesChoose and check priors, compare models with Bayes factors, and understand asymptotic posterior behavior.
- 23Statistical decision theory and shrinkage: Stein's paradoxCompare estimators through decision-theoretic risk and derive James–Stein shrinkage and empirical Bayes.
- 24Design of experiments and ANOVADesign experiments with valid, precise conclusions. Study Fisher’s principles of randomization, replication and blocking, one- and two-factor ANOVA as linear models, block and fractional factorial designs, aliasing, adjustment with pre-experiment covariates, and threats to A/B test validity.
- 25Sequential experiments and anytime-valid inferenceContinuous monitoring of a fixed-sample experiment can inflate false positives. Study Wald’s sequential probability ratio test and group-sequential α spending, then use e-values, test martingales and confidence sequences for inference that remains valid under continuous monitoring.
- 26Uncertainty analysis, propagation and communicationQuantify uncertainty around a number. Propagate it through functions of several quantities with linear rules and Monte Carlo, distinguish confidence, prediction and tolerance intervals, combine estimates with inverse-variance weighting and model heterogeneity, and communicate the resulting uncertainty.
- 27Frontier: post-selection inference and inference with ML predictionsExplore current research at the intersection of classical statistics and machine learning. When data choose the hypothesis, classical guarantees fail; study sample splitting and data fission, conditional selective inference through the polyhedral lemma, knockoffs for FDR-controlled variable selection, and prediction-powered inference (PPI), which uses an ML model to narrow intervals without losing validity.
Module capstone
A complete statistical audit of a detector comparison
Build an inference library with tests (estimators and MLE with sandwich standard errors, Wilson and profile intervals, classical and permutation tests, BCa bootstrap, Holm and BH corrections, conjugate Bayes, and confidence sequences) and use it in an end-to-end audit on synthetic data: (1) design a comparison of two vulnerability detectors (or an A/B test) with target power and the correct randomization unit; (2) analyze it with classical, permutation, bootstrap, and Bayesian methods and explain discrepancies; (3) correct for multiplicity across dozens of metrics and subgroups; (4) validate coverage and size of each procedure with an ADEMP simulation study; and (5) write a one-page report correctly communicating effects, intervals, assumptions, and limitations.
Check what you already know
- Choose among mean, median, MAD, and quantiles for the shape of the data and reason about breakdown points
- Distinguish standard deviation from standard error and derive χ², t, and F distributions for normal samples
- Calculate an estimator's bias, variance, and MSE, and construct one by the method of moments
- Derive the MLE of a classical model and compute it numerically with stable reparameterizations
- Calculate Fisher information and the Cramér–Rao bound for a scalar model
- Apply asymptotic normality of the MLE and the delta method to obtain standard errors
- Interpret a confidence interval correctly and select an appropriate interval for a proportion
- Define a p-value, prove its uniformity under H₀, and relate it to type I and II errors
- Calculate the sample size needed for a t-test with specified power
- Choose between Student, Welch, and paired t-tests and apply a χ² independence test
- Implement a permutation test with a correct Monte Carlo p-value
- Construct a percentile bootstrap interval and estimate standard error with the jackknife
- Apply Holm and Benjamini–Hochberg and explain the distinction between FWER and FDR
- Interpret complete linear regression output: t-tests, F-test, and prediction intervals
- Derive the beta-binomial posterior and calculate a credible interval
- Analyze a two-factor ANOVA with interaction
References
- Statistical Inference
- All of Statistics: A Concise Course in Statistical Inference
- Computer Age Statistical Inference: Algorithms, Evidence, and Data Science
- Asymptotic Statistics
- Testing Statistical Hypotheses
- Bayesian Data Analysis
- 18.650 Statistics for Applications (Fall 2016)
- Intermediate Statistics (36-705)