Probability

Law of Total Probability

The probability of an event is the sum of its probabilities across a partition of the sample space.

If B1, B2, ... partition the sample space, P(A) = sum of P(A | Bi) P(Bi).

The expectation version is more useful in interviews: E[X] = sum of E[X | Bi] P(Bi).

The technique is to condition on the first step of a process. When the remaining problem is identical to the original, you get an equation in the answer itself: E = 1/2(1) + 1/2(1 + E) gives E = 2 for the expected flips to the first head.

Choosing well matters. A good partition makes each branch either trivial or self-similar. If your split produces three cases as hard as the original, split on something else.

Full guide

Conditioning: The Law of Total Probability in Interviews

Split on the first step, solve the pieces, recombine. The single most reliable attack on a probability question you cannot see through.

Related terms

Practise this

Put it into practice

Knowing the definition is not the same as spotting where it applies under time pressure. Work the question bank free.

Start practising free

Browse the full quant interview glossary