The law of total probability
6 min read
Short answer
If events are disjoint and cover the whole sample space (a partition), then . It is "divide into cases, weigh each case by how likely it is, and add", and it is also the denominator in Bayes' theorem.
Why it works
The partition cuts into non-overlapping slices: , and these slices are disjoint because the are. By additivity,
where the last step is the multiplication rule . Conditional probabilities are easy to state ("given machine 2, the defect rate is 4%"), so this converts a hard unconditional question into easy conditional ones.
Two conditions that matter
The must be mutually exclusive (no overlaps, or you double count) and exhaustive (together they cover every outcome, or you miss some). The simplest partition is , giving .
The weights must add to 1. A quick sanity check is to confirm that, and that the final answer lies between the smallest and largest of the , since it is a weighted average of them.
Connection to Bayes' theorem
Bayes' theorem reverses a conditional: . The denominator is generally not given directly, and the law of total probability supplies it. In words: how much of all the ways can happen comes through case ?
Drawing a tree makes this concrete: branch first on the case, then on whether occurs, multiply along each path and add the paths that end in .
Worked example
Three machines make 50%, 30% and 20% of a factory's items, with defect rates 2%, 4% and 10%. Find and the chance a defective item came from machine 3.
By Bayes, .
Machine 3 makes only 20% of items but about 48% of the defects.
Try it yourself
The chance of rain is . You are late with probability on rainy days and on dry days. What is ?
Show the answer
.
Keep going with practice
Vidi's conditional probability lessons use case splits like this one in tree-diagram problems.