Bayes' Theorem with Counts

Category: Probability   Level: 301

P(sick | +) = 9/(9 + 89) ≈ 9.2%

Turn percentages into people. Out of 1000 people, a test with 90% sensitivity and a 9% false positive rate flags 98 people, and only 9 of them are sick.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Start with 1000 people

Percentages are slippery, so count people instead. Each square is one person.

1000 people

Step 1: Start with 1000 people

Step 2: Mark the 1% who are sick

One percent of 1000 is 10. The other 990 are healthy.

1% × 1000 = 10

Step 2: Mark the 1% who are sick

Step 3: Test the sick

The test catches 90% of sick people: 9 test positive and 1 slips through as negative.

90% × 10 = 9

Step 3: Test the sick

Step 4: Test the healthy

The test also flags 9% of healthy people by mistake. Nine percent of 990 is 89.1, so about 89 false alarms.

9% × 990 = 89.1 ≈ 89

Step 4: Test the healthy

Step 5: Line up everyone who tests positive

Pull out the positives: 9 sick people and 89 healthy ones. The healthy crowd is much bigger, so it makes most of the positive results.

9 + 89 = 98 positive tests

Step 5: Line up everyone who tests positive

Step 6: Read the answer

A positive test means about a 9% chance of being sick, not 90%. The rare disease loses the numbers game to the big healthy group.

P(sick | +) = 9/98 ≈ 9.2%

Step 6: Read the answer

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render bayes-natural-frequencies --out /tmp/bayes-natural-frequencies

Source: svgmath/diagrams/probability.py