How good is a test?
A diagnostic or screening test sorts people into positive and negative. Compared with a reference standard, each result falls into one of four boxes:
| Disease present | Disease absent | |
|---|---|---|
| Test positive | true positive (TP) | false positive (FP) |
| Test negative | false negative (FN) | true negative (TN) |
The measures
- Sensitivity = TP ÷ (TP + FN): share of sick people correctly detected.
- Specificity = TN ÷ (TN + FP): share of healthy people correctly cleared.
- Positive predictive value PPV = TP ÷ (TP + FP): chance a positive result is correct.
- Negative predictive value NPV = TN ÷ (TN + FN): chance a negative result is correct.
- Positive likelihood ratio LR+ = sensitivity ÷ (1 − specificity).
- Negative likelihood ratio LR− = (1 − sensitivity) ÷ specificity.
- Accuracy = (TP + TN) ÷ total.
Worked example
1,000 people are tested; 100 have the disease.
| Sick | Healthy | |
|---|---|---|
| Positive | 90 | 45 |
| Negative | 10 | 855 |
- Sensitivity: 90 ÷ 100 = 90%.
- Specificity: 855 ÷ 900 = 95%.
- PPV: 90 ÷ 135 = 66.7%: one positive result in three is a false alarm.
- NPV: 855 ÷ 865 = 98.8%.
- LR+ = 0.90 ÷ 0.05 = 18; LR− = 0.10 ÷ 0.95 ≈ 0.11.
- Accuracy: 94.5%.
Predictive values depend on prevalence
Sensitivity and specificity belong to the test. PPV and NPV also depend on how common the disease is in the people tested. With the same test and a prevalence of 1% instead of 10%, the PPV drops to about 15%. This is why screening a low-risk population produces many false positives, and why positive screening results are confirmed with a second test.
SnNout and SpPin
Two classic memory aids:
- SnNout: a highly Sensitive test, when Negative, rules the disease out.
- SpPin: a highly Specific test, when Positive, rules the disease in.
Likelihood ratios in practice
Likelihood ratios convert a pre-test probability into a post-test probability: post-test odds = pre-test odds × LR. An LR+ above 10 or an LR− below 0.1 usually shifts the probability enough to change decisions; values between 0.5 and 2 rarely do.
Trade-offs
Moving a test’s cutoff trades sensitivity against specificity. The ROC curve plots this trade-off; the area under it summarizes overall performance.
This calculator is for general information and education. It is not medical advice and does not replace the judgment of a doctor, nurse or pharmacist who knows the full clinical picture.