# Conditional expectation

**Conditional expectation** is the expected value of a random variable computed after part of the outcome is known. In modern probability theory it is defined on a probability space \((\Omega, \mathcal{F}, \mathbb{P})\) as a random variable \(\mathbb{E}[X \mid \mathcal{G}]\), where \(\mathcal{G} \subseteq \mathcal{F}\) is a sub-σ-algebra representing the available information: \(\mathbb{E}[X \mid \mathcal{G}]\) is the \(\mathcal{G}\)-measurable random variable whose integral over every set in \(\mathcal{G}\) equals that of \(X\)<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>. The definition in this form is due to [Andrey Kolmogorov](https://www.edgepedia.org/andrey-kolmogorov) in 1933<sup>[2](https://www.ma.imperial.ac.uk/~bin06/PfS/2012/pfsl18.pdf)</sup>, and it unifies the elementary cases of conditioning on an event and on another random variable into a single construction<sup>[3](https://keesvs.net/UoM/teaching/martingales/notes/Chapter4.html)</sup>.

| Key fact | Detail |
|---|---|
| Definition | \(\mathbb{E}[X \mid \mathcal{G}]\) is the \(\mathcal{G}\)-measurable random variable with \(\mathbb{E}[Z \mathbf{1}_E] = \mathbb{E}[X \mathbf{1}_E]\) for every \(E \in \mathcal{G}\)<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup> |
| Origin | The modern definition is due to Kolmogorov (1933)<sup>[2](https://www.ma.imperial.ac.uk/~bin06/PfS/2012/pfsl18.pdf)</sup> |
| Existence | For integrable \(X\), the conditional expectation exists and is unique up to almost sure equality; existence follows from the Radon–Nikodym theorem<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup><sup> • </sup><sup>[4](https://people.maths.bris.ac.uk/~mabat/MARTINGALE_THEORY_2016/MT_LN_03_measure_integration_conditional_expectation_3.pdf)</sup> |
| Tower property | \(\mathbb{E}(\mathbb{E}(f \mid \mathcal{F}_2) \mid \mathcal{F}_1) = \mathbb{E}(f \mid \mathcal{F}_1)\) whenever \(\mathcal{F}_1 \subseteq \mathcal{F}_2\)<sup>[5](https://www.math.uchicago.edu/~shmuel/AAT-readings/Combinatorial%20Geometry%2C%20Concentration%2C%20Real%20Algebraic%20Geometry/Barvinok%20concentration%20notes.pdf)</sup> |
| Extremes | If \(\mathcal{G} = \mathcal{F}\) then \(\mathbb{E}[X \mid \mathcal{G}] = X\); if \(\mathcal{G} = \{\varnothing, \Omega\}\) then \(\mathbb{E}[X \mid \mathcal{G}] = \mathbb{E}[X]\)<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup> |
| Prediction | Among all predictors \(g(X)\) of \(Y\) with finite second moment, \(\mathbb{E}[Y \mid X]\) minimizes the mean squared error<sup>[6](https://www.huhuaping.com/projects/hansenEM/chapters_eng/chpt02-ce.html)</sup> |
| Variance identity | \(\operatorname{var}[Y] = \mathbb{E}[\operatorname{var}(Y \mid X)] + \operatorname{var}[\mathbb{E}[Y \mid X]]\)<sup>[6](https://www.huhuaping.com/projects/hansenEM/chapters_eng/chpt02-ce.html)</sup> |

## Definition and intuition

A σ-algebra is a collection of subsets of \(\Omega\) containing \(\varnothing\) and \(\Omega\), closed under complements and countable unions and intersections; it can be read as a list of the questions that can be answered<sup>[5](https://www.math.uchicago.edu/~shmuel/AAT-readings/Combinatorial%20Geometry%2C%20Concentration%2C%20Real%20Algebraic%20Geometry/Barvinok%20concentration%20notes.pdf)</sup>. Conditioning on a sub-σ-algebra \(\mathcal{G}\) means averaging \(X\) over the finest distinctions that \(\mathcal{G}\) can still see, discarding detail finer than \(\mathcal{G}\) records. The result \(Z = \mathbb{E}[X \mid \mathcal{G}]\) must satisfy two properties: \(Z\) is \(\mathcal{G}\)-measurable, meaning \(\sigma(Z) \subseteq \mathcal{G}\), and \(\mathbb{E}[Z \mathbf{1}_E] = \mathbb{E}[X \mathbf{1}_E]\) for every \(E \in \mathcal{G}\)<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>. The second condition says that \(Z\) "integrates the right sets the right way"<sup>[2](https://www.ma.imperial.ac.uk/~bin06/PfS/2012/pfsl18.pdf)</sup>.

The definition reproduces the elementary cases. If \(\mathcal{G}\) is generated by a finite partition \(A_1, \ldots, A_n\) of \(\Omega\), then \(\mathbb{E}[X \mid \mathcal{G}]\) equals, on each event \(A_j\), the number \(\mathbb{E}[X \mid A_j]\), the average of the conditional distribution of \(X\) on that event<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>. In the finite weighted setting, where \(\mathcal{F}\) is a collection of disjoint blocks covering \(X\), the value of the conditional expectation at a point is simply the average of \(f\) over the block containing that point<sup>[5](https://www.math.uchicago.edu/~shmuel/AAT-readings/Combinatorial%20Geometry%2C%20Concentration%2C%20Real%20Algebraic%20Geometry/Barvinok%20concentration%20notes.pdf)</sup>. Conditioning on a random variable \(Y\) means conditioning on \(\sigma(Y)\), the σ-algebra of events \(\{Y \in B\}\) for Borel sets \(B\); one writes \(\mathbb{E}[X \mid Y] = \mathbb{E}[X \mid \sigma(Y)]\)<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>.

## Existence and uniqueness

For an integrable random variable \(X\), the conditional expectation exists, is itself integrable, and is unique up to almost sure equivalence; two candidate versions that differ only on a set of probability zero are regarded as the same random variable<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>. Uniqueness follows by applying the defining integral identity to the event where one version exceeds the other by a positive amount<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>.

**Radon–Nikodym route.** The standard existence proof passes through the Radon–Nikodym theorem: for \(X \in L^1(\Omega, \mathcal{F}, \mu)\) there exists \(Y \in L^1(\Omega, \mathcal{G}, \mu)\) with \(\int_A X \, d\mu = \int_A Y \, d\mu\) for all \(A \in \mathcal{G}\), and this \(Y\) is \(\mathbb{E}[X \mid \mathcal{G}]\)<sup>[4](https://people.maths.bris.ac.uk/~mabat/MARTINGALE_THEORY_2016/MT_LN_03_measure_integration_conditional_expectation_3.pdf)</sup>. In the Hilbert-space view, for \(X \in L^2\) the space \(L^2(\mathcal{G})\) is a closed linear subspace of \(L^2(\mathcal{F})\), and the conditional expectation is the orthogonal projection of \(X\) onto that subspace, whose existence follows from Hilbert's projection theorem<sup>[7](https://www.samuel-drapeau.info/SP_Lecture/lecture/03-Integration/033-radon-nikodym-cond-exp/)</sup>.

## Properties

The conditional expectation operator behaves much like an ordinary expectation, with almost-sure qualifications<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>:

- **Linearity.** \(\mathbb{E}[aX + bY \mid \mathcal{G}] = a\,\mathbb{E}[X \mid \mathcal{G}] + b\,\mathbb{E}[Y \mid \mathcal{G}]\).
- **Monotonicity.** If \(X \le Y\) then \(\mathbb{E}[X \mid \mathcal{G}] \le \mathbb{E}[Y \mid \mathcal{G}]\) almost surely.
- **Trivial cases.** If \(X\) is already \(\mathcal{G}\)-measurable, \(\mathbb{E}[X \mid \mathcal{G}] = X\); if \(X\) is independent of \(\mathcal{G}\), \(\mathbb{E}[X \mid \mathcal{G}] = \mathbb{E}[X]\), the constant<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>.
- **Tower property.** Averaging over finer blocks and then coarser ones gives the same result as averaging over the coarser blocks directly: \(\mathbb{E}(\mathbb{E}(f \mid \mathcal{F}_2) \mid \mathcal{F}_1) = \mathbb{E}(f \mid \mathcal{F}_1)\) when \(\mathcal{F}_1 \subseteq \mathcal{F}_2\)<sup>[5](https://www.math.uchicago.edu/~shmuel/AAT-readings/Combinatorial%20Geometry%2C%20Concentration%2C%20Real%20Algebraic%20Geometry/Barvinok%20concentration%20notes.pdf)</sup>. In particular \(\mathbb{E}[\mathbb{E}[X \mid \mathcal{G}]] = \mathbb{E}[X]\)<sup>[5](https://www.math.uchicago.edu/~shmuel/AAT-readings/Combinatorial%20Geometry%2C%20Concentration%2C%20Real%20Algebraic%20Geometry/Barvinok%20concentration%20notes.pdf)</sup>.
- **Jensen's inequality.** For convex \(\varphi\) with \(\mathbb{E}|X|\) and \(\mathbb{E}|\varphi(X)|\) finite, \(\varphi(\mathbb{E}[X \mid \mathcal{G}]) \le \mathbb{E}[\varphi(X) \mid \mathcal{G}]\) almost surely<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>.
- **Contraction.** For \(p \ge 1\), \(\mathbb{E}|\mathbb{E}[X \mid \mathcal{G}]|^p \le \mathbb{E}|X|^p\), so the operator is a contraction on \(L^p\)<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>.

Taking \(\mathcal{G}\) to be the trivial σ-algebra \(\{\varnothing, \Omega\}\) recovers the ordinary expectation, which represents zero information<sup>[1](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)</sup>.

## Best predictor and regression

When \(\mathbb{E}[Y^2] < \infty\), the conditional expectation \(m(X) = \mathbb{E}[Y \mid X]\) is the best predictor of \(Y\) as a function of \(X\): for any predictor \(g(X)\), \(\mathbb{E}[(Y - g(X))^2] \ge \mathbb{E}[(Y - m(X))^2]\), with equality only when \(g = m\) almost surely<sup>[6](https://www.huhuaping.com/projects/hansenEM/chapters_eng/chpt02-ce.html)</sup><sup> • </sup><sup>[8](https://faculty.washington.edu/yenchic/20A_stat512/Lec5_prediction.html)</sup>. The function \(m(x) = \mathbb{E}[Y \mid X = x]\) is called the regression function<sup>[8](https://faculty.washington.edu/yenchic/20A_stat512/Lec5_prediction.html)</sup>, and this optimality is why many data science problems reduce to estimating conditional expectations<sup>[9](https://rafalab.dfci.harvard.edu/dsbook/regression.html)</sup>.

The decomposition \(Y = \mathbb{E}[Y \mid X] + (Y - \mathbb{E}[Y \mid X])\) splits \(Y\) into an explained part and an unexplained residual with zero mean<sup>[6](https://www.huhuaping.com/projects/hansenEM/chapters_eng/chpt02-ce.html)</sup><sup> • </sup><sup>[8](https://faculty.washington.edu/yenchic/20A_stat512/Lec5_prediction.html)</sup>. Adding variables to the conditioning information never increases the variance of the unexplained part: \(\operatorname{var}[Y] \ge \operatorname{var}[Y - \mathbb{E}[Y \mid X_1]] \ge \operatorname{var}[Y - \mathbb{E}[Y \mid X_1, X_2]]\)<sup>[6](https://www.huhuaping.com/projects/hansenEM/chapters_eng/chpt02-ce.html)</sup>. The unconditional variance decomposes as \(\operatorname{var}[Y] = \mathbb{E}[\operatorname{var}(Y \mid X)] + \operatorname{var}[\mathbb{E}[Y \mid X]]\), the "within group" plus "across group" variance<sup>[6](https://www.huhuaping.com/projects/hansenEM/chapters_eng/chpt02-ce.html)</sup>.

Under a bivariate normal distribution, the conditional expectation is linear in \(X\): \(\mathbb{E}(Y \mid X = x) = \mu_Y + \rho \frac{x - \mu_X}{\sigma_X}\sigma_Y\), the regression line with slope \(\rho \, \sigma_Y / \sigma_X\), and the conditional standard deviation is \(\sigma_Y \sqrt{1 - \rho^2}\)<sup>[9](https://rafalab.dfci.harvard.edu/dsbook/regression.html)</sup>. [Francis Galton](https://www.edgepedia.org/francis-galton) used exactly this fact to show that for bivariate normal data, computing the regression line is equivalent to computing conditional expectations<sup>[9](https://rafalab.dfci.harvard.edu/dsbook/regression.html)</sup>.

## Versions and regular conditional probabilities

Because the conditional expectation is defined only up to null sets, applications that evaluate it pointwise need a consistent choice of versions. A regular conditional probability given \(\mathcal{G}\) is a mapping \(\mathbf{P}: \Omega \times \mathcal{F} \to [0,1]\) such that for each event \(A\), \(\omega \mapsto \mathbf{P}(\omega, A)\) is a version of \(\mathbb{E}[\mathbf{1}_A \mid \mathcal{G}]\), and for almost every fixed \(\omega\) the map \(A \mapsto \mathbf{P}(\omega, A)\) is a probability measure<sup>[3](https://keesvs.net/UoM/teaching/martingales/notes/Chapter4.html)</sup>. Such regular versions exist on most probability spaces used in practice, in particular standard Borel spaces, but not on every probability space<sup>[3](https://keesvs.net/UoM/teaching/martingales/notes/Chapter4.html)</sup>.

## Applications

**Martingales.** A discrete-time process \(X = (X_n)\) is a martingale relative to a filtration \((\mathcal{F}_n)\) if it is adapted, integrable, and satisfies \(\mathbb{E}[X_n \mid \mathcal{F}_{n-1}] = X_{n-1}\) almost surely; the classic exposition is Chapter VII of Doob's 1953 book<sup>[2](https://www.ma.imperial.ac.uk/~bin06/PfS/2012/pfsl18.pdf)</sup>. Martingale arguments built on conditional expectation also yield concentration-of-measure estimates, averaging a function over successive refinements of a partition to interpolate between its global average and its pointwise values<sup>[5](https://www.math.uchicago.edu/~shmuel/AAT-readings/Combinatorial%20Geometry%2C%20Concentration%2C%20Real%20Algebraic%20Geometry/Barvinok%20concentration%20notes.pdf)</sup>.

**Filtering and the Kalman filter.** Conditional expectation is the language of dynamic pricing, hedging, filtering, and risk forecasting<sup>[10](https://maths.dur.ac.uk/users/clare.wallace/MF/Chapter4.html)</sup>. In state estimation, the minimum variance estimate of an unobserved state given noisy measurements is the mean of the conditional density, that is, a conditional expectation<sup>[11](https://epubs.siam.org/doi/10.1137/1.9780898718591.ch3)</sup>. For a linear state-space model, the [Kalman filter](https://www.edgepedia.org/kalman-filter) computes the conditional mean of the state recursively: it predicts \(\hat{S}(t+1 \mid t) = \mathbf{A}\hat{S}(t \mid t)\), then corrects with the Kalman gain \(\mathbf{K}_{t+1} = (\mathbf{L}\operatorname{Var}(S(t+1 \mid t))\mathbf{L}^T + \mathbf{U})^{-1}\mathbf{L}\operatorname{Var}(S(t+1 \mid t))\), and because everything is linear, best linear prediction coincides with the conditional expectation<sup>[12](https://www.stat.cmu.edu/~cshalizi/dst/26/lectures/08/lecture-08.html)</sup>. Under Gaussian assumptions the filter delivers the exact conditional mean and variance of the state given the observations<sup>[12](https://www.stat.cmu.edu/~cshalizi/dst/26/lectures/08/lecture-08.html)</sup>.

## References

1. [S. R. S. Varadhan-style lecture notes on conditional expectation, Lecture Notes 235B, University of California, Davis](https://www.math.ucdavis.edu/~romik/data/uploads/notes/lecturenotes235b.pdf)
2. [Probability for Statistical Scientists, Lecture 18, Imperial College London](https://www.ma.imperial.ac.uk/~bin06/PfS/2012/pfsl18.pdf)
3. [MATH4/67201 Martingale Theory, Chapter 4: Conditional expectation, University of Manchester notes](https://keesvs.net/UoM/teaching/martingales/notes/Chapter4.html)
4. [Bálint Tóth, Measure & Integration, part III: Conditional expectation, University of Bristol](https://people.maths.bris.ac.uk/~mabat/MARTINGALE_THEORY_2016/MT_LN_03_measure_integration_conditional_expectation_3.pdf)
5. [Alexander Barvinok, concentration of measure lecture notes, University of Chicago](https://www.math.uchicago.edu/~shmuel/AAT-readings/Combinatorial%20Geometry%2C%20Concentration%2C%20Real%20Algebraic%20Geometry/Barvinok%20concentration%20notes.pdf)
6. [Bruce Hansen, Econometrics, Chapter 2: Conditional Expectation and Projection](https://www.huhuaping.com/projects/hansenEM/chapters_eng/chpt02-ce.html)
7. [Samuel Drapeau, Stochastics Lecture Notes: Radon–Nikodym and Conditional Expectation](https://www.samuel-drapeau.info/SP_Lecture/lecture/03-Integration/033-radon-nikodym-cond-exp/)
8. [UW STAT 512, Lecture 5: Correlation, prediction, and regression](https://faculty.washington.edu/yenchic/20A_stat512/Lec5_prediction.html)
9. [Rafael Irizarry, Introduction to Data Science, Chapter 17: Regression](https://rafalab.dfci.harvard.edu/dsbook/regression.html)
10. [Clare Wallace, Mathematical Finance Lecture Notes 2024-25, Chapter 4: Filtrations, Conditional Expectation, and Martingales, Durham University](https://maths.dur.ac.uk/users/clare.wallace/MF/Chapter4.html)
11. [Jason L. Speyer and Walter H. Chung, Stochastic Processes, Estimation, and Control, Chapter 3: Conditional Expectations and Discrete-Time Kalman Filtering, SIAM](https://epubs.siam.org/doi/10.1137/1.9780898718591.ch3)
12. [Cosma Shalizi, Data Science and Statistics, Lecture 8: Factor Models, Linear State Space Models, and the Kalman Filter, Carnegie Mellon University](https://www.stat.cmu.edu/~cshalizi/dst/26/lectures/08/lecture-08.html)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Statistics and probability › Probability theory › Expectation, moments, and inequalities › Conditional expectation*

*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
