Skip to content

Adam’s Law: Total Expectation

Theorem

For random variables XX and YY with E∣Y∣<∞\mathbb{E}|Y|<\infty,

E[E[Y∣X]]=E[Y].\begin{aligned} \mathbb{E}[\mathbb{E}[Y\mid X]]=\mathbb{E}[Y]. \end{aligned}

Interpretation

Adam’s law computes a mean in two steps: first the mean of YY within each scenario X=xX=x, then the average of these conditional means over the distribution of XX. Averaging the conditional average recovers the original average.

Graph of the conditional mean 10x of Y given X = x for x from 0 to 1, with the shaded area under it equal to 5 and a horizontal line at the overall mean E(Y) = 5.

For X∼Unif⁡(0,1)X\sim\operatorname{Unif}(0,1) and Y∣X∼Bin⁡(10,X)Y\mid X\sim\operatorname{Bin}(10,X), the conditional mean is g(x)=10xg(x)=10x. Since XX has density 11 on (0,1)(0,1), the average of g(X)g(X) is the shaded area under the line, ∫0110x dx=5\int_0^1 10x\,\mathrm{d}x=5, which is the height of the dashed line E[Y]=5\mathbb{E}[Y]=5.

Here XX is discrete with three values. E[Y∣X=x]\mathbb{E}[Y\mid X=x] is the centre of each group; averaging these with the probabilities P(X=x)\mathbb{P}(X=x) gives EY\mathbb{E}Y.

The inner expectation E[Y∣X]=g(X)\mathbb{E}[Y\mid X]=g(X) is a random variable; the outer one averages it with the distribution of XX, by LOTUS: a sum over pX(x)p_X(x) for discrete XX, an integral against fX(x)f_X(x) for continuous XX. The condition E∣Y∣<∞\mathbb{E}|Y|<\infty makes both sides finite and well defined. The method pays off in two-stage models, where the conditional law of YY is simple but its unconditional law is not.

For a discrete XX the law is the law of total expectation over a partition with the cases {X=x}\{X=x\}, and taking YY an indicator gives back the law of total probability, discrete or continuous. The corresponding rule for variances returns later as Eve’s law.

The outer average must use the distribution of XX: if XX had density 2x2x on (0,1)(0,1) instead, the same conditional means 10x10x would give EY=∫0110x⋅2x dx=20/3\mathbb{E}Y=\int_0^1 10x\cdot2x\,\mathrm{d}x=20/3, not 55.


Key Results

  • For discrete XX, EY=∑xE[Y∣X=x]pX(x)\displaystyle \mathbb{E}Y=\sum_x\mathbb{E}[Y\mid X=x]p_X(x); for density XX, use the corresponding integral.
  • Conditioning on more information first and then on less gives the conditional expectation given the smaller information: E[E[Y∣X,Z]∣Z]=E[Y∣Z]\mathbb{E}[\mathbb{E}[Y\mid X,Z]\mid Z]=\mathbb{E}[Y\mid Z] (Adam's law with extra conditioning).

Examples

  • If X∼Unif⁡(0,1)X\sim\operatorname{Unif}(0,1) and Y∣X∼Bin⁡(10,X)Y\mid X\sim\operatorname{Bin}(10,X), then EY=E[10X]=5\mathbb{E}Y=\mathbb{E}[10X]=5.
  • If X∼Exp⁡(2)X\sim\operatorname{Exp}(2) and Y∣X∼Pois⁡(X)Y\mid X\sim\operatorname{Pois}(X), then EY=EX=1/2\mathbb{E}Y=\mathbb{E}X=1/2.

Prerequisites

Sources

Aliases: law of total expectation, total expectation formula, law of iterated expectations, tower property, law of double expectation Symbols: infinity, integral, sum

Last updated: 20 October 2026 03:02