Skip to content

Law of Total Expectation over a Partition

Theorem

If {Ai}\{A_i\} is a finite or countable partition of the sample space and YY is integrable, then

E[Y]=∑iE[Y∣Ai] P(Ai),\begin{aligned} \mathbb{E}[Y]=\sum_i\mathbb{E}[Y\mid A_i]\,\mathbb{P}(A_{i}), \end{aligned}

where terms with P(Ai)=0\mathbb{P}(A_i)=0 are omitted. The law of total probability (LOTP) is the special case Y=𝟙1BY=\indicator_B of this partition form of the law of total expectation; the random-variable form E[E[Y∣X]]=E[Y]\mathbb{E}[\mathbb{E}[Y\mid X]]=\mathbb{E}[Y] is Adam’s Law.


Interpretation

The overall average is a weighted average of the averages within disjoint cases: split the sample space into cases, find the mean of YY in each case, and weight each case mean by the probability of the case.

Two bars with widths equal to the probabilities 0.3 and 0.7 of the cases A and its complement, and heights equal to the case means 10 and 2; a dashed line at 4.4 marks the overall mean.

In the diagram, the two cases have probabilities 0.30.3 and 0.70.7, drawn as bar widths, and conditional means 1010 and 22, drawn as bar heights. Each term E[Y∣Ai]P(Ai)\mathbb{E}[Y\mid A_i]\mathbb{P}(A_i) is the area of a bar, 33 and 1.41.4. The dashed level 4.44.4 has the same total area.

The cases must be disjoint so that no outcome is counted twice, and must cover the sample space so that none is missed; that is what a partition guarantees. A case with P(Ai)=0\mathbb{P}(A_i)=0 has no conditional mean, but it also contributes nothing, so it is left out.

The theorem is useful when the cases make YY simple. For the number NN of tosses up to and including the first head, with head probability pp, condition on the first toss; after a tail the count starts afresh, so EN=p⋅1+(1−p)(1+EN)\mathbb{E}N=p\cdot1+(1-p)(1+\mathbb{E}N), giving EN=1/p\mathbb{E}N=1/p, the mean of the first success distribution. With Y=𝟙1BY=\indicator_B the theorem becomes the law of total probability, and with the cases {X=x}\{X=x\} for a discrete XX it becomes Adam’s law.

The weights are the case probabilities, not equal weights: the unweighted average (10+2)/2=6(10+2)/2=6 is wrong.


Key Results

  • For a partition {Ai}\{A_i\}, EY=∑i ⁣:P(Ai)>0E[Y∣Ai]P(Ai)\displaystyle \mathbb{E}Y=\sum_{i\colon\mathbb{P}(A_i)>0}\mathbb{E}[Y\mid A_i]\mathbb{P}(A_i).
  • Putting Y=𝟙1BY=\indicator_B gives the law of total probability.

Examples

  • If two equally likely customer groups have mean spending 2020 and 5050, overall mean spending is 3535.
  • If P(A)=0.3\mathbb{P}(A)=0.3, E[Y∣A]=10\mathbb{E}[Y\mid A]=10, and E[Y∣Ac]=2\mathbb{E}[Y\mid A^c]=2, then EY=0.3(10)+0.7(2)=4.4\mathbb{E}Y=0.3(10)+0.7(2)=4.4.

Prerequisites

Sources

Symbols: sum

Last updated: 20 October 2026 03:02