Probability: Real-World Scenarios (8)

medium 3 min read

Question

A medical test for a rare disease has 95% accuracy: it correctly identifies 95% of diseased patients (true positive rate) and correctly identifies 95% of healthy patients (true negative rate). The disease affects 1 in 1000 people. If a randomly selected person tests positive, what is the probability that they actually have the disease?

Solution — Step by Step

Let DD = “person has the disease” and TT = “test is positive.”

Given:

  • P(D)=0.001P(D) = 0.001 (rare disease)
  • P(TD)=0.95P(T \mid D) = 0.95 (true positive rate)
  • P(TDc)=10.95=0.05P(T \mid D^c) = 1 - 0.95 = 0.05 (false positive rate)

We want P(DT)P(D \mid T).

P(DT)=P(TD)P(D)P(T)P(D \mid T) = \frac{P(T \mid D) \cdot P(D)}{P(T)}

P(T)=P(TD)P(D)+P(TDc)P(Dc)=0.95×0.001+0.05×0.999P(T) = P(T \mid D) P(D) + P(T \mid D^c) P(D^c) = 0.95 \times 0.001 + 0.05 \times 0.999

=0.00095+0.04995=0.0509= 0.00095 + 0.04995 = 0.0509

P(DT)=0.95×0.0010.0509=0.000950.05090.0187P(D \mid T) = \frac{0.95 \times 0.001}{0.0509} = \frac{0.00095}{0.0509} \approx 0.0187

So even after testing positive, the probability of actually having the disease is only about 1.87%.

Why This Works

This is the classic “base rate fallacy” example. Most people guess that a 95%-accurate test gives 95% confidence in the result. But when the disease is rare, false positives swamp true positives. Out of 1000 people, 1 has the disease and tests positive correctly. But 50 healthy people (5% of 999) also test positive falsely. So out of 51 positive results, only 1 is a true case.

This is why screening for rare conditions can be misleading without follow-up tests, and why understanding conditional probability matters for medicine, security screening, and even spam filters.

Always check the prior probability P(D)P(D). If the event is rare, even a high-accuracy test gives a low posterior probability. The lower the prior, the more powerful Bayes’ adjustment.

Alternative Method

Use a “natural frequency tree” — easier for many students. Imagine 100,000 people:

  • 100 have the disease, 99,900 don’t.
  • Of 100 diseased: 95 test positive, 5 test negative.
  • Of 99,900 healthy: 4995 test positive (5% false positive), 94,905 test negative.

Total positives: 95+4995=509095 + 4995 = 5090. Of these, only 95 actually have the disease.

P(DT)=95/50900.0187P(D \mid T) = 95/5090 \approx 0.0187. Same answer, no formula needed.

Students forget to compute P(T)P(T) properly. Just plugging P(TD)P(T \mid D) as the answer is wrong — that’s the probability of the test being positive given the disease, not the reverse.

Final answer: P(DT)1.87%P(D \mid T) \approx 1.87\%.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next