Refresher: Probability and Statistics for MVA
M2 MVA · Refresher · 0 ECTS
Contents
- Introduction and overview
- 0. Review: random variables, laws and moments
- 1. Conditional expectation and Gaussian vectors
- 2. Modes of convergence and limit theorems
- 3. Concentration inequalities
- 4. Point estimation: likelihood, Fisher information, Cramér–Rao
- 5. Confidence intervals and hypothesis tests
- 6. Linear regression
- 7. Bayesian basics
- 8. Martingales and Markov chains
- 9. Research directions and open problems
- Exercises
- Projects and assessment
- References
Introduction and overview
| Module | Refresher: Probability and Statistics for MVA |
| Official title | Cours de remise à niveau (refresher fortnight) — content not published |
| Instructors | not published (master-mva.com, 2026–2027) |
| Period | Before semester 1 · refresher fortnight (14/09/2026 – 24/09/2026) |
| Credits and volume | no ECTS · 12 h of guided self-study (master-mva.com planning: “Cours de remise à niveau : 14/09 au 24/09/2026 (facultatifs et sans inscription / obligatoires pour track I&I)”; content and volume not published) |
| Label | None: the catalogue gives the refresher courses no Modelling, Learning or Opening label |
| Language | Not displayed (no programme is published for the refresher courses); these notes are in English |
| Assessment | None displayed: the refresher courses are optional and without registration, and mandatory for the I&I track (master-mva.com planning); the self-check of Projects and assessment is this page’s proposal, not an official test |
| Prerequisites | Not displayed; this page assumes a bachelor-level first course in probability and statistics, reviewed in ch. 0 |
Audience: a student entering the MVA with a good M1 in mathematics, computer science or physics, who wants to check, before the first lectures, the probability and statistics that the MVA courses use without recalling them.
Empirical first: a classifier answers 912 of 1,000 test images correctly, and the published baseline is 90 %. Is the new model better? The central limit theorem gives the 95 % interval [0.894, 0.930] for its true accuracy. Hoeffding’s inequality gives the wider, non-asymptotic interval [0.869, 0.955]. Both intervals contain 0.90: on this test set, a gain of 1.2 points is within the noise. Chapters 2, 3 and 5 explain the two intervals, and ch. 7 gives the Bayesian reading, a posterior probability of 0.89 that the accuracy exceeds 90 %.
This page is the probability and statistics refresher of these MVA notes. It reviews random variables and conditional expectation, Gaussian vectors, the limit theorems, the concentration inequalities of learning theory, estimation by maximum likelihood, confidence intervals and tests, linear regression, Bayesian inference, martingales and Markov chains. Each tool is stated with its hypotheses, proved or sketched, computed on numbers and checked in Python.
It is one of three refreshers, with Linear Algebra, Analysis and Optimization and Scientific Python, NumPy and PyTorch. The table of the next section names, for each tool, the MVA courses that use it.
What you will be able to do
- Compute laws, moments and conditional expectations of discrete and continuous random variables, including after a change of variables.
- Condition a Gaussian vector on some of its coordinates, and read the result as a linear regression with a residual variance.
- Distinguish almost-sure, L^p, in-probability and in-law convergence, and apply the law of large numbers, the central limit theorem, Slutsky’s lemma and the delta method.
- Bound the deviations of an empirical mean with the Markov, Chebyshev, Hoeffding and Bernstein inequalities, and choose the bound that fits the variance at hand.
- Recognise a sub-Gaussian variable and bound the expected maximum of many of them.
- Derive maximum-likelihood estimators and their Fisher information, apply the Cramér–Rao bound and state the asymptotic normality of the maximum-likelihood estimator.
- Build confidence intervals and tests, read a p-value correctly and correct for multiple testing.
- Fit a linear regression, quantify the uncertainty of its coefficients, and connect ridge regression with a Gaussian prior.
- Compute a posterior in a conjugate model and sample it with the Metropolis–Hastings algorithm.
- Use martingales (optional stopping, the Azuma–Hoeffding inequality) and the convergence theorem for Markov chains.
Official objectives and syllabus (2026–2027)
The planning page of master-mva.com announces refresher courses (“cours de remise à niveau”) from 14 to 24 September 2026. They are optional and without registration, and mandatory for the I&I track. No programme, volume or instructor is published for them.
This page therefore reconstructs no official syllabus: it is independent support, written for the level that the MVA courses assume. The table below replaces the usual correspondence table. For each tool of the page, it names MVA courses of 2026–2027 that use it, according to their official descriptions or to their pages in these notes.
| Tool | Used in (MVA courses) |
|---|---|
| Laws, moments, changes of variables, Markov and Chebyshev inequalities (ch. 0) | Mathematical Models for Digital Photography (Poisson and Gaussian noise), The Machine Intelligence of Images (Poisson counts), Remote Sensing Data (Gamma laws), Point Clouds and 3D Modelling (the binomial argument behind RANSAC), Object Recognition and Computer Vision (binomial and chi-square laws) |
| Conditional expectation and conditional laws (ch. 1) | Introduction to Statistical Learning (regression function, Bayes predictors), Introduction to Probabilistic Graphical Models, Image Denoising, Deep Learning for Image Restoration and Synthesis, Diffusion and Multiscale Models, Multimodal Explainable AI, Advanced Learning for Text and Graph Data |
| Gaussian vectors and Gaussian conditioning (ch. 1) | Image Denoising (its plan includes “a fast tutorial on Gaussian vectors”), Robotics, Machine Learning for Time Series, Probabilistic Graphical Models (Gaussian processes, PPCA), Generative Models for Images (Gaussian models), Learning Physical Phenomena, Large Random Matrices (Gaussian matrix calculus), Sub-Pixel Image Processing |
| Modes of convergence, law of large numbers, central limit theorem, delta method (ch. 2) | Stochastic Calculus in Machine Learning (martingale convergence theorems), Computational Statistics (stochastic gradient, Monte Carlo), Statistical Learning with Extreme Values, Mathematical Methods for Neuroscience (limit theorems), Large Random Matrices (Marchenko–Pastur theorem) |
| Concentration: Hoeffding, Bernstein, sub-Gaussian variables (ch. 3) | Introduction to Statistical Learning (generalization bounds), Theoretical Foundations of Deep Learning, Statistical Learning with Extreme Values (concentration inequalities for rare events), Sequential Learning and Reinforcement Learning (bandits, exploration), Graphs in Machine Learning |
| Estimators, bias and variance, maximum likelihood, Fisher information, Cramér–Rao bound (ch. 4) | Probabilistic Graphical Models (maximum likelihood, EM), Computational Statistics (EM and its stochastic versions), Sub-Pixel Image Processing (Cramér–Rao bound), Remote Sensing Data (maximum likelihood), Medical Image Analysis (Gaussian likelihoods), Statistical Learning for Geosciences, Advanced Learning for Text and Graph Data |
| Confidence intervals, tests, p-values, multiple testing (ch. 5) | Detection Theory and Industrial Applications (a-contrario detection, number of false alarms), Functional Brain Imaging and BCI (hypothesis tests, non-parametric tests, multiple comparisons), Biostatistics (clinical trials), Fundamentals of Reproducible Research (tests and p-values), Deep Learning for Medical Imaging (confidence intervals), Inverse Problems and Imaging (detection tests) |
| Linear regression, least squares, ridge (ch. 6) | Probabilistic Graphical Models (linear and Bayesian linear regression), Kernel Methods (kernel ridge regression), Functional Brain Imaging and BCI (linear model), Inverse Problems and Imaging (least-squares problems), Theoretical Foundations of Deep Learning, Large Random Matrices |
| Priors, posteriors, conjugacy, MAP, credible intervals (ch. 7) | Bayesian Machine Learning, Computational Statistics (Bayesian inference), Image Denoising (Bayesian patch-based methods), Inverse Problems and Imaging (Bayesian analysis of ill-posed problems), Generative Models for Images (Bayesian models), Mathematical Models for Digital Photography (Bayesian estimation), Learning Physical Phenomena |
| Martingales and stopping times (ch. 8) | Stochastic Calculus in Machine Learning (continuous-time martingales, lecture 2), Stopping Times and Online Algorithms (prophet inequalities), Sequential Learning |
| Markov chains and Markov chain Monte Carlo (ch. 8) | Computational Statistics (Metropolis–Hastings and Gibbs samplers), Bayesian Machine Learning, Stochastic Calculus in Machine Learning (diffusion-based MCMC), Interactions (Markov processes, Metropolis and Gibbs dynamics), Reinforcement Learning (Markov decision processes), Algorithms for Speech and Natural Language Processing (hidden Markov models), Graphs in Machine Learning |
Beyond the level of a refresher, ch. 9 surveys research directions (self-study): heavy-tailed mean estimation, conformal prediction, anytime-valid inference, high-dimensional regression and Bayesian asymptotics.
Where this course fits in the programme
Official prerequisites: none published. The page assumes a first course in probability and statistics at bachelor level; ch. 0 reviews what it needs, and the rest is built from there.
- The other refreshers — Linear Algebra, Analysis and Optimization supplies the spectral theorem, projections and positive semidefinite matrices used for Gaussian vectors and regression. Scientific Python, NumPy and PyTorch supplies the NumPy and SciPy used by every code block.
- Semester 1 courses that rely on it — Introduction to Statistical Learning, Probabilistic Graphical Models, Computational Statistics, Stochastic Calculus in Machine Learning, Theoretical Foundations of Deep Learning, Statistical Learning with Extreme Values, Image Denoising and Machine Learning for Time Series.
- Semester 2 courses that rely on it — Bayesian Machine Learning, Reinforcement Learning, Sequential Learning, Kernel Methods, Large Random Matrices, Biostatistics, Detection Theory and Inverse Problems and Imaging.
Course outline
- 0. Review: random variables, laws and moments — probability spaces, laws, expectation, changes of variables, independence, Jensen, Markov and Chebyshev.
- 1. Conditional expectation and Gaussian vectors — conditional expectation as an orthogonal projection, the law of total variance, Gaussian vectors and the conditioning formula.
- 2. Modes of convergence and limit theorems — the four modes and their implications, the laws of large numbers, the central limit theorem, Slutsky’s lemma and the delta method.
- 3. Concentration inequalities — the Chernoff method, sub-Gaussian variables, Hoeffding’s and Bernstein’s inequalities, maxima of sub-Gaussian variables.
- 4. Point estimation — bias and variance, maximum likelihood, score and Fisher information, the Cramér–Rao bound and the asymptotic normality of the maximum-likelihood estimator.
- 5. Confidence intervals and hypothesis tests — pivots, Student intervals, the Neyman–Pearson lemma, p-values, the likelihood-ratio test and multiple testing.
- 6. Linear regression — least squares as a projection, the Gauss–Markov theorem, inference in the Gaussian linear model, ridge regression.
- 7. Bayesian basics — priors and posteriors, conjugate models, Bayes estimators, credible intervals, the Bernstein–von Mises theorem.
- 8. Martingales and Markov chains — optional stopping, the Azuma–Hoeffding and McDiarmid inequalities, invariant laws, the ergodic theorem, Metropolis–Hastings.
- 9. Research directions and open problems — where the classical tools stop and current research continues (self-study).
Session plan
12 h of guided self-study = 4 steps of 3 h. The master-mva.com planning announces the refresher fortnight (14–24 September 2026) without publishing its content or volume; the 12 h volume comes from the catalogue of these notes, and the split into four steps is a proposal. The four steps cover the tools that almost every MVA course assumes; the later chapters are complements, to read when a course of the table above needs them.
Level 1 = foundations (reviews, definitions, first computations), 2 = core results, 3 = advanced or research-level material; the level never goes down from one step to the next.
| Session | Hours | Level | Content | Practice |
|---|---|---|---|---|
| 1 | 3 h | 1 | ch. 0 Review: laws, moments, changes of variables, Jensen, Markov and Chebyshev; ch. 1 Conditional expectation, law of total variance, Gaussian vectors and conditioning | Ex. 1–3; self-check Q1–3 |
| 2 | 3 h | 2 | ch. 2 Modes of convergence, Borel–Cantelli, laws of large numbers, central limit theorem, Slutsky’s lemma, delta method | Ex. 5; self-check Q4–5 |
| 3 | 3 h | 2 | ch. 3 Chernoff method, sub-Gaussian variables, Hoeffding, Bernstein, maxima and union bounds | Ex. 4, 6, 8; self-check Q6–7 |
| 4 | 3 h | 2 | ch. 4 Bias and variance, maximum likelihood, Fisher information, Cramér–Rao bound, asymptotic normality | Ex. 7, 9; self-check Q8–9 |
Self-study, outside the 12 h (about 12 h in total, to read on demand): ch. 5 Confidence intervals and tests (≈ 3 h, Ex. 10, 13) · ch. 6 Linear regression (≈ 2.5 h, Ex. 11) · ch. 7 Bayesian basics (≈ 2 h, Ex. 12) · ch. 8 Martingales and Markov chains (≈ 3 h, Ex. 14–15) · ch. 9 Research directions and open problems (≈ 1.5 h, Ex. 16–17).
How to study this module
- Start with the diagnostic self-check. The question numbers point to chapters: skip a chapter whose questions you answer in a minute, and work through the others.
- Read each chapter with pen and paper: redo the proofs of the boxed theorems before reading them, then compare.
- Run every code block, then change one parameter (a sample size, a variance, a seed) and predict the new output before running it again.
- After each step of the session plan, do the exercises listed in its Practice column; the solutions follow each statement.
- Read the self-study chapters when a course needs them: ch. 5 before a course with tests, ch. 7–8 before Bayesian or sampling courses.
- The code needs Python 3 with NumPy and SciPy only; it runs on a laptop in a few seconds.
0. Review: random variables, laws and moments
Every later chapter handles random variables, their laws and their moments without recalling the definitions. This review fixes the notation and proves the few facts used everywhere else: changes of variables, independence, and the inequalities of Jensen, Markov and Chebyshev.
Definition 0.1 — Probability space, random variable, law A probability space (\Omega, \mathcal{F}, \mathbb{P}) is a set with a σ-algebra of events and a probability measure. A random variable is a measurable map X : \Omega \to \mathbb{R}^d, and its law is the image measure
P_X(B) = \mathbb{P}(X \in B), \qquad B \subset \mathbb{R}^d \text{ Borel}.
In dimension 1 the law is determined by the distribution function F_X(x) = \mathbb{P}(X \le x). The law has a density f_X when P_X(B) = \int_B f_X(x)\,dx for every Borel set B.
Definition 0.2 — Expectation, variance, covariance For an integrable X and a measurable g with g(X) integrable, the transfer formula reads
\mathbb{E}[g(X)] = \int g(x)\, dP_X(x) = \int g(x)\, f_X(x)\, dx \quad \text{(density case)}.
For square-integrable X and Y, the covariance and the variance are
\mathrm{Cov}(X, Y) = \mathbb{E}\big[(X - \mathbb{E}X)(Y - \mathbb{E}Y)\big], \qquad \mathrm{Var}(X) = \mathrm{Cov}(X, X).
For a random vector with mean \mu, the covariance matrix \Sigma = \mathbb{E}[(X - \mu)(X - \mu)^\top] is symmetric positive semidefinite, and \mathrm{Var}(a^\top X) = a^\top \Sigma a for every a.
The laws used most often on this page:
| Law | Mass or density | Mean | Variance |
|---|---|---|---|
| Bernoulli \mathcal{B}(p) | p^x (1-p)^{1-x}, x \in \{0, 1\} | p | p(1-p) |
| Binomial \mathcal{B}(n, p) | \binom{n}{k} p^k (1-p)^{n-k} | np | np(1-p) |
| Poisson \mathcal{P}(\lambda) | e^{-\lambda} \lambda^k / k! | \lambda | \lambda |
| Uniform \mathcal{U}[a, b] | 1/(b-a) on [a, b] | (a+b)/2 | (b-a)^2/12 |
| Exponential \mathcal{E}(\lambda) | \lambda e^{-\lambda x}, x > 0 | 1/\lambda | 1/\lambda^2 |
| Gamma \Gamma(k, \lambda) | \lambda^k x^{k-1} e^{-\lambda x} / \Gamma(k), x > 0 | k/\lambda | k/\lambda^2 |
| Beta \mathrm{Beta}(a, b) | x^{a-1}(1-x)^{b-1} / B(a, b) on (0, 1) | a/(a+b) | ab / ((a+b)^2 (a+b+1)) |
| Gaussian \mathcal{N}(\mu, \sigma^2) | e^{-(x-\mu)^2/(2\sigma^2)} / \sqrt{2\pi\sigma^2} | \mu | \sigma^2 |
Proposition 0.3 — Change of variables Let X have a density f_X supported in an open set U \subset \mathbb{R}^d, and let \varphi : U \to V be a C^1 diffeomorphism. Then Y = \varphi(X) has the density
f_Y(y) = f_X\big(\varphi^{-1}(y)\big)\, \big|\det D\varphi^{-1}(y)\big|, \qquad y \in V.
Proof. For a Borel set B \subset V,
\mathbb{P}(Y \in B) = \mathbb{P}\big(X \in \varphi^{-1}(B)\big) = \int_{\varphi^{-1}(B)} f_X(x)\, dx.
The substitution x = \varphi^{-1}(y) in this integral gives
\mathbb{P}(Y \in B) = \int_B f_X\big(\varphi^{-1}(y)\big)\, \big|\det D\varphi^{-1}(y)\big|\, dy,
which is the claim. ∎
Example 0.4 — Sampling by inversion Let U be uniform on (0, 1) and \varphi(u) = -\log(u)/\lambda. The inverse is \varphi^{-1}(y) = e^{-\lambda y}, with derivative of absolute value \lambda e^{-\lambda y}, so Y = \varphi(U) has density
f_Y(y) = \lambda e^{-\lambda y}, \qquad y > 0 :
Y is exponential with parameter \lambda. More generally, if F is a distribution function and F^{-1} its generalized inverse, F^{-1}(U) has distribution function F. Most random-number generators start from this remark.
Definition 0.5 — Independence Random variables X_1, \dots, X_n are independent when, for all Borel sets B_1, \dots, B_n,
\mathbb{P}(X_1 \in B_1, \dots, X_n \in B_n) = \prod_{i=1}^n \mathbb{P}(X_i \in B_i),
that is, when their joint law is the product of their laws. Then expectations of products of functions of different variables factorize,
\mathbb{E}\big[g(X_1)\, h(X_2)\big] = \mathbb{E}[g(X_1)]\; \mathbb{E}[h(X_2)],
and the variance of a sum of independent variables is the sum of the variances.
Uncorrelated does not imply independent: if X \sim \mathcal{N}(0, 1) and Y = X^2, then \mathrm{Cov}(X, Y) = \mathbb{E}[X^3] = 0, yet Y is a function of X.
Proposition 0.6 — Characteristic and moment generating functions The characteristic function \phi_X(u) = \mathbb{E}[e^{i u^\top X}] determines the law of X, and \phi_{X+Y} = \phi_X \phi_Y when X and Y are independent.
When it is finite near 0, the moment generating function M_X(\lambda) = \mathbb{E}[e^{\lambda X}] also determines the law; ch. 3 is built on it.
For instance, the characteristic function of \mathcal{P}(\lambda) is \exp(\lambda(e^{iu} - 1)). The product of two such functions shows that the sum of independent \mathcal{P}(\lambda) and \mathcal{P}(\mu) variables is \mathcal{P}(\lambda + \mu). The uniqueness theorem is proved in Billingsley (1995, §26).
Theorem 0.7 — Jensen’s inequality If \varphi : \mathbb{R} \to \mathbb{R} is convex and X and \varphi(X) are integrable, then
\varphi(\mathbb{E}X) \le \mathbb{E}[\varphi(X)].
Proof. A convex function lies above its tangent lines: with m = \mathbb{E}X, there is a slope c such that \varphi(x) \ge \varphi(m) + c\,(x - m) for every x. Replace x by X and take expectations; the last term has mean zero. ∎
Theorem 0.8 — Markov and Chebyshev inequalities If X \ge 0 and t > 0, then \mathbb{P}(X \ge t) \le \mathbb{E}X / t. If X has a finite variance, then for every t > 0
\mathbb{P}\big(|X - \mathbb{E}X| \ge t\big) \le \frac{\mathrm{Var}(X)}{t^2}.
Proof. Pointwise, t\, \mathbf{1}\{X \ge t\} \le X; taking expectations gives Markov’s inequality. Chebyshev’s inequality is Markov’s inequality applied to (X - \mathbb{E}X)^2 at the level t^2. ∎
For independent copies X_1, \dots, X_n of a variable with mean \mu and variance \sigma^2, the empirical mean \bar X_n = \frac1n \sum_i X_i has variance \sigma^2 / n. Chebyshev’s inequality then gives the first deviation bound of the page.
Key result — Chebyshev for an empirical mean
\mathbb{P}\big(|\bar X_n - \mu| \ge t\big) \le \frac{\sigma^2}{n t^2}
The code below samples the exponential law by inversion (Example 0.4) and compares its true tail with the bounds of Theorem 0.8. Both bounds hold, and both are far from the true value e^{-4} \approx 0.018: ch. 3 explains how to do better.
import numpy as np
rng = np.random.default_rng(0)
lam = 2.0
x = -np.log(rng.uniform(size=1_000_000)) / lam # inverse transform: Exp(lam)
print(f"mean {x.mean():.4f} (exact {1/lam}), variance {x.var():.4f} (exact {1/lam**2})")
t = 2.0
print(f"P(X >= {t}): empirical {np.mean(x >= t):.4f}, exact {np.exp(-lam*t):.4f}")
print(f"Markov bound {(1/lam)/t:.4f}, Chebyshev bound {(1/lam**2)/(t - 1/lam)**2:.4f}")
# mean 0.4999 (exact 0.5), variance 0.2502 (exact 0.25)
# P(X >= 2.0): empirical 0.0183, exact 0.0183
# Markov bound 0.2500, Chebyshev bound 0.1111Key takeaways — chapter 0
- A random variable is a measurable map; its law is an image measure, described by a distribution function, a density or a mass function.
- Under a diffeomorphism, densities pick up the absolute Jacobian determinant of the inverse map; inversion of the distribution function samples any law in dimension 1.
- Independence means a product law; it implies zero covariance, but zero covariance does not imply independence.
- Jensen’s inequality comes from the tangent lines of a convex function; Markov’s and Chebyshev’s inequalities come from one pointwise inequality.
- An empirical mean of n variables deviates by about \sigma/\sqrt{n}.
1. Conditional expectation and Gaussian vectors
Predicting Y from X in mean square, denoising an image or filtering a trajectory all come down to computing \mathbb{E}[Y \mid X]. This chapter defines the conditional expectation in general, gives its rules of calculation, and computes it in closed form for Gaussian vectors, the family in which it is affine.
Definition 1.1 — Conditional expectation Let Y be square-integrable and \mathcal{G} \subset \mathcal{F} a sub-σ-algebra. The conditional expectation \mathbb{E}[Y \mid \mathcal{G}] is the orthogonal projection of Y, in L^2(\Omega, \mathcal{F}, \mathbb{P}), onto the closed subspace of \mathcal{G}-measurable square-integrable variables.
Equivalently, it is the almost surely unique \mathcal{G}-measurable variable Z such that
\mathbb{E}[Z W] = \mathbb{E}[Y W] \qquad \text{for every bounded } \mathcal{G}\text{-measurable } W.
This second characterization extends the definition to integrable Y. When \mathcal{G} = \sigma(X), there is a measurable g with \mathbb{E}[Y \mid X] = g(X), and one writes \mathbb{E}[Y \mid X = x] = g(x).
Proposition 1.2 — Rules of calculation Let Y be integrable and \mathcal{H} \subset \mathcal{G} be sub-σ-algebras. Then:
- conditional expectation is linear and positive;
- tower property: conditioning on \mathcal{G} then on the smaller \mathcal{H} is conditioning on \mathcal{H}, \mathbb{E}\big[\mathbb{E}[Y \mid \mathcal{G}] \,\big|\, \mathcal{H}\big] = \mathbb{E}[Y \mid \mathcal{H}], \qquad \mathbb{E}\big[\mathbb{E}[Y \mid \mathcal{G}]\big] = \mathbb{E}[Y];
- taking out what is known: if Z is bounded and \mathcal{G}-measurable, then \mathbb{E}[ZY \mid \mathcal{G}] = Z\, \mathbb{E}[Y \mid \mathcal{G}];
- if Y is independent of \mathcal{G}, then \mathbb{E}[Y \mid \mathcal{G}] = \mathbb{E}[Y];
- conditional Jensen: for convex \varphi with \varphi(Y) integrable, \varphi\big(\mathbb{E}[Y \mid \mathcal{G}]\big) \le \mathbb{E}[\varphi(Y) \mid \mathcal{G}].
Proof. Each item checks the characterization of Definition 1.1.
- Tower: both sides are \mathcal{H}-measurable. For bounded \mathcal{H}-measurable W, which is also \mathcal{G}-measurable, both have the same product with W in expectation as Y.
- Known factors: Z\,\mathbb{E}[Y \mid \mathcal{G}] is \mathcal{G}-measurable. For bounded \mathcal{G}-measurable W, the product ZW is again bounded and measurable, so its expected product with Y is preserved.
- Independence: \mathbb{E}[Y W] = \mathbb{E}[Y]\,\mathbb{E}[W] for W measurable with respect to \mathcal{G}.
- Jensen: a convex \varphi is the supremum of countably many affine functions; apply positivity to each one. ∎
Theorem 1.3 — Best prediction in mean square Let Y be square-integrable, X any random variable and m(X) = \mathbb{E}[Y \mid X]. For every measurable g with g(X) square-integrable,
\mathbb{E}\big[(Y - g(X))^2\big] = \mathbb{E}\big[(Y - m(X))^2\big] + \mathbb{E}\big[(m(X) - g(X))^2\big].
Hence m is the best predictor of Y from X in mean square.
Proof. Write Y - g(X) = (Y - m(X)) + (m(X) - g(X)) and expand the square. The second term is a square-integrable function of X, and Y - m(X) is orthogonal to all of them by Definition 1.1. The cross term vanishes: this is Pythagoras’ theorem. ∎
The function m is the regression function of statistical learning, and the minimum-mean-square-error denoiser of image restoration.
Proposition 1.4 — Law of total variance With the conditional variance defined by \mathrm{Var}(Y \mid X) = \mathbb{E}[(Y - m(X))^2 \mid X],
\mathrm{Var}(Y) = \mathbb{E}\big[\mathrm{Var}(Y \mid X)\big] + \mathrm{Var}\big(\mathbb{E}[Y \mid X]\big).
Proof. Apply Theorem 1.3 to the constant predictor g = \mathbb{E}[Y], which equals \mathbb{E}[m(X)] by the tower property; then use the tower property once more on the first term. ∎
Example 1.5 — Computing with densities When (X, Y) has a joint density f, the conditional density of Y given X = x is f(x, y) / f_X(x) wherever f_X(x) > 0.
The conditional expectation \mathbb{E}[Y \mid X = x] is the mean of this density.
Let X be uniform on [0, 1] and, given X = x, let Y be uniform on [0, x]. Then:
- \mathbb{E}[Y \mid X] = X/2 and \mathrm{Var}(Y \mid X) = X^2/12;
- \mathbb{E}[Y] = \mathbb{E}[X]/2 = 1/4;
- by Proposition 1.4, the variance of Y is
\mathrm{Var}(Y) = \frac{\mathbb{E}[X^2]}{12} + \frac{\mathrm{Var}(X)}{4} = \frac{1}{36} + \frac{1}{48} = \frac{7}{144}.
Definition 1.6 — Gaussian vector A random vector X \in \mathbb{R}^d is Gaussian when every linear combination a^\top X is a real Gaussian variable (variance 0 allowed). Its law is determined by its mean \mu and covariance \Sigma; it is written \mathcal{N}(\mu, \Sigma), and its characteristic function is
\mathbb{E}\big[e^{i u^\top X}\big] = \exp\Big(i u^\top \mu - \tfrac12 u^\top \Sigma u\Big).
If \Sigma is invertible, X has the density
f(x) = (2\pi)^{-d/2} (\det \Sigma)^{-1/2} \exp\Big(-\tfrac12 (x - \mu)^\top \Sigma^{-1} (x - \mu)\Big).
Every \mathcal{N}(\mu, \Sigma) is obtained as \mu + LZ with Z \sim \mathcal{N}(0, I_d) and \Sigma = LL^\top, for instance with the Cholesky factor L.
Proposition 1.7 — Affine maps and independence
- If X \sim \mathcal{N}(\mu, \Sigma), then AX + b \sim \mathcal{N}(A\mu + b,\ A \Sigma A^\top).
- If (X, Y) is a Gaussian vector, then X and Y are independent if and only if their cross-covariance \mathrm{Cov}(X, Y) is zero.
Proof.
A linear combination of AX + b is a linear combination of X plus a constant, hence Gaussian; its mean and covariance follow from linearity.
Independent variables have zero covariance (Definition 0.5). Conversely, when the cross-covariance vanishes, \Sigma is block diagonal and the characteristic function of Definition 1.6 factorizes into the product of those of X and Y. That product is the characteristic function of the product law, so the joint law is the product law (Proposition 0.6). ∎
Joint Gaussianity matters in item 2. Let X \sim \mathcal{N}(0, 1) and let \varepsilon = \pm 1 be an independent fair sign. Then Y = \varepsilon X is \mathcal{N}(0, 1) and uncorrelated with X, yet |Y| = |X|.
The pair is not a Gaussian vector: X + Y = 0 with probability 1/2, which no non-degenerate Gaussian variable does.
Theorem 1.8 — Gaussian conditioning Let (X, Y) \in \mathbb{R}^p \times \mathbb{R}^q be a Gaussian vector with means \mu_X, \mu_Y, covariance blocks \Sigma_{XX}, \Sigma_{XY}, \Sigma_{YX}, \Sigma_{YY}, and \Sigma_{XX} invertible. The conditional law of Y given X = x is Gaussian:
Key result — the conditioning formula
Y \mid X = x \ \sim\ \mathcal{N}\Big(\mu_Y + \Sigma_{YX}\Sigma_{XX}^{-1}(x - \mu_X),\ \ \Sigma_{YY} - \Sigma_{YX}\Sigma_{XX}^{-1}\Sigma_{XY}\Big)
Proof. Set W = Y - \mu_Y - \Sigma_{YX}\Sigma_{XX}^{-1}(X - \mu_X).
- The pair (X, W) is an affine image of (X, Y), hence Gaussian (Proposition 1.7).
- Its cross-covariance vanishes, so W is independent of X: \mathrm{Cov}(W, X) = \Sigma_{YX} - \Sigma_{YX}\Sigma_{XX}^{-1}\Sigma_{XX} = 0.
- W has mean 0, and expanding \mathrm{Cov}(W, W) gives the covariance \Sigma_{YY} - \Sigma_{YX}\Sigma_{XX}^{-1}\Sigma_{XY}.
Finally Y = \mu_Y + \Sigma_{YX}\Sigma_{XX}^{-1}(X - \mu_X) + W, with W independent of X: given X = x, Y is a fixed vector plus W. ∎
The conditional mean is affine in x, and the conditional covariance, the Schur complement of \Sigma_{XX}, does not depend on x. The Kalman filter, Gaussian-process regression and the Wiener denoiser are this theorem applied to different blocks.
Example 1.9 — Conditioning in numbers Let (X, Y) be Gaussian with means 1 and -1, both variances equal to 4, and covariance 2.4, that is, correlation \rho = 0.6. Theorem 1.8 gives
\mathbb{E}[Y \mid X = 3] = -1 + \frac{2.4}{4}(3 - 1) = 0.2, \qquad \mathrm{Var}(Y \mid X = 3) = 4 - \frac{2.4^2}{4} = 2.56.
Observing X multiplies the variance of Y by 1 - \rho^2 = 0.64, whatever the observed value.
The code samples the pair through a Cholesky factor and checks both numbers: once by averaging Y over a thin window around X = 3, and once by fitting the least-squares line of Y on X, which estimates the affine conditional mean.
import numpy as np
rng = np.random.default_rng(1)
mu = np.array([1.0, -1.0])
Sigma = np.array([[4.0, 2.4], [2.4, 4.0]]) # standard deviations 2, correlation 0.6
L = np.linalg.cholesky(Sigma) # Sigma = L L^T
Z = mu + rng.standard_normal((1_000_000, 2)) @ L.T # rows ~ N(mu, Sigma)
x, y = Z[:, 0], Z[:, 1]
near = np.abs(x - 3.0) < 0.05 # condition on X close to 3
m, se = y[near].mean(), y[near].std() / np.sqrt(near.sum())
print(f"E[Y | X=3] in a window: {m:.3f} +/- {2 * se:.3f} (formula 0.200)")
slope, intercept = np.polyfit(x, y, 1) # least-squares line of y on x
res = y - (slope * x + intercept)
print(f"slope {slope:.3f} (formula 0.600), residual variance {res.var():.3f} (formula 2.560)")
# E[Y | X=3] in a window: 0.219 +/- 0.029 (formula 0.200)
# slope 0.598 (formula 0.600), residual variance 2.554 (formula 2.560)Key takeaways — chapter 1
- \mathbb{E}[Y \mid \mathcal{G}] is an orthogonal projection in L^2; the tower property, known factors and independence follow from that one characterization.
- The conditional expectation is the best predictor in mean square, and the law of total variance splits the variance into an explained and an unexplained part.
- A Gaussian vector is defined by its linear combinations; for such vectors, zero covariance means independence.
- Conditioning a Gaussian vector gives an affine mean and a constant covariance, the Schur complement.
2. Modes of convergence and limit theorems
Most estimators in these notes are averages, or smooth functions of averages. This chapter says in which sense an average converges to its mean (laws of large numbers), at which scale it fluctuates around it (central limit theorem), and how both limits pass through smooth functions (Slutsky’s lemma, delta method).
Definition 2.1 — Modes of convergence Let X_n and X be random vectors on the same probability space.
- X_n \to X almost surely if \mathbb{P}(X_n \to X) = 1.
- X_n \to X in L^p, for p \ge 1, if \mathbb{E}\|X_n - X\|^p \to 0.
- X_n \to X in probability if \mathbb{P}(\|X_n - X\| > \varepsilon) \to 0 for every \varepsilon > 0.
- X_n \to X in law if \mathbb{E}f(X_n) \to \mathbb{E}f(X) for every bounded continuous f. In dimension 1, this holds if and only if F_{X_n}(x) \to F_X(x) at every point where F_X is continuous.
Convergence in law only involves the laws, so it also makes sense for variables defined on different spaces.
Proposition 2.2 — Implications between the modes
\text{almost sure} \ \Longrightarrow\ \text{in probability} \ \Longrightarrow\ \text{in law}, \qquad L^p \ \Longrightarrow\ \text{in probability}.
No other implication holds in general. Convergence in law to a constant implies convergence in probability.
Proof.
- L^p: Markov’s inequality applied to \|X_n - X\|^p at the level \varepsilon^p.
- Almost sure: dominated convergence applied to the indicators of the events \|X_n - X\| > \varepsilon.
- In law: it suffices to test bounded Lipschitz functions (Billingsley, 1995, §25). For such an f with constant L, split on the event \|X_n - X\| > \varepsilon: \big|\mathbb{E}f(X_n) - \mathbb{E}f(X)\big| \le L\varepsilon + 2\|f\|_\infty\, \mathbb{P}\big(\|X_n - X\| > \varepsilon\big). The right-hand side tends to L\varepsilon, for every \varepsilon > 0. ∎
Three counterexamples, with U uniform on (0, 1):
- X_n = n\,\mathbf{1}\{U < 1/n\} tends to 0 almost surely, but \mathbb{E}X_n = 1: no convergence in L^1.
- Independent X_n \sim \mathcal{B}(1/n) tend to 0 in every L^p, but not almost surely (Lemma 2.3 below, second part).
- If X \sim \mathcal{N}(0, 1), the constant sequence X_n = -X tends to X in law, but not in probability.
Lemma 2.3 — Borel–Cantelli Let (A_n) be events. If \sum_n \mathbb{P}(A_n) < \infty, then almost surely only finitely many A_n occur. If the A_n are independent and \sum_n \mathbb{P}(A_n) = \infty, then almost surely infinitely many occur.
Proof. The event “infinitely many A_k” is contained, for every n, in the union of the A_k for k \ge n, whose probability is at most \sum_{k \ge n} \mathbb{P}(A_k) \to 0.
For the second part, independence and 1 - x \le e^{-x} give
\mathbb{P}\Big(\bigcap_{k \ge n} A_k^c\Big) = \prod_{k \ge n} \big(1 - \mathbb{P}(A_k)\big) \le \exp\Big(-\sum_{k \ge n} \mathbb{P}(A_k)\Big) = 0.
A countable union of null events is null, so almost surely some A_k with k \ge n occurs, for every n. ∎
Theorem 2.4 — Laws of large numbers Let X_1, X_2, \dots be i.i.d. and integrable, with mean \mu. Then \bar X_n \to \mu in probability (weak law) and almost surely (strong law, Kolmogorov).
Proof. Weak law, finite variance: the key result of ch. 0 bounds the deviation probability by \sigma^2/(n t^2), which tends to 0.
Strong law, finite fourth moment: with Y_i = X_i - \mu, expanding the fourth power of the sum leaves only the terms Y_i^4 and Y_i^2 Y_j^2, so
\mathbb{E}\big[(\bar X_n - \mu)^4\big] = \frac{\mathbb{E}Y^4}{n^3} + \frac{3(n-1)\sigma^4}{n^3} \le \frac{C}{n^2}.
Markov’s inequality gives \mathbb{P}(|\bar X_n - \mu| \ge t) \le C/(n^2 t^4), a summable sequence. By Lemma 2.3, almost surely |\bar X_n - \mu| \ge t happens finitely often, for every rational t > 0. The integrable case needs a truncation argument (Durrett, 2019, §2.4). ∎
Theorem 2.5 — Central limit theorem Let X_1, X_2, \dots be i.i.d. in \mathbb{R}^d, with mean \mu and covariance \Sigma. Then
Key result — the central limit theorem
\sqrt{n}\,\big(\bar X_n - \mu\big) \xrightarrow[n \to \infty]{\text{law}} \mathcal{N}(0, \Sigma)
Proof. Sketch in dimension 1, with \mu = 0 and \sigma = 1. By independence, the characteristic function of \sqrt{n}\,\bar X_n is \phi(u/\sqrt{n})^n. Two finite moments give \phi(s) = 1 - s^2/2 + o(s^2), hence
\phi\big(u/\sqrt{n}\big)^n = \Big(1 - \frac{u^2}{2n} + o\big(\tfrac1n\big)\Big)^n \longrightarrow e^{-u^2/2}.
Lévy’s continuity theorem turns this pointwise limit of characteristic functions into convergence in law (Billingsley, 1995, §26). In dimension d, apply the result to every a^\top X_i (Cramér–Wold device). ∎
The Berry–Esseen theorem quantifies the speed. In dimension 1, the distance between the distribution function of the standardized mean and \Phi is at most C\rho/(\sigma^3\sqrt{n}), with \rho = \mathbb{E}|X - \mu|^3 and C a universal constant.
Proposition 2.6 — Slutsky’s lemma and continuous mapping If X_n \to X in law and Y_n \to c in probability, with c a constant, then (X_n, Y_n) \to (X, c) in law. Hence, in law,
X_n + Y_n \to X + c, \qquad Y_n X_n \to cX.
If g is continuous, then g(X_n) \to g(X) in law. Proofs: van der Vaart (1998, §2).
Theorem 2.7 — Delta method If \sqrt{n}\,(T_n - \theta) \to \mathcal{N}(0, \Sigma) in law and g is differentiable at \theta, then
\sqrt{n}\,\big(g(T_n) - g(\theta)\big) \xrightarrow{\text{law}} \mathcal{N}\big(0,\ \nabla g(\theta)^\top \Sigma\, \nabla g(\theta)\big).
Proof. Differentiability gives, with r(t) \to 0 as t \to \theta,
g(T_n) - g(\theta) = \nabla g(\theta)^\top (T_n - \theta) + \|T_n - \theta\|\, r(T_n).
Multiply by \sqrt{n}. The first term converges in law to the announced Gaussian (continuous mapping). In the second, \sqrt{n}\,\|T_n - \theta\| converges in law and r(T_n) \to 0 in probability, so their product tends to 0 in probability. Slutsky’s lemma concludes. ∎
Example 2.8 — The interval of the introduction Let X_i \in \{0, 1\} be i.i.d. with mean p, and \hat p = \bar X_n. The central limit theorem gives \sqrt{n}\,(\hat p - p) \to \mathcal{N}(0, p(1-p)), and \hat p \to p in probability. By Slutsky’s lemma,
\frac{\sqrt{n}\,(\hat p - p)}{\sqrt{\hat p(1 - \hat p)}} \xrightarrow{\text{law}} \mathcal{N}(0, 1).
So \hat p \pm 1.96 \sqrt{\hat p(1-\hat p)/n} covers p with probability tending to 0.95. With \hat p = 0.912 and n = 1000, the half-width is 1.96 \times 0.00896 = 0.0176:
[0.894,\ 0.930].
For the log-odds g(p) = \log\frac{p}{1-p}, with g'(p) = \frac{1}{p(1-p)}, the delta method gives the standard error 1/\sqrt{n \hat p (1 - \hat p)} = 0.112.
The code standardizes means of exponential variables, a skewed law, and measures the largest gap between their distribution function and \Phi (the Kolmogorov–Smirnov distance). The gap shrinks roughly like 1/\sqrt{n}, as Berry–Esseen predicts.
import numpy as np
from scipy import stats
rng = np.random.default_rng(2)
for n in [5, 30, 200]:
xbar = rng.exponential(1.0, size=(20_000, n)).mean(axis=1)
z = np.sqrt(n) * (xbar - 1.0) # mean 1 and variance 1 for Exp(1)
ks = stats.kstest(z, "norm").statistic # sup distance between cdfs
inside = np.mean(np.abs(z) <= 1.96)
print(f"n = {n:3d} KS distance {ks:.3f} P(|Z_n| <= 1.96) = {inside:.3f}")
# n = 5 KS distance 0.063 P(|Z_n| <= 1.96) = 0.955
# n = 30 KS distance 0.021 P(|Z_n| <= 1.96) = 0.952
# n = 200 KS distance 0.008 P(|Z_n| <= 1.96) = 0.951Key takeaways — chapter 2
- Almost-sure and L^p convergence each imply convergence in probability, which implies convergence in law; the converses fail.
- Borel–Cantelli turns summable probabilities into almost-sure statements; it proves the strong law under a fourth moment.
- The empirical mean converges to the mean, and its fluctuations at scale 1/\sqrt{n} are Gaussian with the covariance of one observation.
- Slutsky’s lemma lets one replace unknown variances by consistent estimates; the delta method carries asymptotic normality through differentiable maps.
3. Concentration inequalities
The central limit theorem describes fluctuations only in the limit. Learning theory, bandits and the analysis of algorithms need bounds valid for every n, with explicit constants. This chapter derives them from one idea: apply Markov’s inequality to an exponential.
Proposition 3.1 — Chernoff bound For a real variable X and t > 0,
\mathbb{P}(X - \mathbb{E}X \ge t) \le \inf_{\lambda > 0}\ e^{-\lambda t}\, \mathbb{E}\big[e^{\lambda (X - \mathbb{E}X)}\big].
Proof. For \lambda > 0 the event is \{e^{\lambda(X - \mathbb{E}X)} \ge e^{\lambda t}\}; apply Markov’s inequality, then optimize over \lambda.
For a sum of independent variables, the moment generating function is a product (Definition 0.5). This is what makes the bound sharp for sums.
Definition 3.2 — Sub-Gaussian variable A centred real variable X is sub-Gaussian with variance proxy \sigma^2 if
\mathbb{E}\big[e^{\lambda X}\big] \le e^{\lambda^2 \sigma^2 / 2} \qquad \text{for every } \lambda \in \mathbb{R}.
Examples:
- \mathcal{N}(0, \sigma^2), with equality;
- a fair random sign, with \sigma^2 = 1, since \cosh \lambda \le e^{\lambda^2/2};
- every centred variable with values in an interval of length \ell, with \sigma^2 = \ell^2/4 (Lemma 3.4).
If independent X_i have proxies \sigma_i^2, then \sum_i X_i has proxy \sum_i \sigma_i^2, because the moment generating functions multiply.
Proposition 3.3 — Sub-Gaussian tails If X is sub-Gaussian with proxy \sigma^2, then for every t > 0
\mathbb{P}(X \ge t) \le e^{-t^2/(2\sigma^2)}, \qquad \mathbb{P}(|X| \ge t) \le 2\, e^{-t^2/(2\sigma^2)}.
Proof. In Proposition 3.1, the exponent -\lambda t + \lambda^2\sigma^2/2 is smallest at \lambda = t/\sigma^2, where it equals -t^2/(2\sigma^2). Apply the result to X and -X. Conversely, tails of this form imply the bound on the moment generating function, up to a constant factor on \sigma^2 (Vershynin, 2018, §2.5).
Lemma 3.4 — Hoeffding’s lemma If X \in [a, b] almost surely and \mathbb{E}X = 0, then for every real \lambda
\mathbb{E}\big[e^{\lambda X}\big] \le \exp\Big(\frac{\lambda^2 (b - a)^2}{8}\Big).
Proof. Let \psi(\lambda) = \log \mathbb{E}[e^{\lambda X}]. Then \psi(0) = 0 and \psi'(0) = \mathbb{E}X = 0.
The second derivative \psi''(\lambda) is the variance of X under the tilted law, whose density with respect to the law of X is proportional to e^{\lambda x}. That law also lives on [a, b], and any variable with values in [a, b] has variance at most
\mathbb{E}\Big[\Big(X - \frac{a+b}{2}\Big)^2\Big] \le \frac{(b - a)^2}{4}.
Taylor’s formula with \psi(0) = \psi'(0) = 0 then gives \psi(\lambda) \le \lambda^2 (b-a)^2/8. ∎
Theorem 3.5 — Hoeffding’s inequality Let X_1, \dots, X_n be independent, with X_i \in [a_i, b_i]. For every t > 0,
\mathbb{P}\Big(\sum_{i=1}^n (X_i - \mathbb{E}X_i) \ge t\Big) \le \exp\Big(-\frac{2t^2}{\sum_{i}(b_i - a_i)^2}\Big).
For i.i.d. variables with values in [0, 1] and mean \mu:
Key result — Hoeffding for an empirical mean
\mathbb{P}\big(|\bar X_n - \mu| \ge t\big) \le 2\, e^{-2 n t^2}
Proof. By Lemma 3.4, each X_i - \mathbb{E}X_i is sub-Gaussian with proxy (b_i - a_i)^2/4. The sum has proxy \sigma^2 = \sum_i (b_i - a_i)^2/4 (Definition 3.2), and Proposition 3.3 gives e^{-t^2/(2\sigma^2)}, which is the bound. For the mean, take t replaced by nt, and add the two one-sided bounds. ∎
Example 3.6 — How many test samples? To estimate the mean of a [0, 1]-valued variable within \varepsilon = 0.01 with probability 0.99, Hoeffding asks for 2e^{-2n\varepsilon^2} \le 0.01:
n \ge \frac{\log(2/0.01)}{2\varepsilon^2} = 26\,492.
Chebyshev’s inequality with the worst variance 1/4 asks for n \ge 1/(4 \times 0.01 \times \varepsilon^2) = 250\,000. Solving the key result for t instead gives the interval of the introduction: with n = 1000 and confidence 0.95, the half-width is \sqrt{\log(40)/2000} = 0.043.
Hoeffding’s inequality only sees the range of the variables. When the variance is much smaller than the squared range, as for rare events, Bernstein’s inequality is much sharper.
Theorem 3.7 — Bernstein’s inequality Let X_1, \dots, X_n be independent and centred, with |X_i| \le b and \sum_i \mathbb{E}X_i^2 = v. For every t > 0,
\mathbb{P}\Big(\sum_{i=1}^n X_i \ge t\Big) \le \exp\Big(-\frac{t^2}{2\,(v + bt/3)}\Big).
Proof. Fix 0 < \lambda < 3/b. Expand the exponential, bound |\mathbb{E}X_i^k| \le b^{k-2}\,\mathbb{E}X_i^2, and use k! \ge 2 \cdot 3^{k-2}:
\mathbb{E}\big[e^{\lambda X_i}\big] \le 1 + \frac{\lambda^2\, \mathbb{E}X_i^2}{2} \sum_{k \ge 2} \Big(\frac{\lambda b}{3}\Big)^{k-2} \le \exp\Big(\frac{\lambda^2\, \mathbb{E}X_i^2}{2(1 - \lambda b/3)}\Big).
Multiply over i and apply Proposition 3.1 with \lambda = t/(v + bt/3); the exponent simplifies to -t^2/(2(v + bt/3)). ∎
For small t, the bound is Gaussian with the true variance v; for large t, it decays exponentially. Union bounds over many variables cost only a logarithm:
Proposition 3.8 — Maximum of sub-Gaussian variables Let X_1, \dots, X_N be centred and sub-Gaussian with proxy \sigma^2, independent or not. Then
\mathbb{E}\Big[\max_{i \le N} X_i\Big] \le \sigma \sqrt{2 \log N}, \qquad \mathbb{P}\Big(\max_{i \le N} X_i \ge \sigma\sqrt{2 \log N} + u\Big) \le e^{-u^2/(2\sigma^2)}.
Proof. By Jensen’s inequality and a sum bounding a maximum, for \lambda > 0,
e^{\lambda\, \mathbb{E}\max_i X_i} \le \mathbb{E}\big[e^{\lambda \max_i X_i}\big] \le \sum_{i=1}^N \mathbb{E}\big[e^{\lambda X_i}\big] \le N e^{\lambda^2 \sigma^2/2}.
Take logarithms and choose \lambda = \sqrt{2 \log N}/\sigma. For the tail, the union bound gives N e^{-s^2/(2\sigma^2)} at level s; at s = \sigma\sqrt{2\log N} + u, one has s^2 \ge 2\sigma^2 \log N + u^2. ∎
The \log N is the price of choosing the best of N predictors on the same data, the first step of generalization bounds in statistical learning.
The code compares the bounds on \mathbb{P}(\bar X_n - p \ge 0.02) for n = 1000 Bernoulli variables with p = 0.05. The variance p(1-p) = 0.0475 is far below the squared range 1: Bernstein wins by a factor 18 over Hoeffding.
import numpy as np
from scipy import stats
n, p, t = 1000, 0.05, 0.02
exact = stats.binom.sf(np.ceil(n * (p + t)) - 1, n, p) # P(mean - p >= t)
cheb = p * (1 - p) / (n * t**2)
hoeff = np.exp(-2 * n * t**2)
bern = np.exp(-n * t**2 / (2 * (p * (1 - p) + t / 3))) # |X_i - p| <= 1
print(f"exact {exact:.1e} Chebyshev {cheb:.1e} Hoeffding {hoeff:.1e} Bernstein {bern:.1e}")
# exact 3.5e-03 Chebyshev 1.2e-01 Hoeffding 4.5e-01 Bernstein 2.5e-02Key takeaways — chapter 3
- Chernoff’s method: Markov’s inequality on e^{\lambda X}, then optimize \lambda; for independent sums, the moment generating functions multiply.
- Sub-Gaussian variables have Gaussian-type tails; bounded variables are sub-Gaussian with proxy a quarter of the squared range (Hoeffding’s lemma).
- Hoeffding: a mean of n variables in [0, 1] deviates by t with probability at most 2e^{-2nt^2}.
- Bernstein replaces the range by the variance for small deviations, which matters for rare events.
- The maximum of N sub-Gaussian variables exceeds its scale by only \sqrt{2 \log N}.
4. Point estimation: likelihood, Fisher information, Cramér–Rao
A statistical model is a family of laws indexed by a parameter, and the data are drawn from one of them. This chapter measures the quality of an estimator of the parameter, builds the maximum-likelihood estimator, and proves that no unbiased estimator can beat the Fisher information, a bound that maximum likelihood attains asymptotically.
Definition 4.1 — Model, estimator, bias, quadratic risk A statistical model is a family (P_\theta)_{\theta \in \Theta} of laws; the observations X_1, \dots, X_n are i.i.d. with law P_\theta. An estimator is a measurable function \hat\theta_n = T(X_1, \dots, X_n) of the data. Its bias is b(\theta) = \mathbb{E}_\theta \hat\theta_n - \theta, and expanding around \mathbb{E}_\theta \hat\theta_n gives the bias–variance decomposition of the quadratic risk:
\mathbb{E}_\theta\big[(\hat\theta_n - \theta)^2\big] = b(\theta)^2 + \mathrm{Var}_\theta(\hat\theta_n).
The estimator is consistent if \hat\theta_n \to \theta in probability under P_\theta, for every \theta.
Example 4.2 — Unbiased is not always better For Gaussian data \mathcal{N}(\mu, \sigma^2), compare two estimators of \sigma^2:
S^2 = \frac{1}{n-1} \sum_{i=1}^n (X_i - \bar X_n)^2, \qquad \hat\sigma^2 = \frac{n-1}{n}\, S^2.
S^2 is unbiased, and a fourth-moment computation gives \mathrm{Var}(S^2) = 2\sigma^4/(n-1). The estimator \hat\sigma^2 has bias -\sigma^2/n, and its risk is (2n - 1)\sigma^4/n^2. For n = 10:
\text{risk}(S^2) = 0.222\,\sigma^4, \qquad \text{risk}(\hat\sigma^2) = 0.190\,\sigma^4.
Accepting a small bias lowers the variance by more: this trade-off returns with ridge regression in ch. 6.
Definition 4.3 — Likelihood and maximum-likelihood estimator Suppose that each P_\theta has a density p_\theta with respect to a fixed measure. The log-likelihood of the sample and the maximum-likelihood estimator (MLE) are
\ell_n(\theta) = \sum_{i=1}^n \log p_\theta(X_i), \qquad \hat\theta_n \in \arg\max_{\theta \in \Theta} \ell_n(\theta).
Maximizing \ell_n/n minimizes the empirical cross-entropy. Under P_{\theta_0}, its expectation is the entropy of p_{\theta_0} plus the Kullback–Leibler divergence from p_{\theta_0} to p_\theta. The MLE thus targets the closest law of the model in this divergence. The training loss of most neural classifiers is exactly this negative log-likelihood.
The usual cases follow by setting the derivative of \ell_n to zero:
- Bernoulli \mathcal{B}(p) and Poisson \mathcal{P}(\lambda): the MLE is the empirical mean \bar X_n;
- exponential \mathcal{E}(\lambda): \hat\lambda = 1/\bar X_n;
- Gaussian \mathcal{N}(\mu, \sigma^2): \hat\mu = \bar X_n, and \hat\sigma^2 of Example 4.2.
Definition 4.4 — Score and Fisher information Call the model regular when \theta \mapsto \log p_\theta(x) is twice differentiable and derivatives can be taken under the integral sign. The score and the Fisher information are
s_\theta(x) = \nabla_\theta \log p_\theta(x), \qquad I(\theta) = \mathbb{E}_\theta\big[s_\theta(X)\, s_\theta(X)^\top\big].
Proposition 4.5 — Properties of the score In a regular model, \mathbb{E}_\theta[s_\theta(X)] = 0, and
I(\theta) = -\,\mathbb{E}_\theta\big[\nabla^2_\theta \log p_\theta(X)\big].
For n i.i.d. observations, the information of the sample is n\, I(\theta).
Proof. Differentiate \int p_\theta = 1: \int \nabla_\theta p_\theta = \int s_\theta\, p_\theta = 0. Differentiate once more, writing \nabla p_\theta = s_\theta\, p_\theta:
\int \big(\nabla^2_\theta \log p_\theta\big)\, p_\theta + \int s_\theta s_\theta^\top\, p_\theta = 0.
The score of the sample is a sum of n independent centred terms, so its covariance is n\, I(\theta). ∎
Theorem 4.6 — Cramér–Rao bound Let the model be regular with \Theta \subset \mathbb{R} and I(\theta) > 0. Let T be an unbiased estimator of g(\theta) from n i.i.d. observations, with g differentiable. Then
\mathrm{Var}_\theta(T) \ge \frac{g'(\theta)^2}{n\, I(\theta)}.
Proof. Let S = \sum_i s_\theta(X_i) be the score of the sample: it has mean 0 and variance n I(\theta). Differentiating \mathbb{E}_\theta T = g(\theta) under the integral gives
g'(\theta) = \mathbb{E}_\theta[T S] = \mathrm{Cov}_\theta(T, S).
The Cauchy–Schwarz inequality bounds this covariance, and \mathrm{Var}_\theta(S) = n I(\theta) gives the claim:
g'(\theta)^2 \le \mathrm{Var}_\theta(T)\, \mathrm{Var}_\theta(S).
∎
For a vector parameter, the same argument gives \mathrm{Cov}_\theta(T) \succeq I(\theta)^{-1}/n for every unbiased T of \theta. An unbiased estimator that attains the bound is called efficient.
Example 4.7 — Efficient or not
- Poisson: the score is x/\lambda - 1, so I(\lambda) = 1/\lambda. The bound \lambda/n equals the variance of \bar X_n, which is efficient.
- Exponential: I(\lambda) = 1/\lambda^2, so unbiased estimators of \lambda have variance at least \lambda^2/n. The MLE 1/\bar X_n has mean n\lambda/(n-1), and its unbiased correction has variance
\mathrm{Var}\Big(\frac{n-1}{n \bar X_n}\Big) = \frac{\lambda^2}{n - 2} > \frac{\lambda^2}{n}.
No estimator is efficient here for finite n, but the gap vanishes as n \to \infty.
Theorem 4.8 — Asymptotic normality of the MLE Assume the model is regular (Definition 4.4) and identifiable, \theta_0 is interior to \Theta, I(\theta_0) is invertible, and the third derivatives of \log p_\theta are dominated by an integrable function near \theta_0 (van der Vaart, 1998, §5.5–5.6 gives weaker conditions). Then a consistent MLE satisfies
Key result — the MLE is asymptotically efficient
\sqrt{n}\,\big(\hat\theta_n - \theta_0\big) \xrightarrow{\text{law}} \mathcal{N}\big(0,\ I(\theta_0)^{-1}\big)
Proof. Sketch for a real parameter. The MLE solves \ell_n'(\hat\theta_n) = 0. A Taylor expansion around \theta_0, with \tilde\theta_n between \theta_0 and \hat\theta_n, gives
\sqrt{n}\,(\hat\theta_n - \theta_0) = \frac{\ell_n'(\theta_0)/\sqrt{n}}{-\ell_n''(\tilde\theta_n)/n}.
- The numerator is \sqrt{n} times a mean of centred scores: it tends in law to \mathcal{N}(0, I(\theta_0)) by the central limit theorem and Proposition 4.5.
- The denominator tends to I(\theta_0) in probability, by the law of large numbers and the domination assumption.
Slutsky’s lemma gives the limit \mathcal{N}(0, I(\theta_0)/I(\theta_0)^2). ∎
The theorem gives the Wald interval \hat\theta_n \pm 1.96/\sqrt{n I(\hat\theta_n)}, and it says that maximum likelihood attains the Cramér–Rao bound in the limit.
The code checks it on the Cauchy location model, p_\theta(x) = 1/(\pi(1 + (x - \theta)^2)), whose Fisher information is 1/2. The sample mean is useless here: a mean of Cauchy variables is again Cauchy. The median is consistent, with asymptotic variance \pi^2/(4n); the MLE does better, with 2/n.
import numpy as np
from scipy import optimize
rng = np.random.default_rng(4)
def mle_cauchy(x):
nll = lambda th: np.sum(np.log1p((x - th) ** 2)) # minus log-likelihood + const
m = np.median(x)
return optimize.minimize_scalar(nll, bounds=(m - 2, m + 2), method="bounded").x
n, reps = 200, 2000
X = rng.standard_cauchy((reps, n)) # true location 0
mle = np.array([mle_cauchy(x) for x in X])
med = np.median(X, axis=1)
print(f"n Var(MLE) = {n * mle.var():.2f} (1/I = 2)")
print(f"n Var(median) = {n * med.var():.2f} (pi^2/4 = {np.pi**2 / 4:.2f})")
# n Var(MLE) = 2.08 (1/I = 2)
# n Var(median) = 2.59 (pi^2/4 = 2.47)Key takeaways — chapter 4
- The quadratic risk of an estimator is its squared bias plus its variance; a small bias can buy a large variance reduction.
- Maximum likelihood minimizes an empirical cross-entropy, that is, a Kullback–Leibler divergence to the data.
- The score has mean zero, and its covariance, the Fisher information, is also minus the mean Hessian of the log-density.
- Cramér–Rao: an unbiased estimator has variance at least g'(\theta)^2/(n I(\theta)).
- Under regularity, the MLE is asymptotically Gaussian with covariance I(\theta_0)^{-1}/n: it attains the bound in the limit.
5. Confidence intervals and hypothesis tests
Self-study chapter. An estimate without its uncertainty cannot support a decision. This chapter turns the laws of ch. 2 and ch. 4 into intervals that contain the parameter with a prescribed probability, and into tests that control the probability of a false discovery, including when many tests are run at once.
Definition 5.1 — Confidence region, pivot A confidence region of level 1 - \alpha is a random set C(X) such that
\mathbb{P}_\theta\big(\theta \in C(X)\big) \ge 1 - \alpha \qquad \text{for every } \theta.
It is asymptotic when the inequality holds in the limit n \to \infty. A pivot is a function Q(X, \theta) whose law does not depend on \theta. If \mathbb{P}(q_1 \le Q \le q_2) = 1 - \alpha, the set of \theta with q_1 \le Q(X, \theta) \le q_2 is a confidence region.
Definition 5.2 — Chi-square and Student laws Let Z, Z_1, \dots, Z_k be i.i.d. \mathcal{N}(0, 1), and V independent of Z.
- \chi^2_k is the law of Z_1^2 + \dots + Z_k^2. It is the Gamma law \Gamma(k/2, 1/2), with mean k and variance 2k.
- If V \sim \chi^2_k, then Z / \sqrt{V/k} follows the Student law t_k. Its tails are heavier than Gaussian tails, and t_k \to \mathcal{N}(0, 1) in law as k \to \infty.
Theorem 5.3 — Fisher–Cochran Let Z \sim \mathcal{N}(0, \sigma^2 I_n) and let E be a subspace of \mathbb{R}^n of dimension k.
Write P_E and P_{E^\perp} for the orthogonal projections onto E and onto its orthogonal complement. Then P_E Z and P_{E^\perp} Z are independent, and
\frac{\|P_E Z\|^2}{\sigma^2} \sim \chi^2_k, \qquad \frac{\|P_{E^\perp} Z\|^2}{\sigma^2} \sim \chi^2_{n-k}.
Proof. Choose an orthonormal basis u_1, \dots, u_n whose first k vectors span E, and let U be the orthogonal matrix with these columns. By Proposition 1.7, W = U^\top Z \sim \mathcal{N}(0, \sigma^2 I_n), so the coordinates W_i are independent.
Now P_E Z = \sum_{i \le k} W_i u_i depends only on W_1, \dots, W_k, and P_{E^\perp} Z only on the others. The squared norms are \sum_{i \le k} W_i^2 and \sum_{i > k} W_i^2. ∎
Corollary 5.4 — Student’s theorem If X_1, \dots, X_n are i.i.d. \mathcal{N}(\mu, \sigma^2), then \bar X_n and S^2 (Example 4.2) are independent, (n-1) S^2 / \sigma^2 \sim \chi^2_{n-1}, and
\frac{\sqrt{n}\,(\bar X_n - \mu)}{S} \sim t_{n-1}.
Proof. Apply Theorem 5.3 to Z = X - \mu \mathbf{1}, with E the line spanned by \mathbf{1} = (1, \dots, 1).
The projection on E is (\bar X_n - \mu)\mathbf{1}. The projection on E^\perp is the vector of residuals X_i - \bar X_n, whose squared norm is (n-1)S^2. Definition 5.2 concludes. ∎
Example 5.5 — A Student interval Ten measurements give \bar X = 5.2 and S = 0.8. The pivot of Corollary 5.4 gives the exact 95 % interval \bar X \pm t_{9,\,0.975}\, S/\sqrt{10}, with t_{9,\,0.975} = 2.262:
5.2 \pm 2.262 \times 0.253 = 5.2 \pm 0.572, \qquad \text{that is } [4.63,\ 5.77].
Replacing 2.262 by the Gaussian quantile 1.96 would give the half-width 0.496, an interval that covers less than 95 % of the time.
When no exact pivot exists, the asymptotic normality of the MLE (Theorem 4.8) gives the Wald interval \hat\theta \pm z_{1-\alpha/2}/\sqrt{n I(\hat\theta)}. Its coverage can be poor at moderate n; the code at the end of the chapter measures it for a proportion.
Definition 5.6 — Test, errors, level, power, p-value A test of H_0 : \theta \in \Theta_0 against H_1 : \theta \in \Theta_1 is a rejection region R: one rejects H_0 when X \in R.
- A type I error rejects a true H_0; the test has level \alpha if \mathbb{P}_\theta(X \in R) \le \alpha for every \theta \in \Theta_0.
- A type II error keeps a false H_0; the power at \theta \in \Theta_1 is \mathbb{P}_\theta(X \in R).
- For a family of regions R_\alpha increasing in \alpha, the p-value is the smallest level at which the data are rejected: p(X) = \inf\{\alpha : X \in R_\alpha\}.
Proposition 5.7 — Under the null, a p-value is uniform Suppose the test rejects for large values of a statistic T whose distribution function F under a simple H_0 is continuous. Then p = 1 - F(T), and
\mathbb{P}_{H_0}(p \le \alpha) = \alpha \qquad \text{for every } \alpha \in [0, 1].
Proof. When F is continuous, F(T) is uniform on [0, 1] under H_0 (the inversion argument of Example 0.4, read backwards). Hence 1 - F(T) is uniform too. ∎
A p-value is therefore a random variable, uniform when nothing happens. It is not the probability that H_0 is true, and a small p-value says nothing about the size of an effect (Wasserstein and Lazar, 2016).
Theorem 5.8 — Neyman–Pearson lemma Let H_0 and H_1 be simple hypotheses, with densities p_0 and p_1.
For k > 0, let \varphi^* be the likelihood-ratio test, which rejects when p_1(X) > k\, p_0(X), and let \alpha be its level:
\alpha = \mathbb{P}_0\big(p_1(X) > k\, p_0(X)\big).
Every test \varphi of level at most \alpha has power at most that of \varphi^*.
Proof. Write tests as functions with values in \{0, 1\}. Pointwise, (\varphi^* - \varphi)(p_1 - k\, p_0) \ge 0: where p_1 > k p_0, \varphi^* = 1 \ge \varphi; elsewhere \varphi^* = 0 \le \varphi. Integrating,
\mathbb{E}_1 \varphi^* - \mathbb{E}_1 \varphi \ \ge\ k\, \big(\mathbb{E}_0 \varphi^* - \mathbb{E}_0 \varphi\big) \ \ge\ 0.
∎
Example 5.9 — The z-test and its power Let X_i \sim \mathcal{N}(\mu, 1), and test \mu = 0 against \mu = \mu_1 > 0. The likelihood ratio is an increasing function of \bar X_n, so the most powerful test of level 5\,\% rejects when \sqrt{n}\,\bar X_n > 1.645.
With n = 25 and \mu_1 = 0.5, its power is
\mathbb{P}\big(Z > 1.645 - 0.5\sqrt{25}\big) = \Phi(0.855) = 0.804.
The region does not depend on \mu_1, so the same test is most powerful against every \mu_1 > 0: it is uniformly most powerful.
Tests and intervals are two faces of one object. If, for every \theta_0, R(\theta_0) is a level-\alpha test of \theta = \theta_0, the set of \theta_0 that are not rejected is a confidence region of level 1 - \alpha.
Theorem 5.10 — Likelihood-ratio test (Wilks) Let \Theta \subset \mathbb{R}^d and let \Theta_0 be a smooth sub-model of dimension d_0. Under the regularity of Theorem 4.8 and under H_0,
2\Big(\sup_{\Theta} \ell_n - \sup_{\Theta_0} \ell_n\Big) \xrightarrow{\text{law}} \chi^2_{d - d_0}.
Sketch for \Theta_0 = \{\theta_0\}. Expand \ell_n to second order around \hat\theta_n, where its gradient vanishes:
2\big(\ell_n(\hat\theta_n) - \ell_n(\theta_0)\big) \approx n\,(\hat\theta_n - \theta_0)^\top I(\theta_0)\,(\hat\theta_n - \theta_0).
By Theorem 4.8, this is the squared norm of an asymptotically \mathcal{N}(0, I_d) vector. Full proof: van der Vaart (1998, ch. 16).
Running many tests multiplies the chances of a false discovery. With m = 20 independent tests at level 0.05 and no true effect, the probability of at least one rejection is 1 - 0.95^{20} = 0.64.
Definition 5.11 — Family-wise error rate and false discovery rate Among m tested hypotheses, let V be the number of true nulls rejected and R the total number of rejections. The family-wise error rate is \mathbb{P}(V \ge 1). The false discovery rate is
\mathrm{FDR} = \mathbb{E}\Big[\frac{V}{\max(R, 1)}\Big].
Proposition 5.12 — Bonferroni and Benjamini–Hochberg
- Bonferroni: rejecting the hypotheses with p_i \le \alpha/m gives a family-wise error rate at most \alpha, under any dependence. Proof: a union bound over the m_0 \le m true nulls, each rejected with probability at most \alpha/m by Proposition 5.7.
- Benjamini–Hochberg: sort the p-values, p_{(1)} \le \dots \le p_{(m)}, let k be the largest i with p_{(i)} \le i\alpha/m, and reject the k smallest. For independent p-values, the false discovery rate is at most m_0 \alpha / m \le \alpha (Benjamini and Hochberg, 1995).
The code computes the exact coverage of two 95 % intervals for a proportion with n = 50, summing over the 51 possible outcomes. The Wald interval \hat p \pm 1.96\sqrt{\hat p(1-\hat p)/n} undercovers, badly near 0. The Wilson interval inverts the score test, that is, solves |\hat p - p| \le z\sqrt{p(1-p)/n} for p:
\frac{\hat p + \frac{z^2}{2n}}{1 + \frac{z^2}{n}} \ \pm\ \frac{z}{1 + \frac{z^2}{n}} \sqrt{\frac{\hat p(1 - \hat p)}{n} + \frac{z^2}{4n^2}}.
import numpy as np
from scipy import stats
n, z = 50, stats.norm.ppf(0.975)
k = np.arange(n + 1) # every possible number of successes
ph = k / n
half = z * np.sqrt(ph * (1 - ph) / n)
wald = (ph - half, ph + half)
c = (ph + z**2 / (2 * n)) / (1 + z**2 / n)
h = z * np.sqrt(ph * (1 - ph) / n + z**2 / (4 * n**2)) / (1 + z**2 / n)
wilson = (c - h, c + h)
for p in [0.05, 0.2, 0.5]:
w = stats.binom.pmf(k, n, p) # exact coverage, no simulation
cover = lambda I: np.sum(w * ((I[0] <= p) & (p <= I[1])))
print(f"p = {p:.2f} coverage: Wald {cover(wald):.3f} Wilson {cover(wilson):.3f}")
# p = 0.05 coverage: Wald 0.920 Wilson 0.962
# p = 0.20 coverage: Wald 0.938 Wilson 0.951
# p = 0.50 coverage: Wald 0.935 Wilson 0.935Key takeaways — chapter 5
- A confidence region comes from a pivot; for Gaussian samples, Fisher–Cochran makes \sqrt{n}(\bar X - \mu)/S an exact Student pivot.
- A test controls the type I error at level \alpha; its power is the probability of rejecting under the alternative; tests and confidence regions are dual.
- Under a simple null with a continuous statistic, the p-value is uniform: it is not the probability that the null is true.
- Neyman–Pearson: the likelihood-ratio test is most powerful between simple hypotheses; Wilks gives the \chi^2 calibration of likelihood ratios in general.
- Many tests need a correction: Bonferroni for the family-wise error, Benjamini–Hochberg for the false discovery rate.
6. Linear regression
Self-study chapter. Linear regression explains a response by covariates. Least squares is the orthogonal projection of ch. 1 applied to data, and in the Gaussian model the Fisher–Cochran theorem of ch. 5 makes its uncertainty exact. Ridge regression then shows the bias–variance trade-off of ch. 4 at work.
Definition 6.1 — Linear model, least squares The linear model is y = X\beta + \varepsilon, with a fixed design X \in \mathbb{R}^{n \times p} of rank p and a parameter \beta \in \mathbb{R}^p. The noise satisfies \mathbb{E}\varepsilon = 0 and \mathrm{Cov}(\varepsilon) = \sigma^2 I_n.
The least-squares estimator minimizes \|y - X\beta\|^2:
\hat\beta = (X^\top X)^{-1} X^\top y, \qquad \hat y = X\hat\beta = H y, \quad H = X (X^\top X)^{-1} X^\top.
The hat matrix H is the orthogonal projection onto the column space of X; the residual y - \hat y = (I - H)y is orthogonal to every column.
Proposition 6.2 — Mean and covariance The estimator \hat\beta is unbiased, with covariance \sigma^2 (X^\top X)^{-1}, and the residual variance below is an unbiased estimator of \sigma^2:
\hat\sigma^2 = \frac{\|y - X\hat\beta\|^2}{n - p}.
Proof. \hat\beta - \beta = (X^\top X)^{-1} X^\top \varepsilon, which has mean 0 and covariance \sigma^2 (X^\top X)^{-1}. The residual is (I - H)\varepsilon, since (I - H)X = 0, and
\mathbb{E}\|(I - H)\varepsilon\|^2 = \sigma^2\, \mathrm{tr}(I - H) = \sigma^2 (n - p),
because the trace of a projection is its rank. ∎
Theorem 6.3 — Gauss–Markov Among the linear unbiased estimators of \beta, least squares has the smallest covariance: for every \tilde\beta = Ay that is unbiased for all \beta,
\mathrm{Cov}(\tilde\beta) - \mathrm{Cov}(\hat\beta) \succeq 0.
Proof. Unbiasedness for every \beta forces AX = I. Write A = (X^\top X)^{-1} X^\top + D; then DX = 0. The cross terms vanish in the covariance:
\mathrm{Cov}(\tilde\beta) = \sigma^2 A A^\top = \sigma^2 (X^\top X)^{-1} + \sigma^2 D D^\top,
and D D^\top is positive semidefinite. ∎
Theorem 6.4 — The Gaussian linear model If moreover \varepsilon \sim \mathcal{N}(0, \sigma^2 I_n), then:
- \hat\beta is the MLE of \beta, and \hat\beta \sim \mathcal{N}(\beta, \sigma^2 V) with V = (X^\top X)^{-1};
- (n - p)\,\hat\sigma^2 / \sigma^2 \sim \chi^2_{n-p}, independent of \hat\beta;
- for each coordinate j, with v_j the j-th diagonal entry of V,
\frac{\hat\beta_j - \beta_j}{\hat\sigma \sqrt{v_j}} \sim t_{n-p}.
Proof.
\hat\beta is an affine image of \varepsilon (Proposition 1.7). The log-likelihood is -\|y - X\beta\|^2/(2\sigma^2) up to terms free of \beta, so it is maximized by least squares.
Apply Theorem 5.3 to \varepsilon with E the column space of X. The residual is (I - H)\varepsilon, and \hat\beta - \beta = (X^\top X)^{-1} X^\top H\varepsilon depends on H\varepsilon only.
Combine (1), (2) and Definition 5.2. ∎
Item 3 gives the 95 % interval and the t-test of \beta_j = 0 printed by every regression software:
\hat\beta_j \pm t_{n-p,\,0.975}\; \hat\sigma \sqrt{v_j}.
Comparing nested models uses the ratio of two independent \chi^2 variables, the F-test.
Proposition 6.5 — Each parameter costs \sigma^2/n The in-sample prediction error of least squares is
\frac{1}{n}\, \mathbb{E}\big\|X\hat\beta - X\beta\big\|^2 = \frac{\sigma^2 p}{n}.
Proof. X(\hat\beta - \beta) = H\varepsilon, whose mean squared norm is \sigma^2\, \mathrm{tr}(H); the trace of the projection H is its rank p.
When p approaches n, or when columns of X are nearly collinear, (X^\top X)^{-1} has huge entries and least squares becomes unstable. Ridge regression adds a penalty.
Definition 6.6 — Ridge regression For \lambda > 0, the ridge estimator minimizes \|y - X\beta\|^2 + \lambda \|\beta\|^2:
\hat\beta_\lambda = (X^\top X + \lambda I_p)^{-1} X^\top y.
Proposition 6.7 — Ridge beats least squares for small \lambda Let X^\top X = \sum_j d_j u_j u_j^\top be an eigendecomposition and b_j = u_j^\top \beta. The quadratic risk of ridge is
\mathbb{E}\|\hat\beta_\lambda - \beta\|^2 = \sum_{j=1}^p \frac{\lambda^2 b_j^2 + \sigma^2 d_j}{(d_j + \lambda)^2}.
Its derivative at \lambda = 0 is -2\sigma^2 \sum_j d_j^{-2} < 0: some \lambda > 0 always beats least squares (Hoerl and Kennard, 1970).
Proof. In the eigenbasis, the j-th coordinate of \hat\beta_\lambda is
u_j^\top \hat\beta_\lambda = \frac{d_j b_j + u_j^\top X^\top \varepsilon}{d_j + \lambda},
and the noise terms u_j^\top X^\top \varepsilon are uncorrelated, with variances \sigma^2 d_j. The bias of the coordinate is -\lambda b_j/(d_j + \lambda), and its variance is \sigma^2 d_j/(d_j + \lambda)^2.
Sum the squared biases and the variances (Definition 4.1), then differentiate each term at \lambda = 0. ∎
Ridge trades a bias for a variance reduction, as in Example 4.2; ch. 7 reads it as a Bayesian posterior mean. The code checks Theorem 6.4 by simulation: the three t-intervals of a regression with n = 40 and p = 3 cover their coefficients 95 % of the time.
import numpy as np
from scipy import stats
rng = np.random.default_rng(6)
n, p, sigma = 40, 3, 1.5
X = np.column_stack([np.ones(n), rng.standard_normal((n, p - 1))])
beta = np.array([1.0, 2.0, 0.0])
G = np.linalg.inv(X.T @ X)
q = stats.t.ppf(0.975, n - p)
hits, reps = np.zeros(p), 5000
for _ in range(reps):
y = X @ beta + sigma * rng.standard_normal(n)
b = G @ X.T @ y # least-squares estimate
s2 = np.sum((y - X @ b) ** 2) / (n - p) # unbiased noise variance
hits += np.abs(b - beta) <= q * np.sqrt(s2 * np.diag(G))
print("coverage of the three 95% t-intervals:", np.round(hits / reps, 3))
# coverage of the three 95% t-intervals: [0.945 0.945 0.95 ]Key takeaways — chapter 6
- Least squares projects y onto the column space of X; it is unbiased with covariance \sigma^2 (X^\top X)^{-1}, and the residual sum of squares over n - p estimates \sigma^2.
- Gauss–Markov: least squares is the best linear unbiased estimator, with no Gaussian assumption.
- With Gaussian noise, coefficients follow exact Student laws, which give the t-intervals and t-tests of regression tables.
- Each parameter adds \sigma^2/n to the prediction error; ridge shrinks the estimator and always beats least squares for a small enough \lambda.
7. Bayesian basics
Self-study chapter. The Bayesian approach treats the parameter as random, with a prior law that encodes what is known before the data. The data turn the prior into a posterior law, and every estimate, interval and decision is read off the posterior. Conditional expectation (ch. 1) and Gaussian conditioning do most of the work.
Definition 7.1 — Prior, likelihood, posterior A prior is a law \pi on \Theta, and the model density p_\theta(x) is read as the conditional density of X given \theta. Bayes’ formula gives the posterior density:
\pi(\theta \mid x_{1:n}) = \frac{\pi(\theta) \prod_{i} p_\theta(x_i)}{\int_\Theta \pi(\theta') \prod_{i} p_{\theta'}(x_i)\, d\theta'} \ \propto\ \pi(\theta)\, L_n(\theta).
The denominator is the marginal likelihood, or evidence; it is used to compare models.
Proposition 7.2 — Bayes estimators Under the squared loss, the estimator that minimizes the posterior expected loss is the posterior mean \mathbb{E}[\theta \mid X]. It also minimizes the Bayes risk, the quadratic risk averaged over the prior. Under the absolute loss, the minimizer is the posterior median.
Proof. Apply Theorem 1.3 to the pair (\theta, X): the posterior mean is the conditional expectation of \theta given the data. The posterior mode, the MAP estimator, has no such optimality in general but is often easier to compute.
Example 7.3 — Beta–Bernoulli conjugacy With a prior \mathrm{Beta}(a, b) on p and k successes in n Bernoulli trials, the posterior density is proportional to p^{a + k - 1}(1 - p)^{b + n - k - 1}:
p \mid \text{data} \ \sim\ \mathrm{Beta}(a + k,\ b + n - k), \qquad \mathbb{E}[p \mid \text{data}] = \frac{a + k}{a + b + n}.
The posterior mean is a weighted average of the prior mean a/(a+b) and of k/n, with weights a + b and n.
For the classifier of the introduction, a uniform prior (a = b = 1) and 912 successes out of 1000 give the posterior \mathrm{Beta}(913, 89), with mean 0.9112.
Example 7.4 — Gaussian–Gaussian conjugacy Let X_i \mid \theta \sim \mathcal{N}(\theta, \sigma^2) with \sigma^2 known, and a prior \theta \sim \mathcal{N}(m, \tau^2). The pair (\theta, \bar X_n) is a Gaussian vector, and Theorem 1.8 gives the posterior \mathcal{N}(m_n, \tau_n^2):
\frac{1}{\tau_n^2} = \frac{1}{\tau^2} + \frac{n}{\sigma^2}, \qquad m_n = \tau_n^2 \Big(\frac{m}{\tau^2} + \frac{n \bar X_n}{\sigma^2}\Big).
Precisions add, and the posterior mean weighs the prior mean and the data by their precisions. With m = 0, \tau^2 = 1, \sigma^2 = 4, n = 4 and \bar X_n = 2, the posterior is \mathcal{N}(1, 0.5).
Proposition 7.5 — Ridge regression is a posterior mean In the linear model with \varepsilon \sim \mathcal{N}(0, \sigma^2 I_n) and the prior \beta \sim \mathcal{N}(0, \tau^2 I_p), the posterior of \beta is Gaussian, and its mean and mode are the ridge estimator with \lambda = \sigma^2/\tau^2.
Proof. Up to an additive constant, the log-posterior is
-\frac{\|y - X\beta\|^2}{2\sigma^2} - \frac{\|\beta\|^2}{2\tau^2},
a concave quadratic function of \beta. Its exponential is a Gaussian density, whose mean equals its mode, the maximizer of this quadratic. Multiplying by -2\sigma^2 gives the ridge objective with \lambda = \sigma^2/\tau^2. ∎
Definition 7.6 — Credible interval A credible set of level 1 - \alpha is a set C with posterior probability 1 - \alpha.
The statement “\theta \in C with probability 0.95” is about \theta, given the observed data. A confidence interval makes a statement about the procedure, over repeated samples, for a fixed \theta.
Theorem 7.7 — Bernstein–von Mises In a regular parametric model, with a prior that has a continuous positive density at the true \theta_0, the posterior is close to a Gaussian centred at the MLE, in total variation and in P_{\theta_0}-probability:
\Big\| \pi(\cdot \mid X_{1:n}) - \mathcal{N}\big(\hat\theta_n,\ I(\theta_0)^{-1}/n\big) \Big\|_{TV} \longrightarrow 0.
Credible intervals are therefore asymptotically confidence intervals. Statement and proof: van der Vaart (1998, §10.2).
The code computes the posterior of Example 7.3. The 95 % credible interval almost coincides with the Wald interval [0.894, 0.930] of Example 2.8, as Theorem 7.7 predicts. The posterior probability that the accuracy exceeds 0.90 is 0.89: suggestive, not conclusive.
from scipy import stats
k, n = 912, 1000
post = stats.beta(1 + k, 1 + n - k) # uniform prior on p
lo, hi = post.ppf([0.025, 0.975])
print(f"posterior mean {post.mean():.4f}, 95% credible interval [{lo:.4f}, {hi:.4f}]")
print(f"P(p > 0.90 | data) = {post.sf(0.90):.3f}")
# posterior mean 0.9112, 95% credible interval [0.8928, 0.9280]
# P(p > 0.90 | data) = 0.891Outside conjugate models the posterior has no closed form; its normalizing integral is the obstacle. Markov chain Monte Carlo (ch. 8) samples it without computing that integral, and variational inference approximates it by optimization.
Key takeaways — chapter 7
- Posterior ∝ prior × likelihood; the normalizing constant is the evidence.
- The posterior mean is the conditional expectation of the parameter given the data, hence the Bayes estimator under the squared loss.
- Conjugate priors keep the posterior in the family: Beta–Bernoulli adds counts, Gaussian–Gaussian adds precisions.
- Ridge regression is the posterior mean under a Gaussian prior, with \lambda = \sigma^2/\tau^2.
- Bernstein–von Mises: in regular models, posteriors become Gaussian around the MLE, and credible intervals become confidence intervals.
8. Martingales and Markov chains
Self-study chapter. A gambler’s fortune, a stream of observations analysed on the fly, the trajectory of a sampler: these sequences are not independent. Martingales and Markov chains are the two structures that keep enough of independence to prove concentration and limit theorems. This chapter gives the discrete-time results that the MVA courses on stochastic calculus, sequential learning and sampling build on.
Martingales
Definition 8.1 — Filtration, martingale A filtration is an increasing sequence (\mathcal{F}_n)_{n \ge 0} of σ-algebras: the information available at time n. A sequence (M_n) of integrable variables, with M_n measurable with respect to \mathcal{F}_n, is a martingale if
\mathbb{E}[M_{n+1} \mid \mathcal{F}_n] = M_n \qquad \text{for every } n.
It is a supermartingale if \le holds, a submartingale if \ge holds. The increments D_n = M_n - M_{n-1} of a martingale satisfy \mathbb{E}[D_n \mid \mathcal{F}_{n-1}] = 0.
Four martingales that recur in the MVA courses, each checked with Proposition 1.2:
- S_n = \sum_{i \le n} X_i for independent centred X_i, and S_n^2 - n\sigma^2 when they also share the variance \sigma^2;
- the likelihood ratio L_n = \prod_{i \le n} p_1(X_i)/p_0(X_i) for i.i.d. X_i with density p_0 and another density p_1 that vanishes where p_0 does, since \mathbb{E}[p_1(X)/p_0(X)] = \int p_1 = 1;
- the Doob martingale M_k = \mathbb{E}[f(X_1, \dots, X_n) \mid X_1, \dots, X_k], for k = 0, \dots, n;
- (q/p)^{S_n} for a walk with steps +1 and -1 of probabilities p and q = 1 - p.
Definition 8.2 — Stopping time A random time \tau with values in \{0, 1, \dots\} \cup \{\infty\} is a stopping time if \{\tau = n\} \in \mathcal{F}_n for every n: the decision to stop at time n uses only the information available at time n. The first time a process enters a set is a stopping time; the last time is not, in general.
Theorem 8.3 — Optional stopping Let (M_n) be a martingale and \tau a stopping time. If \tau is bounded, or if \tau is almost surely finite and |M_{n \wedge \tau}| \le C for all n, then
\mathbb{E}[M_\tau] = \mathbb{E}[M_0].
For a supermartingale, the same hypotheses give \mathbb{E}[M_\tau] \le \mathbb{E}[M_0].
Proof. Write the stopped martingale as a sum of increments:
M_{\tau \wedge n} - M_0 = \sum_{k=1}^n \mathbf{1}\{\tau \ge k\}\, D_k.
The event \{\tau \ge k\} is the complement of \{\tau \le k - 1\} \in \mathcal{F}_{k-1}. Known factors (Proposition 1.2) then give, for each k,
\mathbb{E}\big[\mathbf{1}\{\tau \ge k\}\, D_k\big] = \mathbb{E}\big[\mathbf{1}\{\tau \ge k\}\, \mathbb{E}[D_k \mid \mathcal{F}_{k-1}]\big] = 0.
If \tau \le N, take n = N. For a supermartingale each term is \le 0.
In the second case, M_{\tau \wedge n} \to M_\tau almost surely because \tau is finite, and dominated convergence (by the constant C) lets n \to \infty. ∎
Example 8.4 — Gambler’s ruin A fair walk S_n starts at x \in \{0, \dots, N\} and stops at the first time \tau it hits 0 or N.
The time \tau is almost surely finite, because any N consecutive steps up end the game, and the stopped walk stays in [0, N]. Optional stopping gives x = \mathbb{E}S_\tau = N\, \mathbb{P}(S_\tau = N):
\mathbb{P}(\text{reach } N \text{ before } 0) = \frac{x}{N}.
Applying the same argument to S_n^2 - n, with a truncation, gives \mathbb{E}\tau = x(N - x). From x = 10 with N = 100: probability 0.1, and 900 steps on average.
Proposition 8.5 — Ville’s maximal inequality If (M_n) is a nonnegative supermartingale and c > 0, then
\mathbb{P}\Big(\sup_{n \ge 0} M_n \ge c\Big) \le \frac{\mathbb{E}[M_0]}{c}.
Proof. Let \tau be the first n with M_n \ge c, and fix N. Theorem 8.3 applied to the bounded time \tau \wedge N gives \mathbb{E}[M_{\tau \wedge N}] \le \mathbb{E}[M_0].
Since M \ge 0, and M_\tau \ge c on the event \{\tau \le N\},
c\, \mathbb{P}(\tau \le N) \le \mathbb{E}\big[M_{\tau \wedge N}\big] \le \mathbb{E}[M_0].
Let N \to \infty. ∎
Applied to the likelihood ratio L_n under the null, which has mean 1, Ville’s inequality says that the probability that L_n ever exceeds 1/\alpha is at most \alpha. This gives tests that stay valid however often one looks at the data, the starting point of the anytime-valid inference of ch. 9.
Theorem 8.6 — Azuma–Hoeffding inequality If (M_n) is a martingale with |M_k - M_{k-1}| \le c_k almost surely, then for every t > 0
\mathbb{P}(M_n - M_0 \ge t) \le \exp\Big(-\frac{t^2}{2 \sum_{k \le n} c_k^2}\Big).
Proof. Given \mathcal{F}_{k-1}, the increment D_k is centred with values in [-c_k, c_k]. Hoeffding’s lemma (Lemma 3.4), applied conditionally, bounds its conditional moment generating function by e^{\lambda^2 c_k^2/2}. By the tower property,
\mathbb{E}\big[e^{\lambda (M_n - M_0)}\big] = \mathbb{E}\Big[e^{\lambda (M_{n-1} - M_0)}\ \mathbb{E}\big[e^{\lambda D_n} \mid \mathcal{F}_{n-1}\big]\Big] \le e^{\lambda^2 c_n^2/2}\ \mathbb{E}\big[e^{\lambda (M_{n-1} - M_0)}\big].
Induction and the Chernoff bound (Proposition 3.1) conclude, as in Theorem 3.5. ∎
Corollary 8.7 — McDiarmid’s bounded-differences inequality Let X_1, \dots, X_n be independent and let f change by at most c_i when its i-th argument changes, the others fixed. Then
\mathbb{P}\big(f(X) - \mathbb{E}f(X) \ge t\big) \le \exp\Big(-\frac{2t^2}{\sum_i c_i^2}\Big).
Proof sketch. The Doob martingale M_k = \mathbb{E}[f(X) \mid X_1, \dots, X_k] goes from \mathbb{E}f(X) to f(X). Given X_1, \dots, X_{k-1}, its increment lies in an interval of length c_k, by independence. Lemma 3.4 with (b - a)^2 = c_k^2 and the argument of Theorem 8.6 give the bound. This is the inequality behind the uniform generalization bounds of statistical learning.
Two further results are used without proof in the MVA courses. Doob’s inequality bounds the maximum of a nonnegative submartingale:
\mathbb{P}\Big(\max_{k \le n} M_k \ge c\Big) \le \frac{\mathbb{E}[M_n]}{c}.
The martingale convergence theorem says that a martingale bounded in L^1 converges almost surely (Williams, 1991, ch. 11).
Markov chains
Definition 8.8 — Markov chain, invariant law A sequence (X_n) with values in a finite set S is a Markov chain with transition matrix P if
\mathbb{P}(X_{n+1} = y \mid X_0, \dots, X_n) = P(X_n, y) \qquad \text{for all } y \in S.
If X_0 has law \mu (a row vector), X_n has law \mu P^n. A law \pi is invariant if \pi P = \pi.
The chain is reversible with respect to \pi if it satisfies detailed balance,
\pi(x) P(x, y) = \pi(y) P(y, x) \qquad \text{for all } x, y;
summing over x shows that \pi is then invariant.
Definition 8.9 — Irreducible, aperiodic The chain is irreducible if every state can reach every other with positive probability. The period of a state x is the greatest common divisor of the times n \ge 1 with P^n(x, x) > 0; an irreducible chain whose states have period 1 is aperiodic. A self-loop, P(x, x) > 0 for some x, makes an irreducible chain aperiodic.
Theorem 8.10 — Ergodic and convergence theorems Let P be irreducible on a finite set S. Then:
- P has a unique invariant law \pi, and \pi(x) > 0 for every x;
- for every function f and every initial law, almost surely, \frac1n \sum_{k=0}^{n-1} f(X_k) \longrightarrow \sum_{x \in S} \pi(x) f(x);
- if moreover P is aperiodic, \mu P^n \to \pi for every initial law \mu, at a geometric rate in total variation.
Proof. Sketch of item 3. On a finite set, irreducible and aperiodic imply that some power P^r has all its entries at least some \delta > 0.
Two copies of the chain, started anywhere, can then be made to meet within r steps with probability at least \delta (coupling). So the distance to \pi is multiplied by at most 1 - \delta every r steps. Items 1–2 and the details are in Levin and Peres (2017, ch. 1 and 4). ∎
A Markov chain can thus be designed to have a prescribed invariant law \pi, and its time averages then estimate expectations under \pi. This is Markov chain Monte Carlo.
Algorithm 8.11 — Metropolis–Hastings Let \pi be a target density known up to a constant, and q(x, \cdot) a proposal density. From the current state x:
- draw a proposal y \sim q(x, \cdot);
- accept it, X_{n+1} = y, with probability a(x, y) = \min\Big(1,\ \frac{\pi(y)\, q(y, x)}{\pi(x)\, q(x, y)}\Big);
- otherwise stay, X_{n+1} = x.
The ratio only involves \pi(y)/\pi(x): the unknown normalizing constant cancels.
Proposition 8.12 — Metropolis–Hastings is reversible with respect to \pi The chain of Algorithm 8.11 satisfies detailed balance with respect to \pi, so \pi is invariant.
Proof. For x \ne y, the transition density from x to y is q(x, y)\, a(x, y), and
\pi(x)\, q(x, y)\, a(x, y) = \min\big(\pi(x)\, q(x, y),\ \pi(y)\, q(y, x)\big),
which is symmetric in (x, y). Rejections only add mass at x = y, where detailed balance is trivial. ∎
The code samples the posterior \mathrm{Beta}(913, 89) of ch. 7 with a random-walk Metropolis–Hastings chain, using only the unnormalized log-posterior. Time averages along the chain recover the exact posterior mean and tail probability (Theorem 8.10, item 2).
import numpy as np
from scipy import stats
rng = np.random.default_rng(8)
k, n = 912, 1000
def log_target(p): # log posterior, up to a constant
return k * np.log(p) + (n - k) * np.log1p(-p) if 0 < p < 1 else -np.inf
p, chain, accepted = 0.5, np.empty(50_000), 0
for t in range(chain.size):
proposal = p + 0.02 * rng.standard_normal() # symmetric random walk
if np.log(rng.uniform()) < log_target(proposal) - log_target(p):
p, accepted = proposal, accepted + 1
chain[t] = p
kept = chain[5_000:] # discard the burn-in
exact = stats.beta(k + 1, n - k + 1)
print(f"acceptance rate {accepted / chain.size:.2f}")
print(f"mean: MCMC {kept.mean():.4f}, exact {exact.mean():.4f}")
print(f"P(p > 0.9): MCMC {np.mean(kept > 0.9):.3f}, exact {exact.sf(0.9):.3f}")
# acceptance rate 0.47
# mean: MCMC 0.9111, exact 0.9112
# P(p > 0.9): MCMC 0.891, exact 0.891Key takeaways — chapter 8
- A martingale is a fair game: its increments have conditional mean zero; sums of centred variables, likelihood ratios and Doob martingales are the main examples.
- Optional stopping: a bounded (or suitably controlled) stopping time does not change the mean; it solves the gambler’s ruin and proves Ville’s maximal inequality.
- Azuma–Hoeffding extends Hoeffding to martingales with bounded increments, and McDiarmid to functions with bounded differences.
- An irreducible finite chain has a unique invariant law, its time averages converge to expectations under that law, and aperiodicity adds convergence in law.
- Metropolis–Hastings builds a chain reversible with respect to any target known up to a constant.
9. Research directions and open problems
Self-study chapter. The tools of this page are classical, but each one has a research frontier where its hypotheses fail: heavy tails, models that are only approximately right, data analysed while they arrive, more parameters than observations. This chapter points to a few active lines, with papers to start from.
Mean estimation under heavy tails
Hoeffding’s and Bernstein’s inequalities need bounded or light-tailed variables. With only a finite variance, the empirical mean has polynomial tails: Chebyshev’s bound cannot be improved in general. Catoni (2012) built M-estimators of the mean with sub-Gaussian deviations under a finite variance only.
The median-of-means estimator, which dates back to the 1980s, achieves the same with a three-line proof (Exercise 16). Lugosi and Mendelson (2019) trace its history and survey the field, including the multivariate case.
Open questions concern the optimal constants and computation in high dimension. Hopkins (2020) gave the first polynomial-time multivariate estimator with sub-Gaussian rates, and Lee and Valiant (2021) obtained the optimal constant in dimension one.
Distribution-free prediction: conformal inference
Confidence intervals for a parameter assume a model. Conformal prediction (Vovk, Gammerman and Shafer, 2005) builds prediction sets with finite-sample coverage for any predictor and any distribution, under exchangeability alone; Exercise 17 proves the key step. Lei, G’Sell, Rinaldo, Tibshirani and Wasserman (2018) developed it for regression, and Angelopoulos and Bates (2023) give an introduction.
The guarantee is marginal, averaged over the inputs. Barber, Candès, Ramdas and Tibshirani (2021) show that coverage conditional on the input cannot be guaranteed for every distribution, except by uninformative sets. Extensions to covariate shift (Tibshirani, Barber, Candès and Ramdas, 2019) and to non-exchangeable data (Barber, Candès, Ramdas and Tibshirani, 2023) are active.
Anytime-valid inference
A p-value checked after every new batch of data, until it falls below 0.05, gives far more than 5 % false positives: the stopping time is chosen by the data. Ville’s inequality (Proposition 8.5) suggests the fix: use nonnegative supermartingales, which stay valid at any stopping time.
Confidence sequences (Howard, Ramdas, McAuliffe and Sekhon, 2021) and e-values (Ramdas, Grünwald, Vovk and Shafer, 2023) develop this into a theory of sequential inference. A/B testing on the web was one motivation (Johari, Koomen, Pekelis and Walsh, 2017). Open problems include optimal power under composite alternatives and inference under adaptive data collection.
Regression with more parameters than observations
When p \ge n, least squares interpolates the data and Proposition 6.5 no longer applies. Belkin, Hsu, Ma and Mandal (2019) documented a second descent of the test error beyond the interpolation threshold. Bartlett, Long, Lugosi and Tsigler (2020) characterized when interpolation is benign in linear regression, and Hastie, Montanari, Rosset and Tibshirani (2022) computed the asymptotic risk of minimum-norm least squares with random matrix theory.
How far these results extend to neural networks is open; the Large Random Matrices and Theoretical Foundations of Deep Learning courses meet these questions.
Inference after selection and with machine-learning predictions
Tests computed on a model chosen from the same data are not valid at their nominal level. Valid post-selection inference (Berk, Brown, Buja, Zhang and Zhao, 2013) and knockoffs, which control the false discovery rate of variable selection (Barber and Candès, 2015), are two answers.
Prediction-powered inference (Angelopoulos, Bates, Fannjiang, Jordan and Zrnic, 2023) combines a few labelled data with many machine-learning predictions while keeping valid confidence intervals.
Bayesian methods when the model is wrong, and sampling in high dimension
Under misspecification, the posterior concentrates around the Kullback–Leibler projection, but its spread is not the sampling spread of the estimator (Kleijn and van der Vaart, 2012): credible intervals can be too narrow or too wide. On the computational side, non-asymptotic bounds for Langevin-based samplers in high dimension (Durmus and Moulines, 2019) quantify how many steps an MCMC method needs; the Stochastic Calculus in Machine Learning course cites this paper.
Key takeaways — chapter 9
- Heavy tails: median-of-means and Catoni’s estimator recover sub-Gaussian deviations from a finite variance; optimal constants and high-dimensional computation are open.
- Conformal prediction gives finite-sample, distribution-free coverage, marginal only; conditional coverage needs assumptions.
- Supermartingales and Ville’s inequality make tests and intervals valid at any stopping time.
- Interpolating least squares can generalize; random matrix theory computes its risk.
- Selection, machine-learning predictions and misspecification all require corrections to the classical intervals.
Exercises
★ Changes of variables. Let U be uniform on (0, 1) and X \sim \mathcal{N}(0, 1). (a) Find the density of U^2. (b) Show that -2\log U is exponential with mean 2. (c) Find the density of X^2, its mean and its variance.
Solution: (a) \mathbb{P}(U^2 \le y) = \sqrt{y}, so the density is 1/(2\sqrt{y}) on (0, 1).
For y > 0, -2\log U > y exactly when U < e^{-y/2}, an event of probability e^{-y/2}: the exponential law with mean 2.
\mathbb{P}(X^2 \le y) = 2\Phi(\sqrt{y}) - 1; differentiating gives the density e^{-y/2}/\sqrt{2\pi y} for y > 0, the \chi^2_1 law of ch. 5. Its mean is \mathbb{E}X^2 = 1 and its variance \mathbb{E}X^4 - 1 = 3 - 1 = 2.
★ Conditioning on a sum of dice. Throw two fair dice D_1, D_2 and let S = D_1 + D_2. Compute \mathbb{E}[D_1 \mid S], then \mathrm{Var}(D_1 \mid S = 4), and check the tower property.
Solution: by symmetry \mathbb{E}[D_1 \mid S] = \mathbb{E}[D_2 \mid S], and the two sum to \mathbb{E}[S \mid S] = S; hence \mathbb{E}[D_1 \mid S] = S/2.
Given S = 4, the outcomes (1,3), (2,2), (3,1) are equally likely: D_1 is uniform on \{1, 2, 3\}, with variance 2/3. Tower property: \mathbb{E}[S/2] = 7/2 = \mathbb{E}D_1.
★ Conditioning a Gaussian triple. Let (X_1, X_2, Y) be centred Gaussian with unit variances, \mathrm{Cov}(X_1, X_2) = 0.5 and \mathrm{Cov}(X_i, Y) = 0.6. Compute \mathbb{E}[Y \mid X_1, X_2] and \mathrm{Var}(Y \mid X_1, X_2), and compare with conditioning on X_1 alone.
Solution: apply Theorem 1.8 with
\Sigma_{XX}^{-1} = \frac{1}{0.75}\begin{pmatrix} 1 & -0.5 \\ -0.5 & 1 \end{pmatrix}, \qquad \Sigma_{YX}\Sigma_{XX}^{-1} = (0.4,\ 0.4).
Hence
\mathbb{E}[Y \mid X_1, X_2] = 0.4\,(X_1 + X_2), \qquad \mathrm{Var}(Y \mid X_1, X_2) = 1 - 0.4 \times 0.6 \times 2 = 0.52.
On X_1 alone: mean 0.6 X_1 and variance 0.64. The second observation is correlated with the first, so it reduces the variance less than an independent one would.
★ Chebyshev, Hoeffding or the central limit theorem? A poll estimates a proportion within \pm 0.02 with probability 0.95. How many people are needed according to Chebyshev (worst variance 1/4), Hoeffding, and the central limit theorem?
Solution: Chebyshev: n \ge 1/(4 \times 0.05 \times 0.02^2) = 12\,500. Hoeffding: n \ge \log(40)/(2 \times 0.02^2) = 4\,612. Central limit theorem: n \ge (1.96/0.02)^2/4 = 2\,401. The last number is the one pollsters use, but it is only asymptotic; Hoeffding’s is a guarantee.
★ (Python) The delta method at work. For n = 50 exponential observations with \lambda = 1, simulate the estimator 1/\bar X_n 10,000 times; ch. 4 shows that it is the maximum-likelihood estimator (MLE). Compare its mean with n/(n-1), its standard deviation with the delta-method value \lambda/\sqrt{n} (Theorem 2.7 with g(x) = 1/x), and the coverage of the asymptotic interval with 95 %.
Hints and expected result:
import numpy as np rng = np.random.default_rng(5) n, lam = 50, 1.0 est = 1 / rng.exponential(1 / lam, size=(10_000, n)).mean(axis=1) # MLE 1 / mean print(f"mean of the MLE {est.mean():.4f} (exact n/(n-1) = {n / (n - 1):.4f})") print(f"sd of the MLE {est.std():.4f} (delta method {lam / np.sqrt(n):.4f})") z = (est - lam) / (lam / np.sqrt(n)) print(f"P(|z| <= 1.96) = {np.mean(np.abs(z) <= 1.96):.3f}") # mean of the MLE 1.0200 (exact n/(n-1) = 1.0204) # sd of the MLE 0.1475 (delta method 0.1414) # P(|z| <= 1.96) = 0.939The bias and the skewness of 1/\bar X_n are still visible at n = 50: the coverage is 93.9 %, not 95 %.
★ A Hoeffding interval for a test error. A classifier makes 150 errors on 2,000 fresh test examples. Give the 99 % Hoeffding interval for its error rate and compare it with the interval from the central limit theorem.
Solution: \hat p = 0.075. Hoeffding’s half-width is \sqrt{\log(200)/4000} = 0.036, giving [0.039, 0.111]. The central limit theorem gives the half-width 2.576\sqrt{0.075 \times 0.925/2000} = 0.015, giving [0.060, 0.090]. Hoeffding ignores that the variance p(1-p) is small; Bernstein-type bounds close most of the gap.
★ Maximum likelihood for the exponential law. Derive the MLE of \lambda for i.i.d. \mathcal{E}(\lambda) data, its Fisher information and the asymptotic 95 % interval, then apply it with n = 40 and \bar X = 2.5.
Solution: \ell_n(\lambda) = n\log\lambda - \lambda\sum_i X_i gives \hat\lambda = 1/\bar X = 0.4. The second derivative of \log p_\lambda is -1/\lambda^2, so I(\lambda) = 1/\lambda^2.
Theorem 4.8 gives the interval below, that is [0.276, 0.524]:
\hat\lambda \pm \frac{1.96\, \hat\lambda}{\sqrt{n}} = 0.4 \pm 0.124.
★★ Sub-Gaussian maxima. (a) Show that a fair sign \varepsilon satisfies \cosh\lambda \le e^{\lambda^2/2}, the moment generating function bound of Definition 3.2. (b) For N standard Gaussian variables, show that the expected maximum is at most \sqrt{2\log N}, and evaluate it for N = 1000. (c) Why is independence not needed?
Solution: (a) Compare the series term by term: \lambda^{2k}/(2k)! \le \lambda^{2k}/(2^k k!), because (2k)! \ge 2^k k!. (b) Proposition 3.8 with \sigma = 1: the bound is \sqrt{2\log 1000} = 3.72, while the true expected maximum of 1000 independent standard Gaussians is about 3.24. (c) The proof bounds a maximum by a sum inside Jensen’s inequality, which needs no independence.
★★ Efficiency of variance estimators. For \mathcal{N}(\mu, v) data with \mu known, compute the Fisher information about v = \sigma^2 and show that \frac1n\sum_i (X_i - \mu)^2 is efficient. With \mu unknown, compare \mathrm{Var}(S^2) with the bound.
Solution: \log p_v(x) = -\frac12\log(2\pi v) - (x - \mu)^2/(2v), whose score is -\frac{1}{2v} + \frac{(x - \mu)^2}{2v^2}. Its variance is \mathrm{Var}((X - \mu)^2)/(4v^4) = 2v^2/(4v^4), so I(v) = 1/(2v^2) and the bound is 2v^2/n.
The estimator with known \mu is unbiased with variance 2v^2/n: efficient. With \mu unknown, \mathrm{Var}(S^2) = 2v^2/(n-1) exceeds the bound, by a ratio that tends to 1.
★★ Power and sample size of a z-test. Data X_i \sim \mathcal{N}(\mu, 1); test \mu = 0 against \mu > 0 at level 5 %.
- Compute the power at \mu = 0.3 for n = 50. (b) Find the smallest n giving power 0.9 at \mu = 0.3.
Solution: (a) Example 5.9 gives the power \Phi(0.3\sqrt{50} - 1.645) = \Phi(0.476) = 0.683. (b) One needs 0.3\sqrt{n} \ge 1.645 + 1.282 = 2.927, that is n \ge 95.2, so n = 96.
★★ (Python) Ridge against least squares. Simulate a regression with n = 50 observations, p = 40 strongly correlated covariates and \beta \sim \mathcal{N}(0, I_p). Estimate the risk \mathbb{E}\|\hat\beta_\lambda - \beta\|^2 over a grid of \lambda, and relate the result to Proposition 6.7.
Hints and expected result:
import numpy as np rng = np.random.default_rng(11) n, p, sigma = 50, 40, 1.0 C = 0.9 ** np.abs(np.subtract.outer(np.arange(p), np.arange(p))) # correlated covariates X = rng.multivariate_normal(np.zeros(p), C, size=n) beta = rng.standard_normal(p) lams = [0.0, 0.3, 1.0, 3.0, 10.0, 30.0] err = np.zeros(len(lams)) for _ in range(500): y = X @ beta + sigma * rng.standard_normal(n) for j, lam in enumerate(lams): b = np.linalg.solve(X.T @ X + lam * np.eye(p), X.T @ y) # ridge; OLS at 0 err[j] += np.sum((b - beta) ** 2) / 500 for lam, e in zip(lams, err): print(f"lambda = {lam:5.1f} E||b - beta||^2 = {e:6.2f}") # lambda = 0.0 E||b - beta||^2 = 47.58 # lambda = 0.3 E||b - beta||^2 = 17.58 # lambda = 1.0 E||b - beta||^2 = 16.57 # lambda = 3.0 E||b - beta||^2 = 19.17 # lambda = 10.0 E||b - beta||^2 = 24.94 # lambda = 30.0 E||b - beta||^2 = 31.04The risk is U-shaped: the small eigenvalues d_j of a correlated design make the variance term \sigma^2/d_j of least squares explode, and a moderate \lambda removes most of it at the price of a small bias.
★★ Laplace’s rule of succession. Take a uniform prior on p and observe k successes in n Bernoulli trials.
- Show that the posterior probability that trial n + 1 succeeds is (k + 1)/(n + 2). (b) For k = 0 and n = 10, find the 95 % one-sided upper credible bound for p.
Solution: (a) The predictive probability is the posterior mean of p, here (1 + k)/(2 + n) by Example 7.3.
- The posterior is \mathrm{Beta}(1, 11), with \mathbb{P}(p \le u) = 1 - (1 - u)^{11}. Setting this to 0.95 gives u = 1 - 0.05^{1/11} = 0.238, close to the “rule of three” 3/n = 0.3. The MLE, 0, is useless here.
★★ Bonferroni or Benjamini–Hochberg? Ten hypotheses give the sorted p-values 0.001, 0.006, 0.009, 0.020, 0.041, 0.10, 0.27, 0.48, 0.66, 0.91. Which are rejected at \alpha = 0.05 by Bonferroni, and by Benjamini–Hochberg? With 20 independent true nulls tested at 0.05 each, what is the family-wise error rate?
Solution: Bonferroni’s threshold is 0.005: one rejection. Benjamini–Hochberg compares p_{(i)} with 0.005\, i; the largest i that passes is i = 4, since 0.020 \le 0.020, so four rejections.
Without correction, the family-wise error rate is 1 - 0.95^{20} = 0.64; with Bonferroni, it is 1 - 0.9975^{20} = 0.049.
★★ Ruin with a small edge. A walk takes steps +1 with probability p = 0.49 and -1 with probability q = 0.51. It starts at x = 10 and stops at 0 or at N = 20.
Show that (q/p)^{S_n} is a martingale and compute the probability of reaching N first.
Solution: the next step multiplies (q/p)^{S_n} by q/p or by p/q, so
\mathbb{E}\big[(q/p)^{S_{n+1}} \mid \mathcal{F}_n\big] = (q/p)^{S_n}\Big(p \cdot \frac{q}{p} + q \cdot \frac{p}{q}\Big) = (q/p)^{S_n}.
The stopped martingale is bounded, so Theorem 8.3 gives, with r = q/p,
\mathbb{P}(\text{reach } N \text{ first}) = \frac{1 - r^{x}}{1 - r^{N}} = 0.401.
A 1 % edge per step moves the fair answer 0.5 to 0.40.
★★ (Python) A Markov chain and its invariant law. For the three-state chain below, compute the invariant law, check that the rows of P^{20} approach it, compare with the occupation frequencies of a simulated path, and test detailed balance.
Hints and expected result:
import numpy as np P = np.array([[0.7, 0.2, 0.1], [0.3, 0.4, 0.3], [0.2, 0.3, 0.5]]) w, V = np.linalg.eig(P.T) # pi P = pi: left eigenvector for 1 pi = np.real(V[:, np.argmin(np.abs(w - 1))]); pi /= pi.sum() print("invariant law", np.round(pi, 4)) print("row of P^20 ", np.round(np.linalg.matrix_power(P, 20)[0], 4)) rng = np.random.default_rng(15) x, counts = 0, np.zeros(3) for _ in range(100_000): x = rng.choice(3, p=P[x]); counts[x] += 1 print("frequencies ", np.round(counts / counts.sum(), 4)) F = pi[:, None] * P # flows pi(x) P(x, y) print("reversible:", np.allclose(F, F.T)) # invariant law [0.4565 0.2826 0.2609] # row of P^20 [0.4565 0.2826 0.2609] # frequencies [0.4598 0.2803 0.2599] # reversible: FalseThe chain is irreducible and aperiodic (self-loops), so Theorem 8.10 applies; it is not reversible, which shows that detailed balance is sufficient but not necessary for invariance.
★★★ Median of means. Split n = km i.i.d. observations with mean \mu and variance \sigma^2 into k blocks of size m.
Let \hat\mu be the median of the k block means. Show that
\mathbb{P}\Big(|\hat\mu - \mu| > 2\sigma/\sqrt{m}\Big) \le e^{-k/8},
and deduce a deviation of order \sigma\sqrt{\log(1/\delta)/n} with probability 1 - \delta, under a finite variance only. Then compare the empirical mean and the median of means on Student data with 3 degrees of freedom.
Hints and expected result: by Chebyshev, each block mean is off by more than 2\sigma/\sqrt{m} with probability at most 1/4. The median is that far off only if at least k/2 blocks are, and Hoeffding’s inequality on the number of bad blocks gives e^{-2k(1/4)^2}. Take k = \lceil 8\log(1/\delta) \rceil.
In simulations with n = 960, k = 24 blocks of m = 40 (that is, \delta = 0.05) and 10^5 repetitions, the empirical mean is better in the bulk. Its standard deviation is 0.056 against 0.063, and its 99 % quantile of |\hat\mu - \mu| is 0.146 against 0.163.
The median of means wins only far in the tail: its 99.99 % quantile is about 0.25, against more than 0.30 for the mean. Its guarantee is about rare large deviations, not typical errors. Lugosi and Mendelson (2019) discuss the constants (ch. 9).
★★★ Why conformal prediction works. Let S_1, \dots, S_{n+1} be exchangeable real scores, almost surely distinct. Show that
\mathbb{P}\Big(S_{n+1} \le S_{(\lceil (n+1)(1-\alpha) \rceil)}\Big) \ge 1 - \alpha,
where S_{(j)} is the j-th smallest of S_1, \dots, S_n and \alpha \ge 1/(n+1), so that the index is at most n. Turn this into a prediction interval for regression and discuss what the guarantee does not say.
Hints and expected result: by exchangeability, the rank of S_{n+1} among the n + 1 scores is uniform on \{1, \dots, n + 1\}. The event holds when this rank is at most j = \lceil (n+1)(1-\alpha) \rceil, which has probability j/(n+1) \ge 1 - \alpha.
With residual scores |y - \hat f(x)| computed on a calibration set independent of the fit of \hat f, the interval \hat f(x) \pm S_{(j)} covers a new response with probability at least 1 - \alpha, for any \hat f and any distribution. The coverage is marginal, not conditional on x (ch. 9).
Projects and assessment
No assessment is published for the refresher courses (see the fiche): they are optional, without registration, and mandatory only for the I&I track. This section offers two tools instead, neither of them official. The diagnostic self-check, in the format of a short written exam, tells you which chapters to work on before the semester starts. The two small practice projects apply the page to realistic questions, at the scale of an afternoon or two.
Diagnostic self-check
Format: 60 minutes, no documents, 13 short questions, 20 points; each question names the chapter that answers it. Grade yourself with the expected answers. Below 12/20, follow the four steps of the session plan in order; between 12 and 16, work on the chapters of the missed questions; above 16, the recap boxes are enough.
Question (1.5 points) — ch. 0. Let U be uniform on (0, 1). What is the law of -\log(U)/3? Give its mean and its variance.
Expected: by Example 0.4, the exponential law with parameter 3, with mean 1/3 and variance 1/9.
Question (1.5 points) — ch. 1. Throw a fair die, get X, then toss X fair coins and let Y be the number of heads. Compute the mean and the variance of Y.
Expected: \mathbb{E}[Y \mid X] = X/2 and \mathrm{Var}(Y \mid X) = X/4. Hence \mathbb{E}Y = 1.75, and by the law of total variance (Proposition 1.4), \mathrm{Var}(Y) = 3.5/4 + (35/12)/4 = 1.604.
Question (2 points) — ch. 1. Let (X, Y) be a centred Gaussian vector with variances 1 and 2, and covariance 1. Give the law of Y given X = 2. Are Y - X and X independent?
Expected: Theorem 1.8 gives \mathcal{N}(2, 1). \mathrm{Cov}(Y - X, X) = 1 - 1 = 0, and (Y - X, X) is a Gaussian vector, so they are independent (Proposition 1.7).
Question (1.5 points) — ch. 2. Give a sequence that converges in probability but not almost surely, and one that converges in law but not in probability.
Expected: independent X_n \sim \mathcal{B}(1/n), by the second Borel–Cantelli lemma; X_n = -X with X \sim \mathcal{N}(0, 1), which has the law of X but stays at distance 2|X| from it.
Question (2 points) — ch. 2. Let X_i be i.i.d. with mean \mu \ne 0 and variance \sigma^2. What is the asymptotic law of \sqrt{n}\,(\bar X_n^2 - \mu^2)?
Expected: the delta method (Theorem 2.7) with g(x) = x^2 and g'(\mu) = 2\mu gives \mathcal{N}(0, 4\mu^2\sigma^2).
Question (1.5 points) — ch. 3. How many i.i.d. observations with values in [0, 1] does Hoeffding’s inequality require to estimate their mean within 0.05 with probability 0.95?
Expected: 2e^{-2n(0.05)^2} \le 0.05, that is n \ge \log(40)/0.005 = 737.8, so n = 738.
Question (2 points) — ch. 3. Prove that \mathbb{P}(X \ge t) \le e^{-t^2/(2\sigma^2)} for X \sim \mathcal{N}(0, \sigma^2) and t > 0.
Expected: \mathbb{E}e^{\lambda X} = e^{\lambda^2\sigma^2/2}. Markov’s inequality on e^{\lambda X} gives the bound e^{-\lambda t + \lambda^2\sigma^2/2} for every \lambda > 0, and \lambda = t/\sigma^2 minimizes it (Propositions 3.1 and 3.3).
Question (2 points) — ch. 4. For i.i.d. Poisson \mathcal{P}(\lambda) data, give the MLE, the Fisher information, and say whether the MLE is efficient.
Expected: \hat\lambda = \bar X_n and I(\lambda) = 1/\lambda. The MLE is unbiased with variance \lambda/n, the Cramér–Rao bound: it is efficient (Example 4.7).
Question (1.5 points) — ch. 4. True or false: an unbiased estimator always has a smaller quadratic risk than a biased one.
Expected: false. The risk is the squared bias plus the variance; for Gaussian data, the biased variance estimator with factor 1/n has a smaller risk than S^2 (Example 4.2).
Question (1.5 points) — ch. 5. A test returns p = 0.03. Which statements are correct? (a) The null hypothesis has probability 0.03. (b) If the null hypothesis is true, a p-value at most 0.03 occurs with probability 0.03. (c) The effect is large.
Expected: only (b), for a continuous test statistic (Proposition 5.7). A p-value is not a probability of the hypothesis, and it does not measure the size of an effect.
Question (1 point) — ch. 6. Give the covariance of the least-squares estimator, and say what ridge regression changes.
Expected: \sigma^2 (X^\top X)^{-1}. Ridge adds a bias towards 0 and reduces the variance; it is the posterior mean under a Gaussian prior (Propositions 6.7 and 7.5).
Question (1 point) — ch. 7. With a prior \mathrm{Beta}(2, 2) and 7 successes in 10 trials, give the posterior and the posterior mean.
Expected: \mathrm{Beta}(9, 5), with mean 9/14 = 0.643 (Example 7.3).
Question (1 point) — ch. 8. A two-state chain jumps from state 1 to state 2 with probability a, and from 2 to 1 with probability b, with a + b > 0. Find its invariant law.
Expected: detailed balance \pi_1 a = \pi_2 b gives \pi = \big(b/(a+b),\ a/(a+b)\big) (Definition 8.8).
Practice projects
Two small projects, one solo and one for a pair, each at the scale of an afternoon or two.
- [Solo · ≈ 6 h] Interval estimation for a binomial proportion: a paper study. How well do the textbook intervals for a proportion cover at moderate sample sizes? Reproduce the coverage figures of Brown, Cai and DasGupta (2001) for the Wald, Wilson, Agresti–Coull and Jeffreys intervals.
- Method: exact coverage, by summing binomial probabilities as in the code of ch. 5, over 1,000 values of p for n = 30 and n = 100. Add the Hoeffding interval (ch. 3) and the credible interval under a uniform prior (ch. 7).
- Success criterion: coverage curves that show the oscillations of the Wald interval and its collapse near 0 and 1, and a table of mean coverage and mean length for each interval.
- Deliverables: one script, the figures, and a 2-page note ending with a recommendation backed by numbers. Chapters 2, 3, 5, 7; evaluated with the rubric below.
- [Group of 2 · ≈ 6 h each] Peeking at an A/B test. Visitors are split at random between two versions of a page, with the same 10 % conversion rate. An analyst runs a two-sided z-test of equal rates after every 100 visitors and stops at the first p-value below 0.05, up to 10,000 visitors. How often does an experiment with no true effect end as a “success”? Johari, Koomen, Pekelis and Walsh (2017) studied this problem on a commercial A/B testing platform.
- Work split: member 1 simulates the false-positive rate as a function of the number of looks, and explains it with optional stopping (ch. 8). Member 2 builds two corrections: Bonferroni over the looks (ch. 5), and a test that rejects when a likelihood-ratio martingale exceeds 1/\alpha (Proposition 8.5).
- Success criterion: a false-positive rate near 37 % with 100 looks and no correction; at most 5 % for both corrections; the power of each correction at a stated true effect.
- Deliverables: shared code, one figure per member, a 3-page joint note and a 10-minute talk. Chapters 3, 5, 8; evaluated with the rubric below.
Self-assessment grid
| Criterion | Weight | What earns the marks |
|---|---|---|
| Mathematical correctness | 35 % | Every formula is stated with its hypotheses and the chapter it comes from; coverages, levels and bounds are computed, not guessed |
| Reproducible code | 25 % | One script runs end to end with fixed seeds in a few minutes on a laptop; exact computations replace simulation where possible |
| Figures and numbers | 20 % | The success criterion is met and shown on a labelled figure or table, with the Monte Carlo error when results are simulated |
| Clarity of the note | 20 % | A reader can check the conclusion from the note alone, and the recommendation follows from the numbers |
References
Official references
The refresher courses publish no programme and no references (master-mva.com planning, 2026–2027). The works below are standard textbooks and the papers cited on this page.
Textbooks
- P. Billingsley, Probability and Measure, 3rd edition, Wiley, 1995.
- R. Durrett, Probability: Theory and Examples, 5th edition, Cambridge University Press, 2019.
- J.-F. Le Gall, Measure Theory, Probability, and Stochastic Processes, Graduate Texts in Mathematics 295, Springer, 2022.
- D. Williams, Probability with Martingales, Cambridge University Press, 1991.
- J. Jacod and P. Protter, Probability Essentials, 2nd edition, Springer, 2004.
- A. W. van der Vaart, Asymptotic Statistics, Cambridge University Press, 1998.
- L. Wasserman, All of Statistics: A Concise Course in Statistical Inference, Springer, 2004.
- G. Casella and R. L. Berger, Statistical Inference, 2nd edition, Duxbury, 2002.
- E. L. Lehmann and J. P. Romano, Testing Statistical Hypotheses, 3rd edition, Springer, 2005.
- S. Boucheron, G. Lugosi and P. Massart, Concentration Inequalities: A Nonasymptotic Theory of Independence, Oxford University Press, 2013.
- R. Vershynin, High-Dimensional Probability: An Introduction with Applications in Data Science, Cambridge University Press, 2018.
- D. A. Levin and Y. Peres, Markov Chains and Mixing Times, 2nd edition, American Mathematical Society, 2017.
- C. P. Robert and G. Casella, Monte Carlo Statistical Methods, 2nd edition, Springer, 2004.
- A. Gelman, J. B. Carlin, H. S. Stern, D. B. Dunson, A. Vehtari and D. B. Rubin, Bayesian Data Analysis, 3rd edition, CRC Press, 2013.
- T. Hastie, R. Tibshirani and J. Friedman, The Elements of Statistical Learning, 2nd edition, Springer, 2009.
Classical papers (ch. 3–8)
- H. Chernoff, “A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations”, Annals of Mathematical Statistics, 1952.
- W. Hoeffding, “Probability inequalities for sums of bounded random variables”, Journal of the American Statistical Association, 1963.
- J. Neyman and E. S. Pearson, “On the problem of the most efficient tests of statistical hypotheses”, Philosophical Transactions of the Royal Society of London, Series A, 1933.
- S. S. Wilks, “The large-sample distribution of the likelihood ratio for testing composite hypotheses”, Annals of Mathematical Statistics, 1938.
- E. B. Wilson, “Probable inference, the law of succession, and statistical inference”, Journal of the American Statistical Association, 1927.
- Y. Benjamini and Y. Hochberg, “Controlling the false discovery rate: a practical and powerful approach to multiple testing”, Journal of the Royal Statistical Society, Series B, 1995.
- A. E. Hoerl and R. W. Kennard, “Ridge regression: biased estimation for nonorthogonal problems”, Technometrics, 1970.
- N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller and E. Teller, “Equation of state calculations by fast computing machines”, Journal of Chemical Physics, 1953.
- W. K. Hastings, “Monte Carlo sampling methods using Markov chains and their applications”, Biometrika, 1970.
- J. Ville, Étude critique de la notion de collectif, Gauthier-Villars, 1939.
- L. D. Brown, T. T. Cai and A. DasGupta, “Interval estimation for a binomial proportion”, Statistical Science, 2001.
- R. L. Wasserstein and N. A. Lazar, “The ASA’s statement on p-values: context, process, and purpose”, The American Statistician, 2016.
- R. Johari, P. Koomen, L. Pekelis and D. Walsh, “Peeking at A/B tests: why it matters, and what to do about it”, Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2017.
Research directions (ch. 9)
- O. Catoni, “Challenging the empirical mean and empirical variance: a deviation study”, Annales de l’Institut Henri Poincaré, Probabilités et Statistiques, 2012.
- G. Lugosi and S. Mendelson, “Mean estimation and regression under heavy-tailed distributions: a survey”, Foundations of Computational Mathematics, 2019.
- S. B. Hopkins, “Mean estimation with sub-Gaussian rates in polynomial time”, Annals of Statistics, 2020.
- J. C. H. Lee and P. Valiant, “Optimal sub-Gaussian mean estimation in ℝ”, IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS), 2021.
- V. Vovk, A. Gammerman and G. Shafer, Algorithmic Learning in a Random World, Springer, 2005.
- J. Lei, M. G’Sell, A. Rinaldo, R. J. Tibshirani and L. Wasserman, “Distribution-free predictive inference for regression”, Journal of the American Statistical Association, 2018.
- A. N. Angelopoulos and S. Bates, “Conformal prediction: a gentle introduction”, Foundations and Trends in Machine Learning, 2023.
- R. F. Barber, E. J. Candès, A. Ramdas and R. J. Tibshirani, “The limits of distribution-free conditional predictive inference”, Information and Inference: A Journal of the IMA, 2021.
- R. J. Tibshirani, R. F. Barber, E. J. Candès and A. Ramdas, “Conformal prediction under covariate shift”, Advances in Neural Information Processing Systems (NeurIPS), 2019.
- R. F. Barber, E. J. Candès, A. Ramdas and R. J. Tibshirani, “Conformal prediction beyond exchangeability”, Annals of Statistics, 2023.
- S. R. Howard, A. Ramdas, J. McAuliffe and J. Sekhon, “Time-uniform, nonparametric, nonasymptotic confidence sequences”, Annals of Statistics, 2021.
- A. Ramdas, P. Grünwald, V. Vovk and G. Shafer, “Game-theoretic statistics and safe anytime-valid inference”, Statistical Science, 2023.
- M. Belkin, D. Hsu, S. Ma and S. Mandal, “Reconciling modern machine-learning practice and the classical bias–variance trade-off”, Proceedings of the National Academy of Sciences, 2019.
- P. L. Bartlett, P. M. Long, G. Lugosi and A. Tsigler, “Benign overfitting in linear regression”, Proceedings of the National Academy of Sciences, 2020.
- T. Hastie, A. Montanari, S. Rosset and R. J. Tibshirani, “Surprises in high-dimensional ridgeless least squares interpolation”, Annals of Statistics, 2022.
- R. Berk, L. Brown, A. Buja, K. Zhang and L. Zhao, “Valid post-selection inference”, Annals of Statistics, 2013.
- R. F. Barber and E. J. Candès, “Controlling the false discovery rate via knockoffs”, Annals of Statistics, 2015.
- A. N. Angelopoulos, S. Bates, C. Fannjiang, M. I. Jordan and T. Zrnic, “Prediction-powered inference”, Science, 2023.
- B. J. K. Kleijn and A. W. van der Vaart, “The Bernstein–von Mises theorem under misspecification”, Electronic Journal of Statistics, 2012.
- A. Durmus and É. Moulines, “High-dimensional Bayesian inference via the unadjusted Langevin algorithm”, Bernoulli, 2019.