Expectation, Variance and Conditional Expectation
Expectation as an integral, the variance identities used in every bias–variance computation, and conditional expectation as an orthogonal projection.
Expectation
For a random variable , , defined as the supremum of the integrals of simple functions below . For general , write and set whenever at least one term is finite; is integrable when .
Expectation is linear, monotone, and satisfies . The following identity is the one that turns tail bounds into moment bounds and back, and it is used constantly on the sub-Gaussian page.
For ,
Variance, covariance and the decompositions that matter
For square-integrable ,
For a random vector the covariance matrix is , and because .
Let be a square-integrable estimator of a constant , and let be a sub--algebra. Then
and
(the law of total variance).
Key idea
The bias–variance identity is exact algebra, not an approximation or a heuristic trade-off. What is heuristic is the claim that reducing one must increase the other; that claim is a description of certain model families, and the double descent page shows regimes where it plainly fails. Keep the identity and the folklore separate.
The vector version of the variance-of-a-sum computation is used in every mini-batch argument:
The middle expression is the honest one. The rate is a consequence of independence, and correlated samples — adjacent tokens in a text corpus, say — do not enjoy it.
Conditional expectation
Let be integrable and a sub--algebra. A random variable is a conditional expectation of given , written , if
- is -measurable, and
- for every .
Such a exists and is unique up to almost-sure equality.
If , then is the orthogonal projection of onto the closed subspace of square-integrable -measurable variables. Consequently
Let be integrable and sub--algebras.
- Tower / smoothing. ; in particular .
- Taking out what is known. If is -measurable and is integrable, then .
- Independence. If is independent of then .
Problems
Moments from tail bounds via the layer-cake formulaProof · Intermediate · 30 min Law of total variance and its useProof · Intermediate · 30 min Conditional expectation minimises mean squared errorProof · Intermediate · 30 min The 1/n variance rate requires uncorrelated samplesNumerical · Intermediate · 30 minReferences
- BookRick Durrett (2019). Probability: Theory and Examples
- BookDavid Williams (1991). Probability with MartingalesChapter 9 gives the conditional-expectation construction in the form used here.
These works are cited as sources to read, not reproduced. All exposition, examples and problems on this site are written independently; where an argument is standard, the citation points to a canonical treatment.
Results stated on this page
- PropositionTail formula for the expectationproof includedThe mean of a non-negative random variable is the integral of its tail probability.
- PropositionBias–variance and variance decompositionsproof includedMean squared error splits into squared bias plus variance; total variance splits into explained and residual parts.
- TheoremConditional expectation as an L2 projectionproof includedConditional expectation is the orthogonal projection of a square-integrable variable onto the sub-sigma-algebra's functions.
- PropositionTower property and pulling out what is knownproof includedThe two computational rules that make every conditional-expectation manipulation work.
Problems (4)
All problemsPapers that use this mathematics
Denoising Diffusion Probabilistic Models
Jonathan Ho, Ajay Jain, Pieter Abbeel · 2020
Mastering the game of Go without human knowledge
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton and others · 2017
Mastering the game of Go with deep neural networks and tree search
David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot and others · 2016
Human-level control through deep reinforcement learning
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski and others · 2015
Auto-Encoding Variational Bayes
Diederik P. Kingma, Max Welling · 2014
Generative Adversarial Nets
Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio · 2014