---
tag: 0YAMJRK04E
kind: definition
name: Conditional expectation
msc: [60A10]
defines: 0TTDGTEFMN
uses: [0DCT0QZVQ1, 04WSW8T3SY, 0DKRR22AEQ, 0FJB06AD2P]
sources:
  - url: https://en.wikipedia.org/wiki/Conditional_expectation
    locator: Conditional expectation with respect to a sub-σ-algebra
---

## Definition

Let $X$ be an integrable real random variable on a probability space $(\Omega, \mathcal{F}, P)$, and let $\mathcal{G} \subseteq \mathcal{F}$ be a [[σ-algebra|04WSW8T3SY]].
A conditional expectation of $X$ given $\mathcal{G}$ is an integrable random variable $Z$ with these two properties:
1. $Z$ is $\mathcal{G}$-measurable.
2. $E[Z \, 1_G] = E[X \, 1_G]$ for each $G \in \mathcal{G}$.
Such a $Z$ exists, and two such random variables are equal almost surely. One writes $Z = E[X \mid \mathcal{G}]$.
For a random variable $Y$, $E[X \mid Y] = E[X \mid \sigma(Y)]$, where $\sigma(Y)$ is the σ-algebra generated by $Y$.

## Remarks

The existence follows from the Radon–Nikodym theorem. For $E[X^2] < \infty$, $E[X \mid \mathcal{G}]$ is the orthogonal projection of $X$ onto $L^2(\mathcal{G})$.
For a discrete $Y$, $E[X \mid Y] = g(Y)$ with $g(y) = E[X \, 1_{\{Y = y\}}] / P(Y = y)$ when $P(Y = y) > 0$. This $g(y)$ is the expectation of $X$ under the [[conditional probability|0FJB06AD2P]] $P(\cdot \mid Y = y)$.
The conditional expectation is linear and monotone. If $W$ is $\mathcal{G}$-measurable and $WX$ is integrable, then $E[WX \mid \mathcal{G}] = W \, E[X \mid \mathcal{G}]$.
If $X$ is independent of $\mathcal{G}$, then $E[X \mid \mathcal{G}] = E[X]$.

## Explanations

### L1 human

$E[X \mid Y]$ is the average value of $X$ when you know $Y$. It changes with $Y$, so it is a random variable.
For two dice with results $D_1$ and $D_2$, $E[D_1 + D_2 \mid D_1] = D_1 + 3.5$.
