Diagnose a disease with a rare-subtype twist using Bayes
Statistics & ExperimentsModel answerLast updated
Apply Bayes' theorem across two sequential test stages to find the true probability a patient has a rare disease subtype given a positive confirmatory test.
Background
A hospital runs a two-stage diagnostic protocol for a disease that has two subtypes: Type A (aggressive) and Type B (mild).
Population prevalence:
- 2% of patients presenting to the clinic have the disease.
- Among diseased patients, 20% have Type A and 80% have Type B.
Stage 1 — Screening test: A rapid screening test is applied to all patients.
- Sensitivity (true-positive rate): 90% for both subtypes.
- Specificity (true-negative rate): 95% for non-diseased patients.
Stage 2 — Confirmatory test: Only patients who test positive in Stage 1 receive a confirmatory test specifically designed to distinguish Type A.
- Sensitivity for Type A: 85%.
- Specificity (correctly rules out Type A among Type B and among non-diseased who slipped through): 92% for anyone who does not have Type A.
Your tasks
- What is the probability that a randomly selected patient who tests positive on the screening test actually has the disease (either subtype)? Show your work.
- Given a patient who tested positive on the screening test, what is the probability they have Type A specifically?
- A patient tests positive on both the screening test and the confirmatory test. What is the probability they truly have Type A?
- The clinical team wants to keep the false-discovery rate (proportion of "Type A confirmed" calls that are wrong) below 15%. Does the current protocol meet this threshold? If not, what is one concrete lever to improve it?
What is expected: Step-by-step calculation with explicit use of Bayes' theorem, correct handling of conditional probability across the two stages, interpretation of the final numbers, and a thoughtful trade-off discussion.
Hints
Hint 1
For Task 1, start by computing P(positive on screening | disease) and P(positive on screening | no disease), then apply Bayes. Keep track of the base rate carefully — this is where most candidates go wrong.
Hint 2
For Task 3, the population feeding into Stage 2 is no longer the general population. Re-anchor your priors to the sub-population of Stage-1 positives before applying Bayes a second time.
Hint 3
For Task 4, the false-discovery rate is 1 − PPV of the Stage-2 result. Think about which parameter (prevalence, sensitivity, specificity) has the most leverage when the disease is rare.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Setup: define events
- D = has disease, D̄ = no disease
- A = Type A, B = Type B (among diseased)
- S+ = positive on screening test
- C+ = positive on confirmatory test
Given:
- P(D) = 0.02, P(D̄) = 0.98
- P(A | D) = 0.20, P(B | D) = 0.80
- Sensitivity of screening: P(S+ | D) = 0.90
- Specificity of screening: P(S− | D̄) = 0.95 → P(S+ | D̄) = 0.05
- Sensitivity of confirmatory for Type A: P(C+ | A) = 0.85
- Specificity of confirmatory for non-Type-A: P(C− | not A) = 0.92 → P(C+ | not A) = 0.08
Task 1: P(D | S+)
Using the law of total probability:
P(S+) = P(S+ | D)·P(D) + P(S+ | D̄)·P(D̄)
= 0.90 × 0.02 + 0.05 × 0.98
= 0.0180 + 0.0490
= 0.0670
By Bayes:
P(D | S+) = P(S+ | D)·P(D) / P(S+)
= 0.0180 / 0.0670
≈ 0.269 (about 26.9%)
Interpretation: Even with a positive screen, roughly 73% of flagged patients are disease-free — the classic low-prevalence PPV problem.
Task 2: P(A | S+)
Among diseased S+ patients, 20% have Type A. So:
P(A and D and S+) = P(S+ | D)·P(A | D)·P(D)
= 0.90 × 0.20 × 0.02
= 0.0036
P(A | S+) = 0.0036 / 0.0670 ≈ 0.0537 (about 5.4%)
So among all Stage-1 positives, only ~5.4% actually have Type A.
Task 3: P(A | S+ and C+)
We now work entirely within the Stage-1-positive sub-population. The "prior" for Stage 2 is the distribution of S+ patients:
P(A | S+) ≈ 0.0537
P(not A | S+) ≈ 0.9463
"Not A" includes: disease Type B positive on screen, and non-diseased positive on screen.
Apply Bayes for the confirmatory test:
P(C+ | S+) = P(C+ | A)·P(A | S+) + P(C+ | not A)·P(not A | S+)
= 0.85 × 0.0537 + 0.08 × 0.9463
= 0.04565 + 0.07570
= 0.12135
P(A | S+ and C+) = P(C+ | A)·P(A | S+) / P(C+ | S+)
= 0.04565 / 0.12135
≈ 0.376 (about 37.6%)
Interpretation: A patient who clears both tests still has only a ~38% chance of truly having Type A. The false-discovery rate is 1 − 0.376 = 62.4%, far above the 15% target.
Task 4: Does the protocol meet the FDR target?
No. The false-discovery rate is ~62%, not 15%. This is driven by the extremely low pre-test probability of Type A (≈0.4% in the general population, ≈5.4% even after a positive screen).
Concrete levers:
| Lever | Effect | Trade-off |
|---|---|---|
| Raise confirmatory specificity (e.g., 92% → 99%) | Cuts false positives sharply | More expensive test, may reduce sensitivity |
| Pre-screen with a clinical risk score to enrich prevalence | Raises P(A|S+) before Stage 2 | Introduces referral bias; misses atypical presentations |
| Require two independent confirmatory positives | Multiplicative reduction in false positives | Delays diagnosis; burdens true positives with extra testing |
The highest-leverage single change is increasing the confirmatory specificity. At 99% specificity:
P(C+ | S+) = 0.85 × 0.0537 + 0.01 × 0.9463 = 0.04565 + 0.00946 = 0.05511
P(A | S+ and C+) = 0.04565 / 0.05511 ≈ 0.828
FDR = 1 − 0.828 = 17.2%
Still above 15%. Combining enrichment (doubling P(A|D) to 40% via risk scoring) with the higher-specificity test would push FDR below 15%.
Common mistakes to avoid
- Forgetting to re-anchor priors at Stage 2. The confirmatory test is not applied to the general population; P(A) entering Stage 2 is ~5.4%, not 0.4%.
- Confusing sensitivity and specificity directions. Specificity applies to true negatives; a 92% specificity means 8% of non-A patients still test positive.
- Ignoring the non-diseased patients in Stage 2. Healthy patients who slipped through the screening net also contribute false C+ results and must be included in the "not A" group.
- Conflating FDR with FNR. The clinical team cares about false discoveries (wrong positive calls), not missed cases.