Question
A disease affects 0.5% of a population. A diagnostic test for the disease has the following properties:
- If a person has the disease, the test returns positive with probability 0.99 (sensitivity = 99%).
- If a person does NOT have the disease, the test returns positive with probability 0.02 (false positive rate = 2%).
A randomly selected person tests positive. Find the probability that this person actually has the disease.
Solution — Step by Step
This is a classic Bayes' theorem application. The counterintuitive result is what makes this question appear repeatedly in competitive exams.
Step 1: Define the events clearly.
Let:
- D = person has the disease
- D' = person does NOT have the disease
- T⁺ = test result is positive
Given information:
- P(D) = 0.005 (0.5% of population)
- P(D') = 1 − 0.005 = 0.995
- P(T⁺ | D) = 0.99 (sensitivity)
- P(T⁺ | D') = 0.02 (false positive rate)
We want: P(D | T⁺) — the probability of actually having the disease given a positive test.
Step 2: Calculate P(T⁺) using the Total Probability Theorem.
A positive test result can come from two situations: the person truly has the disease (true positive) or doesn't have it but tests positive anyway (false positive).
P(T⁺) = P(T⁺ | D) × P(D) + P(T⁺ | D') × P(D')
P(T⁺) = (0.99 × 0.005) + (0.02 × 0.995)
P(T⁺) = 0.00495 + 0.01990
P(T⁺) = 0.02485
Step 3: Apply Bayes' Theorem.
Bayes' Theorem
P(D | T⁺) = [P(T⁺ | D) × P(D)] / P(T⁺)
P(D | T⁺) = (0.99 × 0.005) / 0.02485
P(D | T⁺) = 0.00495 / 0.02485
P(D | T⁺) ≈ 0.1991 ≈ 19.9%
Step 4: Interpret the result.
Despite the test being 99% sensitive (excellent), a person who tests positive has only about a 20% chance of actually having the disease.
80% of positive tests are false positives.
Answer
P(disease | positive test) ≈ 19.9%
Why This Works — The Intuition
This result seems shocking. How can a 99% accurate test be wrong 80% of the time?
Think about 100,000 people:
- 500 have the disease (0.5%)
- 99,500 do not
Among those with disease: 0.99 × 500 = 495 test positive (true positives) Among those without: 0.02 × 99,500 = 1990 test positive (false positives)
Total positives = 495 + 1990 = 2485 True positives as fraction = 495/2485 ≈ 0.199 ≈ 19.9%
The false positives (1990) vastly outnumber the true positives (495) because the disease is rare. Even a small false positive rate applied to a large healthy population overwhelms the true positive signal. This is why rare disease screening requires high-specificity tests and often repeat testing.
Organising with a Probability Table
| Event | Prior P(·) | Likelihood P(T⁺|·) | Joint P(T⁺ ∩ ·) |
|---|---|---|---|
| D (has disease) | 0.005 | 0.99 | 0.00495 |
| D' (no disease) | 0.995 | 0.02 | 0.01990 |
| Total P(T⁺) | 0.02485 |
P(D | T⁺) = Joint / Total = 0.00495 / 0.02485 ≈ 0.199
🎯 Exam Insider
In JEE Advanced and CBSE Class 12, Bayes' theorem problems are solved most clearly when you build the table above. It organises all the information, ensures you don't mix up priors and likelihoods, and makes the final calculation a simple division. Examiners also find it easier to award step marks from a well-laid-out table.
What Changes the Answer?
The posterior probability P(D | T⁺) depends heavily on the prior P(D). If the disease were more common — say 10% of the population instead of 0.5% — the posterior would jump dramatically:
With P(D) = 0.10: P(T⁺) = 0.99 × 0.10 + 0.02 × 0.90 = 0.099 + 0.018 = 0.117 P(D | T⁺) = 0.099 / 0.117 ≈ 84.6%
Same test, very different interpretation based purely on how common the disease is. This is the core lesson of Bayes' theorem.
Common Mistake
⚠️ Common Mistake
Mistake: Confusing P(T⁺ | D) with P(D | T⁺).
The problem gives you P(T⁺ | D) = 0.99 (if you have the disease, the test is positive 99% of the time). But students sometimes read this as P(D | T⁺) = 0.99 (if you test positive, you have the disease 99% of the time). These are completely different probabilities. Bayes' theorem exists precisely to convert one to the other — the answer (≈ 20%) is very different from the 99% sensitivity figure.