Sensitivity &
Specificity
Master the two pillars of diagnostic test evaluation: learn to calculate and interpret sensitivity and specificity using the \(2 \times 2\) confusion matrix.
What Is a Diagnostic Test?
A diagnostic test classifies individuals as either positive (likely having a condition) or negative (likely not having it). But no test is perfect: some results are right, and some are wrong.
The Four Possible Outcomes
The \(2 \times 2\) Confusion Matrix
Defining Sensitivity
Sensitivity (also called the True Positive Rate) measures the proportion of people who actually have the disease that the test correctly identifies as positive.
A highly sensitive test catches nearly all truly sick patients. Think: Snout: a highly Sensitive test, when negative, rules the disease out.
Defining Specificity
Specificity (also called the True Negative Rate) measures the proportion of people who do not have the disease that the test correctly identifies as negative.
A highly specific test rarely flags healthy people. Think: Spin: a highly Specific test, when positive, rules the disease in.
Sensitivity vs Specificity
| Sensitivity | Specificity | |
|---|---|---|
| Question answered | Of the sick, how many test \(+\)? | Of the healthy, how many test \(-\)? |
| Formula | \(\frac{TP}{TP+FN}\) | \(\frac{TN}{TN+FP}\) |
| Denominator is | All with disease | All without disease |
| Mnemonic | SnOUT | SpIN |
| Error it minimizes | False Negatives | False Positives |
The Trade-off Between Them
When to Prioritize Each
How to Calculate Step by Step
Example 1: Flu Rapid Test
A rapid flu test is used on 200 patients. Results: TP = 80, FP = 10, FN = 20, TN = 90. Calculate sensitivity and specificity.
Example 2: Cancer Screening
A mammography study on 1,000 women yields: TP = 45, FP = 95, FN = 5, TN = 855.
Example 3: Finding Missing Values
A test with \(\text{sensitivity} = 95\%\) is applied to 400 patients who have the disease. How many true positives and false negatives result?
Complementary Error Rates
Prevalence and Predictive Values
Sensitivity and specificity are intrinsic properties of the test: they do not change with prevalence. But predictive values do change:
Common Mistakes
Summary of Key Measures
| Measure | Formula | Conditions On |
|---|---|---|
| Sensitivity | \(\frac{TP}{TP+FN}\) | Disease present |
| Specificity | \(\frac{TN}{TN+FP}\) | Disease absent |
| PPV | \(\frac{TP}{TP+FP}\) | Test positive |
| NPV | \(\frac{TN}{TN+FN}\) | Test negative |
| FNR | \(1 - \text{Sensitivity}\) | Disease present |
| FPR | \(1 - \text{Specificity}\) | Disease absent |
Question 1 of 5
A test has \(TP = 90\), \(FN = 10\), \(FP = 30\), and \(TN = 870\). What is the sensitivity?
Question 2 of 5
Using the same data (\(TP = 90\), \(FN = 10\), \(FP = 30\), \(TN = 870\)), what is the specificity?
Question 3 of 5
A screening test has a \(\text{sensitivity} = 98\%\). What is the false negative rate?
Question 4 of 5
A disease has very low prevalence. Even with \(95\%\) sensitivity and \(95\%\) specificity, the PPV will likely be:
Question 5 of 5
You want a test to rule out a dangerous disease. You should prioritize a test with high: