Euler Hall — free maths guides

Apply the law of total probability

Split a sample space into two exhaustive cases. The idea in plain words, a worked example, and a check with the answers shown — part of the free Statistics guides.

A weighted mixture of cases

To find the probability of an eventBB when the sample space splits into two casesAA and notAA, weight each case's conditional probability by how common the case is:

P(B)=P(B∣A)P(A)+P(B∣not A)P(not A).P(B) = P(B \mid A)P(A) + P(B \mid \text{not } A)P(\text{not } A).

That is the law of total probability, and it has one idea in it: a mixture is weighted by the shares. The two weights are the fractions of the population in each case, and they sum to 1 because the cases exhaust it.

So the overall rate is always between the two branch rates, and closer to the rate of the branch that is more common.

Why the law is not an extra rule

It is the addition rule applied to a partition. The eventBB happens either withAA or without it, and those two pieces are disjoint, so their probabilities add. Each piece is an intersection, andP(B∩A)=P(B∣A)P(A)P(B \cap A) = P(B \mid A)P(A) is the multiplication rule.

So the law of total probability is two earlier rules composed — which is why it is the tool that turns a tree diagram into a single number.

Worked example: a screening test

A disease affects 1% of a population. The test detects it in 95% of cases and gives a false positive in 10% of healthy people. What is the probability of a positive test?

The branches. Diseased:0.95×0.01=0.00950.95 \times 0.01 = 0.0095. Healthy:0.10×0.99=0.0990.10 \times 0.99 = 0.099.

The total.0.0095+0.099=0.10850.0095 + 0.099 = 0.1085 — about 10.9%.

The reading. Almost eleven in a hundred test positive, and only about one in eleven of those actually has the disease. The false positives dominate because the healthy group is 99 times as large — which is the law of total probability doing its real work.

By the end you can
  • Split a sample space into two exhaustive cases
  • Weight each branch's conditional probability by how common its case is
  • Say why an unweighted average of the two branches is wrong
Check yourself
  1. 1. 20% of items come from a line with a 1% fault rate; the rest from one with 6%.
  2. 2. What is the overall fault rate?
  3. 3. Which branch dominates and why?
Answers
  1. 1.0.2(0.01)+0.8(0.06)=0.050.2(0.01) + 0.8(0.06) = 0.05.
  2. 2. The second, because 80% of items come from it.
Work out where to start — free, no accountAnswer six real questions — free, no account