# Conditional expectation

In probability theory, the conditional expectation, conditional expected value, or conditional mean of a random variable is its expected value – the value it would take “on average” over an arbitrarily large number of occurrences – given that a certain set of "conditions" is known to occur. If the random variable can take on only a finite number of values, the “conditions” are that the variable can only take on a subset of those values. More formally, in the case when the random variable is defined over a discrete probability space, the "conditions" are a partition of this probability space.

With multiple random variables, for one random variable to be mean independent of all others both individually and collectively means that each conditional expectation equals the random variable's (unconditional) expected value. This always holds if the variables are independent, but mean independence is a weaker condition.

Depending on the nature of the conditioning, the conditional expectation can be either a random variable itself or a fixed value. With two random variables, if the expectation of a random variable ${\displaystyle X}$ is expressed conditional on another random variable ${\displaystyle Y}$ without a particular value of ${\displaystyle Y}$ being specified, then the expectation of ${\displaystyle X}$ conditional on ${\displaystyle Y}$, denoted ${\displaystyle E(X\mid Y)}$, is a function of the random variable ${\displaystyle Y}$ and hence is itself a random variable. Alternatively, if the expectation of ${\displaystyle X}$ is expressed conditional on the occurrence of a particular value of ${\displaystyle Y}$, denoted ${\displaystyle y}$, then the conditional expectation ${\displaystyle E(X\mid Y=y)}$ is a fixed value.

This concept generalizes to any probability space using measure theory.

In modern probability theory the concept of conditional probability is defined in terms of conditional expectation.

## Examples

Example 1. Consider the roll of a fair die and let A = 1 if the number is even (i.e. 2, 4, or 6) and A = 0 otherwise. Furthermore, let B = 1 if the number is prime (i.e. 2, 3, or 5) and B = 0 otherwise.

123456
A010101
B011010

The unconditional expectation of A is ${\displaystyle E[A]=(0+1+0+1+0+1)/6=1/2}$. But the expectation of A conditional on B = 1 (i.e., conditional on the die roll being 2, 3, or 5) is ${\displaystyle E[A\mid B=1]=(1+0+0)/3=1/3}$, and the expectation of A conditional on B = 0 (i.e., conditional on the die roll being 1, 4, or 6) is ${\displaystyle E[A\mid B=0]=(0+1+1)/3=2/3}$. Likewise, the expectation of B conditional on A = 1 is ${\displaystyle E[B\mid A=1]=(1+0+0)/3=1/3}$, and the expectation of B conditional on A = 0 is ${\displaystyle E[B\mid A=0]=(0+1+1)/3=2/3}$.

Example 2. Suppose we have daily rainfall data (mm of rain each day) collected by a weather station on every day of the ten–year (3652–day) period from Jan 1, 1990 to Dec 31, 1999. The unconditional expectation of rainfall for an unspecified day is the average of the rainfall amounts of those 3652 days. The conditional expectation of rainfall for an otherwise unspecified day known to be (conditional on being) in the month of March is the average of daily rainfall over all 310 days of the ten–year period that falls in March. And the conditional expectation of rainfall conditional on days dated March 2 is the average of the rainfall amounts that occurred on the ten days with that specific date.

## History

The related concept of conditional probability dates back at least to Laplace who calculated conditional distributions. It was Andrey Kolmogorov who in 1933 formalized it using the Radon–Nikodym theorem.[1] In works of Paul Halmos[2] and Joseph L. Doob[3] from 1953, conditional expectation was generalized to its modern definition using sub-σ-algebras.[4]

## Classical definition

### Conditional expectation with respect to an event

In classical probability theory the conditional expectation of ${\displaystyle X}$ given an event ${\displaystyle H}$ (which may be the event ${\displaystyle Y=y}$ for a random variable ${\displaystyle Y}$) is the average of ${\displaystyle X}$ over all outcomes in ${\displaystyle H}$, that is

${\displaystyle \operatorname {E} (X\mid H)={\frac {\sum _{\omega \in H}X(\omega )}{|H|}},}$

where ${\displaystyle |H|}$ is the cardinality of ${\displaystyle H}$.

The sum above can be grouped by different values of ${\displaystyle X(\omega )}$, to get a sum over the range ${\displaystyle {\mathcal {X}}}$ of ${\displaystyle X}$

${\displaystyle \operatorname {E} (X\mid H)=\sum _{x\in {\mathcal {X}}}x\,{\frac {|\{\omega \in H\mid X(\omega )=x\}|}{|H|}}.}$

In modern probability theory, when ${\displaystyle H}$ is an event with strictly positive probability, it is possible to give a similar formula. This is notably the case for a discrete random variable ${\displaystyle Y}$ and for ${\displaystyle y}$ in the range of ${\displaystyle Y}$ if the event ${\displaystyle H}$ is ${\displaystyle Y=y}$. Let ${\displaystyle (\Omega ,{\mathcal {F}},P)}$ be a probability space, ${\displaystyle X}$ is a random variable on that probability space, and ${\displaystyle H\in {\mathcal {F}}}$ an event with strictly positive probability ${\displaystyle P(H)>0}$. Then the conditional expectation of ${\displaystyle X}$ given the event ${\displaystyle H}$ is

${\displaystyle \operatorname {E} (X\mid H)={\frac {\operatorname {E} (1_{H}X)}{P(H)}}=\int _{\mathcal {X}}x\,\mathrm {d} P(x\mid H),}$

where ${\displaystyle {\mathcal {X}}}$ is the range of ${\displaystyle X}$ and ${\displaystyle P(\cdot \mid H)}$ is the probability measure defined, for each set ${\displaystyle A}$, as ${\displaystyle P(A\mid H)=P(A\cap H)/P(H)}$, the conditional probability of ${\displaystyle A}$ given ${\displaystyle H}$.

When ${\displaystyle P(H)=0}$ (for instance if ${\displaystyle Y}$ is a continuous random variable and ${\displaystyle H}$ is the event ${\displaystyle Y=y}$, this is in general the case), the Borel–Kolmogorov paradox demonstrates the ambiguity of attempting to define the conditional probability knowing the event ${\displaystyle H}$. The above formula shows that this problem transposes to the conditional expectation. So instead one only defines the conditional expectation with respect to a σ-algebra or a random variable.

### Conditional expectation with respect to a random variable

If Y is a discrete random variable on the same probability space ${\displaystyle (\Omega ,{\mathcal {F}},P)}$ having range ${\displaystyle {\mathcal {Y}}}$, then the conditional expectation of X with respect to Y is the function ${\displaystyle E(X\mid Y)(\cdot )}$ of the variable ${\displaystyle y\in {\mathcal {Y}}}$ defined by

${\displaystyle \operatorname {E} (X\mid Y)(y)=\operatorname {E} (X\mid Y=y).}$

There is a closely related function from ${\displaystyle \Omega }$ to ${\displaystyle {\mathcal {Y}}}$ defined by

${\displaystyle \operatorname {E} (X\mid \sigma (Y))(\omega )=\operatorname {E} (X\mid Y=Y(\omega )).}$

This function, which is different from the previous one, is the conditional expectation of X with respect to the σ-algebra generated by Y. The two are related by

${\displaystyle \operatorname {E} (X\mid \sigma (Y))=\operatorname {E} (X\mid Y)\circ Y.}$

As mentioned above, if Y is a continuous random variable, it is not possible to define ${\displaystyle \operatorname {E} (X\mid Y)}$ by this method. As explained in the Borel–Kolmogorov paradox, we have to specify what limiting procedure produces the set Y = y. If the event space ${\displaystyle \Omega }$ has a distance function, then one procedure for doing so is as follows. Define the set ${\displaystyle H_{y}^{\varepsilon }=\{\omega \mid \|Y(\omega )-y\|<\varepsilon \}}$. Assume that each ${\displaystyle H_{y}^{\varepsilon }}$ is P-measurable and that ${\displaystyle P(H_{y}^{\varepsilon })>0}$ for all ${\displaystyle \varepsilon >0}$. Then conditional expectation with respect to ${\displaystyle H_{y}^{\varepsilon }}$ is well-defined. Take the limit as ${\displaystyle \varepsilon }$ tends to 0 and define

${\displaystyle g(y)=\lim _{\varepsilon \to 0}\operatorname {E} (X\mid H_{y}^{\varepsilon }).}$

Replacing this limiting process by the Radon–Nikodym derivative yields an analogous definition that works more generally.

## Formal definition

### Conditional expectation with respect to a sub-σ-algebra

Consider the following:

• ${\displaystyle (\Omega ,{\mathcal {F}},P)}$ is a probability space.
• ${\displaystyle X:\Omega \to \mathbb {R} ^{n}}$ is a random variable on that probability space with finite expectation.
• ${\displaystyle {\mathcal {H}}\subseteq {\mathcal {F}}}$ is a sub-σ-algebra of ${\displaystyle {\mathcal {F}}}$.

Since ${\displaystyle {\mathcal {H}}}$ is a sub ${\displaystyle \sigma }$-algebra of ${\displaystyle {\mathcal {F}}}$, the function ${\displaystyle X:\Omega \to \mathbb {R} ^{n}}$ is usually not ${\displaystyle {\mathcal {H}}}$-measurable, thus the existence of the integrals of the form ${\textstyle \int _{H}X\,dP|_{\mathcal {H}}}$, where ${\displaystyle H\in {\mathcal {H}}}$ and ${\displaystyle P|_{\mathcal {H}}}$ is the restriction of ${\displaystyle P}$ to ${\displaystyle {\mathcal {H}}}$, cannot be stated in general. However, the local averages ${\textstyle \int _{H}X\,dP}$ can be recovered in ${\displaystyle (\Omega ,{\mathcal {H}},P|_{\mathcal {H}})}$ with the help of the conditional expectation. A conditional expectation of X given ${\displaystyle {\mathcal {H}}}$, denoted as ${\displaystyle \operatorname {E} (X\mid {\mathcal {H}})}$, is any ${\displaystyle {\mathcal {H}}}$-measurable function ${\displaystyle \Omega \to \mathbb {R} ^{n}}$ which satisfies:

${\displaystyle \int _{H}\operatorname {E} (X\mid {\mathcal {H}})\,\mathrm {d} P=\int _{H}X\,\mathrm {d} P}$

for each ${\displaystyle H\in {\mathcal {H}}}$.[5]

The existence of ${\displaystyle \operatorname {E} (X\mid {\mathcal {H}})}$ can be established by noting that ${\textstyle \mu ^{X}:F\mapsto \int _{F}X\,\mathrm {d} P}$ for ${\displaystyle F\in {\mathcal {F}}}$is a finite measure on ${\displaystyle (\Omega ,{\mathcal {F}})}$ that is absolutely continuous with respect to ${\displaystyle P}$. If ${\displaystyle h}$ is the natural injection from ${\displaystyle {\mathcal {H}}}$ to ${\displaystyle {\mathcal {F}}}$, then ${\displaystyle \mu ^{X}\circ h=\mu ^{X}|_{\mathcal {H}}}$ is the restriction of ${\displaystyle \mu ^{X}}$ to ${\displaystyle {\mathcal {H}}}$ and ${\displaystyle P\circ h=P|_{\mathcal {H}}}$ is the restriction of ${\displaystyle P}$ to ${\displaystyle {\mathcal {H}}}$. Furthermore, ${\displaystyle \mu ^{X}\circ h}$ is absolutely continuous with respect to ${\displaystyle P\circ h}$, because the condition

${\displaystyle P\circ h(H)=0\iff P(h(H))=0}$

implies

${\displaystyle \mu ^{X}(h(H))=0\iff \mu ^{X}\circ h(H)=0.}$

Thus, we have

${\displaystyle \operatorname {E} (X\mid {\mathcal {H}})={\frac {\mathrm {d} \mu ^{X}|_{\mathcal {H}}}{\mathrm {d} P|_{\mathcal {H}}}}={\frac {\mathrm {d} (\mu ^{X}\circ h)}{\mathrm {d} (P\circ h)}},}$

where the derivatives are Radon–Nikodym derivatives of measures.

### Conditional expectation with respect to a random variable

Consider, in addition to the above,

• A measurable space ${\displaystyle (U,\Sigma )}$, and
• A random variable ${\displaystyle Y:\Omega \to U}$.

Let ${\displaystyle g:U\to \mathbb {R} ^{n}}$ be a ${\displaystyle \Sigma }$-measurable function such that, for every ${\displaystyle \Sigma }$-measurable function ${\displaystyle f:U\to \mathbb {R} ^{n}}$,

${\displaystyle \int g(Y)f(Y)\,\mathrm {d} P=\int Xf(Y)\,\mathrm {d} P.}$

Then the random variable ${\displaystyle g(Y)}$, denoted as ${\displaystyle \operatorname {E} (X\mid Y)}$, is a conditional expectation of X given ${\displaystyle Y}$.

This definition is equivalent to defining the conditional expectation with respect to the sub-${\displaystyle \sigma }$-field of ${\displaystyle {\mathcal {F}}}$ (see above) defined by the pre-image of Σ by Y. If we define

${\displaystyle {\mathcal {H}}=Y^{-1}(\Sigma )=\{Y^{-1}(B):B\in \Sigma \},}$

then

${\displaystyle \operatorname {E} (X\mid Y)\circ Y=\operatorname {E} (X\mid {\mathcal {H}})={\frac {\mathrm {d} (\mu ^{X}\circ Y^{-1})}{\mathrm {d} (P\circ Y^{-1})}}\circ Y}$.

### Discussion

• This is not a constructive definition; we are merely given the required property that a conditional expectation must satisfy.
• The definition of ${\displaystyle \operatorname {E} (X\mid {\mathcal {H}})}$ may resemble that of ${\displaystyle \operatorname {E} (X\mid H)}$ for an event ${\displaystyle H}$ but these are very different objects. The former is a ${\displaystyle {\mathcal {H}}}$-measurable function ${\displaystyle \Omega \to \mathbb {R} ^{n}}$, while the latter is an element of ${\displaystyle \mathbb {R} ^{n}}$. Evaluating the former at ${\displaystyle H}$ yields the latter.
• Existence of a conditional expectation function may be proven by the Radon–Nikodym theorem. A sufficient condition is that the (unconditional) expected value for X exists.
• Uniqueness can be shown to be almost sure: that is, versions of the same conditional expectation will only differ on a set of probability zero.
• The σ-algebra ${\displaystyle {\mathcal {H}}}$ controls the "granularity" of the conditioning. A conditional expectation ${\displaystyle E(X\mid {\mathcal {H}})}$ over a finer (larger) σ-algebra ${\displaystyle {\mathcal {H}}}$ retains information about the probabilities of a larger class of events. A conditional expectation over a coarser (smaller) σ-algebra averages over more events.

## Conditioning as factorization

In the definition of conditional expectation that we provided above, the fact that ${\displaystyle Y}$ is a real random element is irrelevant. Let ${\displaystyle (U,\Sigma )}$ be a measurable space, where ${\displaystyle \Sigma }$ is a σ-algebra on ${\displaystyle U}$. A ${\displaystyle U}$-valued random element is a measurable function ${\displaystyle Y\colon \Omega \to U}$, i.e. ${\displaystyle Y^{-1}(B)\in {\mathcal {F}}}$ for all ${\displaystyle B\in \Sigma }$. The distribution of ${\displaystyle Y}$ is the probability measure ${\displaystyle P_{Y}:\Sigma \to \mathbb {R} }$ defined as the pushforward measure ${\displaystyle Y_{*}P}$, that is, such that ${\displaystyle P_{Y}(B)=P(Y^{-1}(B))}$.

Theorem. If ${\displaystyle X:\Omega \to \mathbb {R} }$ is an integrable random variable, then there exists a unique integrable random element ${\displaystyle \operatorname {E} (X\mid Y):U\to \mathbb {R} }$, defined ${\displaystyle P_{Y}}$ almost surely, such that

${\displaystyle \int _{Y^{-1}(B)}X\,\mathrm {d} P=\int _{B}\operatorname {E} (X\mid Y)\,\mathrm {d} P_{Y},}$

for all ${\displaystyle B\in \Sigma }$.

Proof sketch. Let ${\displaystyle \mu :\Sigma \to \mathbb {R} }$ be such that ${\textstyle \mu (B)=\int _{Y^{-1}(B)}X\,\mathrm {d} P}$. Then ${\displaystyle \mu }$ is a signed measure which is absolutely continuous with respect to ${\displaystyle P_{Y}}$. Indeed ${\displaystyle P_{Y}(B)=0}$ means exactly that ${\displaystyle P(Y^{-1}(B))=0}$, and since the integral of an integrable function on a set of probability 0 is 0, this proves absolute continuity. The Radon–Nikodym theorem then proves the existence of a density of ${\displaystyle \mu }$ with respect to ${\displaystyle P_{Y}}$. This density is ${\displaystyle \operatorname {E} (X\mid Y)}$. ${\displaystyle \square }$

Comparing with conditional expectation with respect to sub-σ-algebras, it holds that

${\displaystyle \operatorname {E} (X\mid Y)\circ Y=\operatorname {E} \left(X\mid Y^{-1}\left(\Sigma \right)\right).}$

We can further interpret this equality by considering the abstract change of variables formula to transport the integral on the right hand side to an integral over Ω:

${\displaystyle \int _{Y^{-1}(B)}X\,\mathrm {d} P=\int _{Y^{-1}(B)}(\operatorname {E} (X\mid Y)\circ Y)\,\mathrm {d} P.}$

The equation means that the integrals of ${\displaystyle X}$ and the composition ${\displaystyle \operatorname {E} (X\mid Y)\circ Y}$ over sets of the form ${\displaystyle Y^{-1}(B)}$, for ${\displaystyle B\in \Sigma }$, are identical.

This equation can be interpreted to say that the following diagram is commutative on average.

## Computation

When X and Y are both discrete random variables, then the conditional expectation of X given the event Y = y can be considered as function of y for y in the range of Y:

${\displaystyle \operatorname {E} (X\mid Y=y)=\sum _{x\in {\mathcal {X}}}x\,P(X=x\mid Y=y)=\sum _{x\in {\mathcal {X}}}x\,{\frac {P(X=x,Y=y)}{P(Y=y)}},}$

where ${\displaystyle {\mathcal {X}}}$ is the range of X.

If X is a continuous random variable, while Y remains a discrete variable, the conditional expectation is

${\displaystyle \operatorname {E} (X\mid Y=y)=\int _{\mathcal {X}}xf_{X}(x\mid Y=y)\,\mathrm {d} x,}$

with ${\displaystyle f_{X}(x\mid Y=y)={\frac {f_{X,Y}(x,y)}{P(Y=y)}}}$ (where fX,Y(x, y) gives the joint density of X and Y) being the conditional density of X given Y = y.

If both X and Y are continuous random variables, then the conditional expectation is

${\displaystyle \operatorname {E} (X\mid Y=y)=\int _{\mathcal {X}}xf_{X\mid Y}(x\mid y)\,\mathrm {d} x,}$

where ${\displaystyle f_{X\mid Y}(x\mid y)={\frac {f_{X,Y}(x,y)}{f_{Y}(y)}}}$ (where fY(y) gives the density of Y).

## Basic properties

All the following formulas are to be understood in an almost sure sense. The σ-algebra ${\displaystyle {\mathcal {H}}}$ could be replaced by a random variable ${\displaystyle Z}$.

• Pulling out independent factors:
• If ${\displaystyle X}$ is independent of ${\displaystyle {\mathcal {H}}}$, then ${\displaystyle E(X\mid {\mathcal {H}})=E(X)}$.
Proof

Let ${\displaystyle B\in {\mathcal {H}}}$. Then ${\displaystyle X}$ is independent of ${\displaystyle 1_{B}}$, so we get that

${\displaystyle \int _{B}X\,dP=E(X1_{B})=E(X)E(1_{B})=E(X)P(B)=\int _{B}E(X)\,dP.}$

Thus the definition of conditional expectation is satisfied by the constant random variable ${\displaystyle E(X)}$, as desired.

• If ${\displaystyle X}$ is independent of ${\displaystyle \sigma (Y,{\mathcal {H}})}$, then ${\displaystyle E(XY\mid {\mathcal {H}})=E(X)\,E(Y\mid {\mathcal {H}})}$. Note that this is not necessarily the case if ${\displaystyle X}$ is only independent of ${\displaystyle {\mathcal {H}}}$ and of ${\displaystyle Y}$.
• If ${\displaystyle X,Y}$ are independent, ${\displaystyle {\mathcal {G}},{\mathcal {H}}}$ are independent, ${\displaystyle X}$ is independent of ${\displaystyle {\mathcal {H}}}$ and ${\displaystyle Y}$ is independent of ${\displaystyle {\mathcal {G}}}$, then ${\displaystyle E(E(XY\mid {\mathcal {G}})\mid {\mathcal {H}})=E(X)E(Y)=E(E(XY\mid {\mathcal {H}})\mid {\mathcal {G}})}$.
• Stability:
• If ${\displaystyle X}$ is ${\displaystyle {\mathcal {H}}}$-measurable, then ${\displaystyle E(X\mid {\mathcal {H}})=X}$.
• If Z is a random variable, then ${\displaystyle \operatorname {E} (f(Z)\mid Z)=f(Z)}$. In its simplest form, this says ${\displaystyle \operatorname {E} (Z\mid Z)=Z}$.
• Pulling out known factors:
• If ${\displaystyle X}$ is ${\displaystyle {\mathcal {H}}}$-measurable, then ${\displaystyle E(XY\mid {\mathcal {H}})=X\,E(Y\mid {\mathcal {H}})}$.
• If Z is a random variable, then ${\displaystyle \operatorname {E} (f(Z)Y\mid Z)=f(Z)\operatorname {E} (Y\mid Z)}$.
• Law of total expectation: ${\displaystyle E(E(X\mid {\mathcal {H}}))=E(X)}$.
• Tower property:
• For sub-σ-algebras ${\displaystyle {\mathcal {H}}_{1}\subset {\mathcal {H}}_{2}\subset {\mathcal {F}}}$ we have ${\displaystyle E(E(X\mid {\mathcal {H}}_{2})\mid {\mathcal {H}}_{1})=E(X\mid {\mathcal {H}}_{1})}$.
• A special case is when Z is a ${\displaystyle {\mathcal {H}}}$-measurable random variable. Then ${\displaystyle \sigma (Z)\subset {\mathcal {H}}}$ and thus ${\displaystyle E(E(X\mid {\mathcal {H}})\mid Z)=E(X\mid Z)}$.
• Doob martingale property: the above with ${\displaystyle Z=E(X\mid {\mathcal {H}})}$ (which is ${\displaystyle {\mathcal {H}}}$-measurable), and using also ${\displaystyle \operatorname {E} (Z\mid Z)=Z}$, gives ${\displaystyle E(X\mid E(X\mid {\mathcal {H}}))=E(X\mid {\mathcal {H}})}$.
• For random variables ${\displaystyle X,Y}$ we have ${\displaystyle E(E(X\mid Y)\mid f(Y))=E(X\mid f(Y))}$.
• For random variables ${\displaystyle X,Y,Z}$ we have ${\displaystyle E(E(X\mid Y,Z)\mid Y)=E(X\mid Y)}$.
• Linearity: we have ${\displaystyle E(X_{1}+X_{2}\mid {\mathcal {H}})=E(X_{1}\mid {\mathcal {H}})+E(X_{2}\mid {\mathcal {H}})}$ and ${\displaystyle E(aX\mid {\mathcal {H}})=a\,E(X\mid {\mathcal {H}})}$ for ${\displaystyle a\in \mathbb {R} }$.
• Positivity: If ${\displaystyle X\geq 0}$ then ${\displaystyle E(X\mid {\mathcal {H}})\geq 0}$.
• Monotonicity: If ${\displaystyle X_{1}\leq X_{2}}$ then ${\displaystyle E(X_{1}\mid {\mathcal {H}})\leq E(X_{2}\mid {\mathcal {H}})}$.
• Monotone convergence: If ${\displaystyle 0\leq X_{n}\uparrow X}$ then ${\displaystyle E(X_{n}\mid {\mathcal {H}})\uparrow E(X\mid {\mathcal {H}})}$.
• Dominated convergence: If ${\displaystyle X_{n}\to X}$ and ${\displaystyle |X_{n}|\leq Y}$ with ${\displaystyle Y\in L^{1}}$, then ${\displaystyle E(X_{n}\mid {\mathcal {H}})\to E(X\mid {\mathcal {H}})}$.
• Fatou's lemma: If ${\displaystyle \textstyle E(\inf _{n}X_{n}\mid {\mathcal {H}})>-\infty }$ then ${\displaystyle \textstyle E(\liminf _{n\to \infty }X_{n}\mid {\mathcal {H}})\leq \liminf _{n\to \infty }E(X_{n}\mid {\mathcal {H}})}$.
• Jensen's inequality: If ${\displaystyle f\colon \mathbb {R} \rightarrow \mathbb {R} }$ is a convex function, then ${\displaystyle f(E(X\mid {\mathcal {H}}))\leq E(f(X)\mid {\mathcal {H}})}$.
• Conditional variance: Using the conditional expectation we can define, by analogy with the definition of the variance as the mean square deviation from the average, the conditional variance
• Definition: ${\displaystyle \operatorname {Var} (X\mid {\mathcal {H}})=\operatorname {E} {\bigl (}(X-\operatorname {E} (X\mid {\mathcal {H}}))^{2}\mid {\mathcal {H}}{\bigr )}}$
• Algebraic formula for the variance: ${\displaystyle \operatorname {Var} (X\mid {\mathcal {H}})=\operatorname {E} (X^{2}\mid {\mathcal {H}})-{\bigl (}\operatorname {E} (X\mid {\mathcal {H}}){\bigr )}^{2}}$
• Law of total variance: ${\displaystyle \operatorname {Var} (X)=\operatorname {E} (\operatorname {Var} (X\mid {\mathcal {H}}))+\operatorname {Var} (\operatorname {E} (X\mid {\mathcal {H}}))}$.
• Martingale convergence: For a random variable ${\displaystyle X}$, that has finite expectation, we have ${\displaystyle E(X\mid {\mathcal {H}}_{n})\to E(X\mid {\mathcal {H}})}$, if either ${\displaystyle {\mathcal {H}}_{1}\subset {\mathcal {H}}_{2}\subset \dotsb }$ is an increasing series of sub-σ-algebras and ${\displaystyle \textstyle {\mathcal {H}}=\sigma (\bigcup _{n=1}^{\infty }{\mathcal {H}}_{n})}$ or if ${\displaystyle {\mathcal {H}}_{1}\supset {\mathcal {H}}_{2}\supset \dotsb }$ is a decreasing series of sub-σ-algebras and ${\displaystyle \textstyle {\mathcal {H}}=\bigcap _{n=1}^{\infty }{\mathcal {H}}_{n}}$.
• Conditional expectation as ${\displaystyle L^{2}}$-projection: If ${\displaystyle X,Y}$ are in the Hilbert space of square-integrable real random variables (real random variables with finite second moment) then
• for ${\displaystyle {\mathcal {H}}}$-measurable ${\displaystyle Y}$, we have ${\displaystyle E(Y(X-E(X\mid {\mathcal {H}})))=0}$, i.e. the conditional expectation ${\displaystyle E(X\mid {\mathcal {H}})}$ is in the sense of the L2(P) scalar product the orthogonal projection from ${\displaystyle X}$ to the linear subspace of ${\displaystyle {\mathcal {H}}}$-measurable functions. (This allows to define and prove the existence of the conditional expectation based on the Hilbert projection theorem.)
• the mapping ${\displaystyle X\mapsto \operatorname {E} (X\mid {\mathcal {H}})}$ is self-adjoint: ${\displaystyle \operatorname {E} (X\operatorname {E} (Y\mid {\mathcal {H}}))=\operatorname {E} \left(\operatorname {E} (X\mid {\mathcal {H}})\operatorname {E} (Y\mid {\mathcal {H}})\right)=\operatorname {E} (\operatorname {E} (X\mid {\mathcal {H}})Y)}$
• Conditioning is a contractive projection of Lp spaces ${\displaystyle L^{p}(\Omega ,{\mathcal {F}},P)\rightarrow L^{p}(\Omega ,{\mathcal {H}},P)}$. I.e., ${\displaystyle \operatorname {E} {\big (}|\operatorname {E} (X\mid {\mathcal {H}})|^{p}{\big )}\leq \operatorname {E} {\big (}|X|^{p}{\big )}}$ for any p  1.
• Doob's conditional independence property:[6] If ${\displaystyle X,Y}$ are conditionally independent given ${\displaystyle Z}$, then ${\displaystyle P(X\in B\mid Y,Z)=P(X\in B\mid Z)}$ (equivalently, ${\displaystyle E(1_{\{X\in B\}}\mid Y,Z)=E(1_{\{X\in B\}}\mid Z)}$).

## Notes

1. Kolmogorov, Andrey (1933). Grundbegriffe der Wahrscheinlichkeitsrechnung (in German). Berlin: Julius Springer. p. 46.
2. Oxtoby, J. C. (1953). "Review: Measure theory, by P. R. Halmos" (PDF). Bull. Amer. Math. Soc. 59 (1): 89–91. doi:10.1090/s0002-9904-1953-09662-8.
3. J. L. Doob (1953). Stochastic Processes. John Wiley & Sons. ISBN 0-471-52369-0.
4. Olav Kallenberg: Foundations of Modern Probability. 2. edition. Springer, New York 2002, ISBN 0-387-95313-2, S. 573.
5. Billingsley, Patrick (1995). "Section 34. Conditional Expectation". Probability and Measure (3rd ed.). John Wiley & Sons. p. 445. ISBN 0-471-00710-2.
6. Kallenberg, Olav (2001). Foundations of Modern Probability (2nd ed.). York, PA, USA: Springer. p. 110. ISBN 0-387-95313-2.

## References

• William Feller, An Introduction to Probability Theory and its Applications, vol 1, 1950, page 223
• Paul A. Meyer, Probability and Potentials, Blaisdell Publishing Co., 1966, page 28
• Grimmett, Geoffrey; Stirzaker, David (2001). Probability and Random Processes (3rd ed.). Oxford University Press. ISBN 0-19-857222-0., pages 67–69