MAKINDO MEDICINE · Statistics & Evidence-Based Medicine202 / 268
Statistics: Diagnostic tests, screening and Bayes' theorem
📊 Diagnostic tests, screening and Bayes' theorem. Every test result changes a probability rather than delivering a certainty. Sensitivity, specificity, predictive values and likelihood ratios are among the most examined statistics in the UKMLA and MRCP, and they are used every day when interpreting D-dimers, troponins, FIT and screening results. This chapter shows how to calculate and interpret them, and why the same test behaves differently in general practice and in a specialist clinic.
Your four questions for any test result: What was the probability of disease before the test? How good is the test (sensitivity, specificity, likelihood ratio)? What is the probability now? Will the result change what I do?
The 2 × 2 Table
| Test result | Disease present | Disease absent | Total |
|---|---|---|---|
| Positive | a - true positive (TP) | b - false positive (FP) | a + b |
| Negative | c - false negative (FN) | d - true negative (TN) | c + d |
| Total | a + c | b + d | N |
- Always draw the table - with columns for disease status (the reference standard) and rows for the test result.
- Prevalence = (a + c) ÷ N.
- In exams, if given prevalence, sensitivity and specificity, construct the table from a convenient population (e.g. 1,000 or 10,000).
Sensitivity and Specificity
- Sensitivity = a ÷ (a + c) = TP ÷ all with disease - the proportion of people with the disease who test positive.
- Specificity = d ÷ (b + d) = TN ÷ all without disease - the proportion of people without the disease who test negative.
- They are properties of the test and are (in principle) independent of prevalence, although they vary with the spectrum of disease (see spectrum bias).
- SnNOut: a highly Sensitive test, when Negative, rules Out (few false negatives) - e.g. D-dimer in low-probability PE, CT head within 6 hours for subarachnoid haemorrhage.
- SpPIn: a highly Specific test, when Positive, rules In (few false positives) - e.g. Koplik spots for measles, anti-CCP for rheumatoid arthritis.
- False positive rate = 1 − specificity; false negative rate = 1 − sensitivity.
Predictive Values and Prevalence
- Positive predictive value (PPV) = a ÷ (a + b) - of those testing positive, the proportion who have the disease.
- Negative predictive value (NPV) = d ÷ (c + d) - of those testing negative, the proportion who do not.
- Predictive values depend on prevalence (pre-test probability):
- Low prevalence (screening, general practice) → PPV falls (many false positives) and NPV rises.
- High prevalence (specialist clinic) → PPV rises and NPV falls.
- This is why a positive troponin in a young adult with atypical chest pain, or a positive screening test in a low-risk population, is often a false positive.
- Accuracy = (a + d) ÷ N - can be misleading when prevalence is very low or very high.
Likelihood Ratios
- LR+ = sensitivity ÷ (1 − specificity) - how much more likely a positive result is in someone with the disease than without.
- LR− = (1 − sensitivity) ÷ specificity - how much less likely a negative result is in someone with the disease.
- Interpretation:
| LR+ | LR− | Effect on probability |
|---|---|---|
| >10 | <0.1 | Large, often conclusive change |
| 5–10 | 0.1–0.2 | Moderate change |
| 2–5 | 0.2–0.5 | Small change |
| 1–2 | 0.5–1 | Rarely important |
| 1 | 1 | No change - useless test |
- LRs do not depend on prevalence and can be applied to an individual's pre-test probability.
- Multi-level LRs use several result bands (e.g. ferritin levels, Wells score categories).
Pre-test Probability, Bayes and the Fagan Nomogram
- Bayes' theorem: post-test odds = pre-test odds × likelihood ratio.
- Converting: odds = probability ÷ (1 − probability); probability = odds ÷ (1 + odds).
- Steps: estimate pre-test probability (from prevalence, clinical features or a score such as Wells) → convert to odds → multiply by LR → convert back to probability.
- Fagan nomogram - a graphical way to do this: draw a line from the pre-test probability through the LR to read the post-test probability.
- Test and treatment thresholds: if the post-test probability will not cross the threshold at which management changes, the test is not worth doing. Below the "test threshold" - do not test; above the "treatment threshold" - treat without testing.
- Clinical example: Wells "PE unlikely" + negative D-dimer → probability low enough to stop; "PE likely" → go straight to CTPA because a negative D-dimer would not lower the probability enough.
Cut-offs, Trade-offs and ROC Curves
- For continuous tests (e.g. BNP, PSA, HbA1c), moving the cut-off trades sensitivity against specificity: a lower threshold increases sensitivity and decreases specificity.
- Receiver operating characteristic (ROC) curve - plots sensitivity (true positive rate) against 1 − specificity (false positive rate) for every cut-off.
- Area under the curve (AUC, c-statistic) - 0.5 = no better than chance; 0.7–0.8 = acceptable; 0.8–0.9 = excellent; 1.0 = perfect discrimination. Also used to describe risk prediction models (e.g. QRISK3).
- Choosing the cut-off depends on the consequences: high sensitivity when missing disease is dangerous (sepsis screening, rule-out tests); high specificity when false positives lead to harmful treatment or invasive tests (confirmation tests).
- Calibration (agreement between predicted and observed risk) matters as well as discrimination for risk scores.
Combining Tests - Serial and Parallel
- Serial (sequential) testing - a second test only if the first is positive (e.g. screening test then diagnostic test). Overall specificity rises, sensitivity falls. Used in screening programmes (e.g. HIV antibody screen then confirmatory test).
- Parallel testing - several tests at once; disease suspected if any is positive. Overall sensitivity rises, specificity falls. Used when missing disease is dangerous (e.g. troponin with ECG).
- LRs from independent tests can be multiplied sequentially (assumes conditional independence - often not true in practice).
Diagnostic Accuracy Studies and Their Biases
- Design: a consecutive or random series of patients in whom the diagnosis is uncertain, each receiving both the index test and the reference ("gold") standard, interpreted blind.
- Spectrum bias - testing very sick cases against healthy controls inflates sensitivity and specificity; the test must be evaluated in the population where it will be used.
- Verification (work-up) bias - only those with positive tests receive the reference standard.
- Incorporation bias - the index test is part of the reference standard.
- Review bias - the reference standard is interpreted with knowledge of the index test (or vice versa).
- Imperfect reference standard - misclassification biases accuracy estimates.
- Reporting: STARD guidelines; quality assessment with QUADAS-2.
Screening Statistics
- Screening tests are applied to asymptomatic populations with low prevalence, so PPV is often low - most positives are false positives (e.g. mammography PPV is around 10–20%).
- Uptake (coverage) - the proportion of the eligible population screened; programmes depend on high, equitable uptake.
- Detection rate and interval cancers (cancers arising between screens) measure programme performance.
- Numbers needed to screen (NNS) - number who must be screened to prevent one death from the disease.
- Overdiagnosis - detection of disease that would never have caused symptoms or death in the person's lifetime (e.g. some DCIS, low-grade prostate cancer, small thyroid cancers); results in overtreatment.
- Wilson and Jungner criteria and the UK NSC criteria are covered in the Public Health chapters.
Screening Biases
- Lead-time bias - earlier diagnosis makes survival time from diagnosis look longer even if the date of death is unchanged. Solution: compare mortality rates (not survival from diagnosis) in randomised trials.
- Length-time bias - screening preferentially detects slow-growing, less aggressive disease (longer pre-clinical phase), making screen-detected cases appear to do better.
- Overdiagnosis bias - inclusion of indolent disease inflates apparent survival.
- Healthy volunteer (selection) bias - people who attend screening are healthier and more health-conscious than non-attenders.
- The best evidence for a screening programme is a randomised trial showing reduced disease-specific and all-cause mortality.
Diagnostic Tests at a Glance
| Measure | Formula | Depends on prevalence? |
|---|---|---|
| Sensitivity | TP ÷ (TP + FN) | No |
| Specificity | TN ÷ (TN + FP) | No |
| PPV | TP ÷ (TP + FP) | Yes - falls when prevalence is low |
| NPV | TN ÷ (TN + FN) | Yes - rises when prevalence is low |
| LR+ | Sens ÷ (1 − Spec) | No |
| LR− | (1 − Sens) ÷ Spec | No |
| Post-test odds | Pre-test odds × LR | - |
Worked Calculations
- Screening test: prevalence 1%, sensitivity 90%, specificity 95%, population 10,000. Disease present 100 → TP 90, FN 10. Disease absent 9,900 → FP 495 (5%), TN 9,405.
- PPV = 90 ÷ (90 + 495) = 15.4%; NPV = 9,405 ÷ 9,415 = 99.9%.
- So 85% of positives are false positives despite "95% specificity".
- Same test, prevalence 30% (specialist clinic, 1,000 people): TP 270, FN 30, FP 35, TN 665 → PPV = 270 ÷ 305 = 88.5%.
- Likelihood ratios: sensitivity 90%, specificity 95% → LR+ = 0.9 ÷ 0.05 = 18; LR− = 0.1 ÷ 0.95 = 0.105.
- Bayes: pre-test probability 20% → odds 0.25; positive result (LR+ 18) → post-test odds 4.5 → probability 4.5 ÷ 5.5 = 82%. Negative result (LR− 0.105) → odds 0.026 → probability 2.6%.
- Table from figures: 100 patients with MI, test positive in 80; 400 without MI, test negative in 360. Sensitivity = 80/100 = 80%; specificity = 360/400 = 90%; PPV = 80 ÷ (80 + 40) = 66.7%.
Exam-style Scenarios
- Scenario. A new rapid test for influenza has sensitivity 70% and specificity 98%. In winter, prevalence among patients with flu-like illness is 40%; in summer it is 2%. How does the PPV change?
Answer: Winter (per 1,000): TP 280, FP 12 → PPV 96%. Summer: TP 14, FP 19.6 → PPV about 42%. Sensitivity and specificity are unchanged; PPV falls with prevalence. - Scenario. A D-dimer assay has sensitivity 97% and specificity 40%. What is it useful for?
Answer: Ruling out VTE in patients with low pre-test probability (SnNOut; LR− ≈ 0.075). A positive result is unhelpful (LR+ ≈ 1.6) and should not be used to diagnose. - Scenario. A screening programme reports that 5-year survival after diagnosis improved from 50% to 70%, but disease-specific mortality is unchanged. Explain.
Answer: Lead-time bias (diagnosis earlier without delaying death), length-time bias and overdiagnosis - survival from diagnosis is not a valid measure of screening benefit. - Scenario. A clinician estimates a 10% probability of appendicitis. An ultrasound has LR+ 9 and LR− 0.3. What are the post-test probabilities?
Answer: Pre-test odds 0.111. Positive: 0.111 × 9 = 1.0 → 50%. Negative: 0.111 × 0.3 = 0.033 → 3.2%.
Key Points
- Draw the 2 × 2 table every time.
- Sensitivity and specificity are test properties; predictive values depend on prevalence.
- SnNOut and SpPIn.
- Post-test odds = pre-test odds × LR; LRs are the most useful way to apply a test to an individual.
- In low-prevalence settings most positive results are false positives.
- Screening benefit must be judged by mortality in RCTs, not survival from diagnosis.
Guidelines and Further Reading
- STARD 2015: Standards for Reporting Diagnostic Accuracy Studies
- QUADAS-2: quality assessment of diagnostic accuracy studies
- Fagan TJ. Nomogram for Bayes's theorem. NEJM 1975
- Sackett DL et al. Evidence-Based Medicine: How to Practice and Teach EBM
- UK National Screening Committee: criteria for appraising screening programmes
End of chapter 202