Sensitivity vs. Specificity in Diagnostic Tests
Sensitivity (also called the true positive rate) measures the proportion of people with the disease (actual positives) who are correctly identified by the test as positive. It answers: "Of all those who truly have the disease, how many did the test catch?"
Formula:
Sensitivity = TP / (TP + FN)
High sensitivity is crucial for ruling out a disease (e.g., screening tests where missing cases is dangerous).
Specificity (also called the true negative rate) measures the proportion of people without the disease (actual negatives) who are correctly identified by the test as negative. It answers: "Of all those who truly do not have the disease, how many did the test correctly rule out?"
Formula:
Specificity = TN / (TN + FP)
High specificity is crucial for ruling in a disease (e.g., confirmatory tests where false alarms are costly).
These metrics are illustrated using a 2x2 confusion matrix (contingency table), which compares test results to the true disease status:
| Disease Present (Actual +) | Disease Absent (Actual -) | Row Totals |
|---|
| Test Positive | TP (True Positive) | FP (False Positive) | TP + FP |
| Test Negative | FN (False Negative) | TN (True Negative) | FN + TN |
| Column Totals | TP + FN | FP + TN | N (Total) |
- TP: Test correctly identifies disease.
- FN: Test misses disease (false negative).
- FP: Test falsely flags disease (false positive).
- TN: Test correctly rules out disease.
Example with Hypothetical Numbers
Suppose a test is run on 100 people (50 with disease, 50 without):
| Disease Present | Disease Absent | Row Totals |
|---|
| Test Positive | 45 (TP) | 5 (FP) | 50 |
| Test Negative | 5 (FN) | 45 (TN) | 50 |
| Column Totals | 50 | 50 | 100 |
- Sensitivity = 45 / (45 + 5) = 90% (catches 90% of true cases).
- Specificity = 45 / (45 + 5) = 90% (correctly rules out 90% of non-cases).
The Trade-Off Between Sensitivity and Specificity
Sensitivity and specificity often have an inverse relationship due to the test's decision threshold (e.g., a cutoff value for "positive").
- Raising the threshold (making the test stricter) increases specificity (fewer FP) but decreases sensitivity (more FN, missing some true cases).
- Lowering the threshold (making the test looser) increases sensitivity (fewer FN) but decreases specificity (more FP, more false alarms).
This trade-off is visualized in an ROC curve (Receiver Operating Characteristic), where the ideal test maximizes both (top-right corner), but real tests require balancing based on context:
- High sensitivity prioritized: Screening (e.g., COVID tests—better to over-test than miss cases).
- High specificity prioritized: Confirmatory tests (e.g., biopsies—better to avoid unnecessary treatments).
- No free lunch: Perfect sensitivity (100%) and specificity (100%) is rare; optimizing one often compromises the other.
Other metrics like PPV (positive predictive value = TP/(TP+FP)) and NPV (negative predictive value = TN/(TN+FN)) depend on disease prevalence and help contextualize the trade-off.