Sensitivity vs specificity: the 2×2 table, SnNout and SpPin
How to calculate sensitivity and specificity from a 2×2 table, and why a highly sensitive test rules disease out while a highly specific test rules it in.
Chapters (13)
Calculate sensitivity and specificity from a 2×2 table and explain why highly sensitive tests rule out and highly specific tests rule in.
The short version
- Sensitivity = TP / (TP + FN): of the people who have the disease, the fraction the test catches.
- Specificity = TN / (TN + FP): of the healthy people, the fraction the test correctly clears.
- A highly sensitive test with a negative result rules disease out (SnNout); a highly specific test with a positive result rules it in (SpPin).
- 1 − sensitivity is the false negative rate; 1 − specificity is the false positive rate.
- Both numbers describe the test, not how common the disease is; what a result means for one patient comes in the next lesson.
A negative result: can you trust it?
A screening test catches 98 out of every 100 people who have a disease. Your patient's result comes back negative. Can you trust it, or could the disease still be hiding?[2]
This lesson answers that with the two basic measures of a test: sensitivity vs specificity. You will calculate both from a 2×2 table and see why one rules disease out while the other rules it in.
The gold standard and the 2×2 table
Start with the idea of a gold standard: the reference test that decides who truly has the disease. We compare the new test with it and sort everyone into a 2×2 table.[1][2]
One side of the table is the truth, disease present or disease absent. The other side is the test result, positive or negative.
| Disease present | Disease absent | |
|---|---|---|
| Test positive | True positive (TP) | False positive (FP) |
| Test negative | False negative (FN) | True negative (TN) |
- True positive: sick, and the test says positive.
- False negative: sick, but the test says negative.
- False positive: healthy, but the test says positive.
- True negative: healthy, and the test says negative.
Worked example: 1000 people tested
One thousand people are tested and 100 truly have the disease. Of those 100, 80 test positive and 20 test negative. The other 900 are healthy: 855 test negative and 45 test positive.
| Disease present | Disease absent | Total | |
|---|---|---|---|
| Test positive | TP = 80 | FP = 45 | 125 |
| Test negative | FN = 20 | TN = 855 | 875 |
| Total | 100 | 900 | 1000 |
Sensitivity: the diseased column
Sensitivity asks one question: of the people who have the disease, what fraction does the test catch? It uses only the disease column.[1][2]
Also called the true positive rate.
- TP + FN = 80 + 20 = 100
- 80 / 100 = 0.80
- Sensitivity = 80%
Specificity: the healthy column
Specificity asks the mirror question: of the healthy people, what fraction does the test correctly clear? It uses only the healthy column.[1][2]
Also called the true negative rate.
- TN + FP = 855 + 45 = 900
- 855 / 900 = 0.95
- Specificity = 95%
Sensitivity never looks at the healthy column, and specificity never looks at the sick column. One minus sensitivity is the false negative rate (here 20%). One minus specificity is the false positive rate (here 5%).[1][3][4][5]
SnNout and SpPin: rule out and rule in
Back to the hook. A sensitivity of 98% means that among 100 sick people, only 2 are missed. So when this test says negative, a missed case is unlikely, though exactly how unlikely comes in the next lesson. High sensitivity, negative result, rule out: SnNout.[1][2]
The mirror image uses specificity. A specificity of 99% means that among 100 healthy people, only 1 gets a false alarm. So few healthy people test positive, though what a positive result means for one patient still depends on how common the disease is, which comes in the next lesson. High specificity, positive result, rule in: SpPin.[1][2]
Practice question
Original · USMLE styleResearchers evaluate a new rapid test for a viral infection in 200 adults who present with fever. By the reference standard, 60 are infected and 140 are not infected. Of the infected patients, 42 test positive. Of the uninfected patients, 21 test positive.
Common questions
How do you calculate sensitivity and specificity from a 2×2 table?
Sensitivity = TP / (TP + FN), using only the disease column. Specificity = TN / (TN + FP), using only the healthy column.
What does SnNout mean?
A highly sensitive test with a negative result rules disease out, because few sick people are missed. It holds only when sensitivity is very high.
What does SpPin mean?
A highly specific test with a positive result rules disease in, because few healthy people get a false alarm. It holds only when specificity is very high.
What is the difference between sensitivity and specificity?
Sensitivity is the fraction of sick people the test catches; specificity is the fraction of healthy people the test correctly clears.
How do you get the false positive rate and false negative rate?
False positive rate = 1 − specificity; false negative rate = 1 − sensitivity.
Transcript
Read the full narration, by chapter677 words
0:00A negative result: can you trust it?
A screening test catches 98 out of every 100 people who have a disease. Your patient's result comes back negative. Can you trust it, or could the disease still be hiding? Today: calculate sensitivity and specificity from a two by two table, and see why a highly sensitive test rules disease out, while a highly specific test rules it in.
0:23The gold standard and the 2x2 table
Start with the idea of a gold standard. It is the reference test that decides who truly has the disease. We then compare the new test with it, and sort everyone into a two by two table. One side is the truth: disease present, or disease absent. The other side is the test: positive, or negative.
0:44The four cells: TP, FN, FP, TN
A true positive: sick, and the test says positive. A false negative: sick, but the test says negative. A false positive: healthy, but the test says positive. A true negative: healthy, and the test says negative.
1:00Worked example: 1000 people
One 1000 people are tested. One 100 truly have the disease. Of those 100, 80 test positive, and 20 test negative. So there are 80 true positives and 20 false negatives. The other 900 are healthy. 855 test negative, and 45 test positive. So there are 855 true negatives and 45 false positives.
1:29Sensitivity
Sensitivity asks one question: of the people who have the disease, what fraction does the test catch? It uses only the disease column: true positives divided by true positives plus false negatives. Eighty divided by 80 plus 20 is 80%.
1:48Specificity
Specificity asks the mirror question: of the healthy people, what fraction does the test correctly clear? It uses only the healthy column: true negatives divided by true negatives plus false positives. 855 divided by 855 plus 45 is 95%.
2:10Which column each one uses, and 1 minus each
Sensitivity never looks at the healthy column, and specificity never looks at the sick column. One minus sensitivity is the false negative rate: here, 20%. One minus specificity is the false positive rate: here, 5%.
2:27Back to the hook: high sensitivity, rule out (SnNout)
Now back to the hook. A sensitivity of 98% means that among a 100 sick people, only two are missed. So when this test says negative, a missed case is unlikely, though exactly how unlikely comes in the next lesson. High sensitivity, negative result, rule out. Doctors remember it as SN out.
2:51The mirror: high specificity, rule in (SpPin)
The mirror image uses specificity. A specificity of 99% means that among a 100 healthy people, only one gets a false alarm. So few healthy people test positive, though a positive still depends on how common the disease is. High specificity, positive result, rule in. That is SP in.
3:13The warning, and why both are properties of the test
One warning: these rules only hold when the sensitivity or specificity is very high. And both numbers do not change with how common the disease is. They describe the test, not who happens to walk in. What a result means for one patient comes
3:31Practice question
next lesson. Your turn. Researchers evaluate a new rapid test for a viral infection in 200 adults with fever. By the reference standard, 60 are infected and 140 are not. Of the infected, 42 test positive. Of the uninfected, 21 test positive. Which of the following is the specificity of the test? A, 15%. B, 67%. C, 70%. D, 85%. E, 87%. Pause here and decide.
4:12The options, one at a time, and the answer
A is out: 21 over 140 is the false positive rate, which is one minus the specificity. B is out: 42 over 63 counts only the positive results, which is a different measure, covered next lesson. C is out: 42 over 60 is the sensitivity. E is out: 119 over 137 uses the negative results as the denominator, not the healthy people. So the answer is D. The true negatives are 140 minus 21, 119, and 119 over 140
4:54Recap and next lesson
is 85%. Three things to keep. One: sensitivity is true positives over all the sick, specificity is true negatives over all the healthy. Two: high sensitivity, negative result, rules out. High specificity, positive result, rules in. Three: one minus sensitivity is the false negative rate, and one minus specificity is the false positive rate. Next, positive and negative predictive values, and why prevalence changes what a result means.
Sources
Numbers in the text, e.g. [1], point here- Parikh R, et al. Understanding and using sensitivity, specificity and predictive values. Indian J Ophthalmol. 2008. pmc.ncbi.nlm.nih.gov/articles/PMC2636062/
- Trevethan R. Sensitivity, Specificity, and Predictive Values: Foundations, Pliabilities, and Pitfalls in Research and Practice. Front Public Health. 2017. pmc.ncbi.nlm.nih.gov/articles/PMC5701930/
- ROC curve review, Korean J Radiol. 2004 (false positive rate = 1 - specificity). pmc.ncbi.nlm.nih.gov/articles/PMC2698108/
- Korean J Anesthesiol 2022, review of diagnostic accuracy and ROC analysis (PMC8831439). pmc.ncbi.nlm.nih.gov/articles/PMC8831439/
- Wikipedia (background, checked against the sources above): Sensitivity and specificity. en.wikipedia.org/wiki/Sensitivity_and_specificity
The practice question is original and its patient is synthetic. Every fact is checked against the sources above in independent accuracy reviews. Always follow your local guidelines and your own laboratory’s ranges.
Image credits. Illustrations: Servier Medical Art (smart.servier.com), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), adapted (recoloured, outlined, resized): microscope, blood test tube. Person pictogram: Health Icons (healthicons.org), CC0 1.0, shown as illustrative counts only. Original diagrams drawn in code: the 2x2 tables, fractions, the question card and the recap card. No AI-generated teaching images.
Corrections. None so far. Spotted an error? Email info@medservatory.com with the lesson code MS-S1-BIOS-001.
For exam study only, not medical advice. Read the medical disclaimer.
In this series
Playlist on YouTube- EP 01Sensitivity vs specificity: the 2×2 table, SnNout and SpPin5:34
- EP 02PPV, NPV and prevalence explained5:27
- EP 03Relative risk vs odds ratio: the 2x2 table explained5:15
- EP 04Number needed to treat: ARR, RRR and NNH from trial data5:00
- EP 05Study designs explained: case-control, cohort, cross-sectional and RCT5:22
- EP 06Types of bias: selection, recall, lead-time and confounding5:30
- EP 07Type I and type II errors: alpha, beta, power and the p-value5:16
- EP 08Confidence intervals and significance: is the null value inside?5:12