askNib

Nib asked

What does Bayes theorem tell us?

the short answer

Bayes' theorem says how much to move your belief when evidence arrives: start from how common the thing was, then weigh how well the evidence fits it, so a 90 percent accurate test for a rare disease still leaves a positive result more…

6 steps, drawn by Nib. Read it here, or watch him draw it. Updated .

1the puzzle

Suppose a disease affects 1 person in 100. A test catches 90 percent of sick people and wrongly flags 10 percent of healthy people. You test positive. The tempting answer is 90 percent, but that mixes up two different probabilities.

P(positive given sick) is not P(sick given positive).

a common mix-upA 90 percent accurate test does not mean a positive result is 90 percent likely to be right: that confuses P(positive given sick) with P(sick given positive).

2count people

Take 1000 people. 10 are sick and the test flags 9 of them (90 percent). 990 are healthy and the test wrongly flags 99 of them (10 percent). That makes 9 + 99 = 108 positive results.

Of 1000 people, 108 test positive: 9 sick and 99 healthy.

3just the positives

Among the 108 people who test positive, only 9 are sick. So the chance you are sick given a positive result is 9/108, about 8.3 percent. The disease is so rare that false alarms from the healthy majority swamp the true positives.

9 of 108 positives are sick: about 8.3 percent.

check yourself

If 1 in 100 were sick and the test had no false positives, what would a positive mean?

Show the answer

Then every positive is sick (100 percent), because there would be no healthy people among the positives.

4the theorem

Bayes' theorem: P(sick | +) = P(+ | sick) P(sick) / P(+). Here P(+ | sick) = 0.9, P(sick) = 0.01, and P(+) = 0.9 × 0.01 + 0.1 × 0.99 = 0.108. So P(sick | +) = 0.009 / 0.108, about 0.083.

P(A|B) = P(B|A) P(A) / P(B).

5base rate

Keeping the same test (90 percent sensitivity, 10 percent false positives), the chance of being sick given a positive result climbs with how common the disease is: 8.3 percent at 1 percent prevalence, 50 percent at 10 percent, and 90 percent at 50 percent.

The same evidence means different things for different base rates.

6the whole idea

Bayes' theorem is a rule for updating: a prior belief, combined with how well the evidence fits each possibility, gives a posterior belief. Thomas Bayes's essay was presented to the Royal Society in 1763, after his death.

Update beliefs: prior times fit, divided by the total.

Bayes' theorem is the rule for letting evidence move your belief by exactly as much as it deserves, no more.