You test positive for a rare disease. How likely is it that you have it?
Probability
Easy
A conditional probability puzzle that Bayes’ theorem solves.
Published
November 16, 2026
NoteQuestion
One person in 100 has a certain disease, and the other 99 are healthy. A test for the disease is positive for 80% of sick people and for 10% of healthy people. Your test is positive. What is the probability that you are sick?
Try it first, then open the solution.
TipSolution
The answer is 8/107, about 7.5%.
Let \(A\) be “you are sick” and \(B\) be “your test is positive”. The question asks for \(P(A \mid B)\), the probability that you are sick given that your test is positive. A conditional probability keeps only the cases in which \(B\) happens, and takes the share of them in which \(A\) also happens:
\[P(A \mid B) = \frac{P(A \cap B)}{P(B)}. \tag{1}\]
The question gives neither the numerator, the probability of being sick and testing positive, nor the denominator, the probability of testing positive. It gives three other probabilities:
Symbol
Meaning
Value
\(P(A)\)
share of people who are sick
0.01
\(P(B \mid A)\)
share of sick people who test positive
0.80
\(P(B \mid \text{not } A)\)
share of healthy people who test positive
0.10
Bayes’ theorem rewrites (1) with these three. For the numerator, write (1) with \(A\) and \(B\) swapped, \(P(B \mid A) = P(A \cap B)/P(A)\), and multiply both sides by \(P(A)\):
The numerator is one of the two terms in the denominator, so the theorem computes a share. Of everyone who tests positive, it gives the share who are sick.
The animation draws the same steps as a tree for 1,000 people, where each probability becomes an expected number of people.
Healthy people are 99 times as common as sick people, so the test’s 10% false positives produce 99 false alarms for every 8 true positives. The same steps work for any evidence and explanation, such as a spam filter’s flag or a trading signal that passes a backtest.
The common wrong answers each use the wrong piece of the tree:
Answer
The slip
80%
gives \(P(B \mid A)\), the reverse of what the question asks
0.8/(0.8 + 0.1) ≈ 89%
uses the two test rates alone, as if sick and healthy people were equally common
0.8%
gives \(P(A \cap B)\) and forgets to divide by \(P(B) = 0.107\)