01 / 22

Sensitivity, Specificity,
PPV & NPV

Master the four pillars of diagnostic test interpretation: learn what each metric tells you, how to calculate them from a \(2 \times 2\) table, and why they matter in real clinical decisions.

Biostatistics

Why Diagnostic Tests Matter

No diagnostic test is perfect. When a doctor orders a strep test, an HIV screen, or a pregnancy test, the result might be correct or incorrect. Understanding test performance helps us answer two critical questions:

Test perspective
How well does this test detect disease (or rule it out)?
Patient perspective
Given my result, what is the chance I actually have the disease?

The \(2 \times 2\) Contingency Table

Every diagnostic test result can be classified into one of four cells by comparing the test outcome to the true disease status:

Disease +
Disease −
Test +
True Positive
(TP)
False Positive
(FP)
Test −
False Negative
(FN)
True Negative
(TN)

Understanding the Four Cells

True Positive (TP)
Patient has disease, test says positive. Correct detection.
False Positive (FP)
Patient is healthy, test says positive. False alarm.
False Negative (FN)
Patient has disease, test says negative. Missed case.
True Negative (TN)
Patient is healthy, test says negative. Correct exclusion.

Sensitivity: Catching the Sick

Sensitivity (also called the true positive rate) measures how well a test identifies people who actually have the disease.

A highly sensitive test has very few false negatives: it rarely misses a truly sick person. Mnemonic: Sn-N-Out: a highly Sensitive test, when Negative, rules the disease Out.

Specificity: Clearing the Healthy

Specificity (the true negative rate) measures how well a test identifies people who are truly disease-free.

A highly specific test has very few false positives: it rarely labels a healthy person as sick. Mnemonic: Sp-P-In: a highly Specific test, when Positive, rules the disease In.

PPV and NPV: The Patient's View

Sensitivity and specificity describe the test. Predictive values answer what the patient really wants to know:

Positive Predictive Value (PPV)
"I tested positive: what is the probability I truly have the disease?"

\(\text{PPV} = \dfrac{TP}{TP + FP}\)
Negative Predictive Value (NPV)
"I tested negative: what is the probability I am truly disease-free?"

\(\text{NPV} = \dfrac{TN}{TN + FN}\)

Rows vs. Columns: Which Way to Read

Disease + Disease − Test + Test − TP FP FN TN Sensitivity (down column) Specificity (down column) PPV (across row) NPV (across row)

Intrinsic vs. Extrinsic Properties

Sensitivity & Specificity PPV & NPV
Determined by The test itself Test + prevalence
Changes with prevalence? No (fixed) Yes (varies)
Starting point Known disease status Known test result
Best analogy "How sharp is the blade?" "Did I cut the right thing?"

How Prevalence Shifts Predictive Values

0% 50% 100% 0% 50% 100% Prevalence Value PPV NPV

Memory Aids: SnNOut & SpPIn

SnNOut
High Sensitivity + Negative result = rules disease Out. If the test almost never misses a sick person, a negative result is very reassuring.
SpPIn
High Specificity + Positive result = rules disease In. If the test almost never falsely accuses a healthy person, a positive result is highly convincing.

How to Calculate Step by Step

1
Set up the \(2 \times 2\) table. Label rows as Test + / Test − and columns as Disease + / Disease −.
2
Fill in the cell counts. Place TP, FP, FN, TN from the given data. If given sensitivity, specificity, and prevalence, compute the counts.
3
Identify the denominator direction. Sensitivity/Specificity: read down columns. PPV/NPV: read across rows.
4
Apply the formula. Divide the correct cell by the sum of its row or column. Express as a percentage.
5
Interpret in context. State what the value means for patients or for the test's clinical usefulness.

Worked Example: Strep Test

A rapid strep test is applied to 500 patients. Results:

Strep +
Strep −
Test +
90
30
Test −
10
370

Strep Test: PPV & NPV

Using the same table (TP = 90, FP = 30, FN = 10, TN = 370):

Harder Example: Low Prevalence

A disease has 1% prevalence. A test has sensitivity 99% and specificity 95%. In a population of 10,000:

Disease +
(100)
Disease −
(9,900)
Test +
99
495
Test −
1
9,405

Common Mistakes

✕ Confusing rows and columns
Sensitivity uses the Disease + column, not the Test + row. Mixing these gives the wrong metric.
✕ Ignoring prevalence
Assuming a 99% specific test always gives reliable positives: in low-prevalence settings, PPV can be very low.
✕ Swapping PPV and Sensitivity
Sensitivity starts from disease status. PPV starts from test result. They answer different questions.

Summary Table

Metric Formula Question Answered
Sensitivity \(\frac{TP}{TP+FN}\) Of the sick, how many test +?
Specificity \(\frac{TN}{TN+FP}\) Of the healthy, how many test −?
PPV \(\frac{TP}{TP+FP}\) If test +, probability of disease?
NPV \(\frac{TN}{TN+FN}\) If test −, probability of healthy?

Question 1 of 5

Sensitivity is defined as \(\dfrac{TP}{TP + FN}\). What does this formula measure?

Question 2 of 5

A test has sensitivity = 95% and specificity = 90%. When the disease prevalence drops from 20% to 2%, what happens to PPV?

Question 3 of 5

In a study of 1,000 people: TP = 80, FP = 50, FN = 20, TN = 850. What is the specificity of this test?

Question 4 of 5

The mnemonic SpPIn means that a highly specific test, when positive, helps to:

Question 5 of 5

A disease affects 10% of a population of 1,000 (100 sick, 900 healthy). A test has sensitivity 90% and specificity 80%. What is the PPV?