Quant GT
Browse all lessons
Section 3 · Lesson 3.3

Law of Total Probability

Stitching together cases that partition the sample space.

When you can't compute P(A)P(A) directly, condition on something you can. If {B1,B2,,Bn}\{B_1, B_2, \dots, B_n\} is a partition of the sample space — pairwise disjoint and jointly covering all of Ω\Omega — then for any event AA:

P(A)=i=1nP(ABi)P(Bi)P(A) = \sum_{i=1}^{n} P(A \mid B_i)\, P(B_i)

The pieces are usually easier than the whole. To compute P(rain tomorrow)P(\text{rain tomorrow}), condition on whether the wind shifts overnight; to compute P(system fails)P(\text{system fails}), condition on which subsystem went down.

The same idea works for expectations:

E[X]=iE[XBi]P(Bi)E[X] = \sum_{i} E[X \mid B_i]\, P(B_i)

This is the engine behind recursive expectation problems. The classic example: the expected number of fair-coin flips until two heads in a row. Let E0E_0 be the expectation from a clean state and E1E_1 the expectation after seeing one head. Conditioning on the next flip gives a small linear system you can solve in seconds.