Diagnose a Rare-Disease Screening Test Using Bayes' Theorem
Statistics & ExperimentsModel answerLast updated
Apply conditional probability and Bayes' theorem to evaluate the real-world predictive value of a medical screening test with known sensitivity and specificity.
Scenario
A public health agency has developed a rapid screening test for a rare metabolic disorder. Before deploying it nationwide, an analyst must assess how useful a positive test result actually is in practice.
You are given the following information:
- The disorder affects 1 in 1,000 people in the general population (prevalence = 0.1%)
- The test has a sensitivity of 99% (true positive rate): if a person has the disorder, the test is positive 99% of the time
- The test has a specificity of 95% (true negative rate): if a person does not have the disorder, the test is negative 95% of the time
Questions
Part 1 — Core calculation What is the positive predictive value (PPV) of this test — that is, the probability that a randomly selected person who tests positive actually has the disorder? Show all steps.
Part 2 — Sensitivity analysis The agency is considering restricting screening to a higher-risk subgroup where prevalence is 2% instead of 0.1%. Recalculate the PPV and explain the practical implication.
Part 3 — Conceptual follow-up A non-technical stakeholder argues: "The test is 99% accurate, so a positive result is almost certainly correct." Where is the flaw in this reasoning, and what is the underlying statistical concept at play?
What is expected
- Correct numerical answers with clearly laid-out arithmetic
- Intuition for why the numbers behave this way
- Discussion of the trade-offs and real-world consequences
- A clear explanation of the concept without jargon overload
Hints
Hint 1
Start by defining the four outcomes for a population of 100,000 people: true positives, false positives, true negatives, false negatives. Concrete counts often make the arithmetic clearer than fractions alone.
Hint 2
PPV = P(disease | positive test). Use Bayes' theorem: P(D+|T+) = P(T+|D+)·P(D+) / P(T+), where P(T+) requires the law of total probability across both diseased and healthy groups.
Hint 3
The key driver of PPV is prevalence. When the base rate is very low, even a highly specific test generates a large absolute number of false positives relative to true positives — this is the base rate neglect problem.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Part 1 — PPV in the General Population (prevalence = 0.1%)
Setup with a concrete population
Use a reference population of 100,000 people.
| Group | Count |
|---|---|
| Have the disorder (D+) | 100 |
| Do not have the disorder (D−) | 99,900 |
True positives (TP): sensitivity × D+ = 0.99 × 100 = 99
False negatives (FN): 100 − 99 = 1
True negatives (TN): specificity × D− = 0.95 × 99,900 = 94,905
False positives (FP): 99,900 − 94,905 = 4,995
Total positives and PPV
Total who test positive = TP + FP = 99 + 4,995 = 5,094
$$PPV = \frac{TP}{TP + FP} = \frac{99}{5{,}094} \approx 0.0194 \approx \textbf{1.9%}$$
Interpretation: Even with a 99% sensitive and 95% specific test, fewer than 2 in 100 people who test positive actually have the disorder. The vast majority of positives are false alarms.
Why? Bayes' theorem perspective
$$P(D^+|T^+) = \frac{P(T^+|D^+) \cdot P(D^+)}{P(T^+|D^+) \cdot P(D^+) + P(T^+|D^-) \cdot P(D^-)}$$
$$= \frac{0.99 \times 0.001}{0.99 \times 0.001 + 0.05 \times 0.999} = \frac{0.00099}{0.00099 + 0.04995} = \frac{0.00099}{0.05094} \approx 1.9%$$
The denominator is dominated by the false-positive term because the healthy pool (99.9% of people) is enormous relative to the diseased pool.
Part 2 — PPV in the High-Risk Subgroup (prevalence = 2%)
Reference population of 100,000:
| Group | Count |
|---|---|
| Have the disorder (D+) | 2,000 |
| Do not have the disorder (D−) | 98,000 |
TP: 0.99 × 2,000 = 1,980
FP: 0.05 × 98,000 = 4,900
Total positives: 1,980 + 4,900 = 6,880
$$PPV = \frac{1{,}980}{6{,}880} \approx 0.288 \approx \textbf{28.8%}$$
Practical implication
Targeting the high-risk subgroup raises the PPV from ~2% to ~29% — a 15× improvement — without changing the test at all. This means:
- Clinicians follow up a positive result with much more confidence
- Fewer unnecessary treatments, patient anxiety, and downstream costs from false positives
- Resources are concentrated where the disorder is actually likely
The lesson is that screening strategy (who you test) can matter as much as test performance (how good the test is).
Part 3 — The Flaw in the "99% Accurate" Argument
The stakeholder is committing base rate neglect (also called the base rate fallacy).
The phrase "99% accurate" conflates two very different conditional probabilities:
- Sensitivity: P(T+ | D+) = 0.99 — how well the test detects disease when it is present
- PPV: P(D+ | T+) ≈ 0.019 — how likely disease is given a positive result
These are not the same quantity. Bayes' theorem tells us the PPV depends critically on the prior probability (prevalence). When the prior is extremely small, even a tiny false-positive rate overwhelms the true positives because the healthy population is so much larger in absolute terms.
A simple analogy: Imagine a 99%-accurate smoke alarm that also triggers 5% of the time when there is no fire. In a city block where fires occur once a decade, nearly every alarm you hear is a false alarm — not because the alarm is bad, but because fires are so rare.
Common interview mistakes to avoid
- Confusing sensitivity with PPV. These are inverses of each other in conditional-probability terms; do not equate them.
- Ignoring the denominator. Students often compute TP correctly but forget to add FP to get total positives.
- Forgetting prevalence changes everything. A test does not have a single "accuracy" independent of context — its utility depends on where and on whom it is used.
- Not distinguishing specificity from PPV. High specificity reduces false positives but does not eliminate them when the population of healthy individuals is large enough.
Key takeaway
The PPV is the operationally meaningful metric for a clinician receiving a positive test result. Sensitivity and specificity are intrinsic test properties, but PPV is context-dependent — it is a function of both test performance and the prevalence in the tested population. This distinction is why targeted screening programs consistently outperform universal screening for rare conditions.