TN, the true negatives, are the people without the condition whom the test clears; FP, the false positives, are the people without it whom the test wrongly flags. The denominator is everyone who does not have the condition, and the specificity is the share of them the test gets right.
A worked example
Of 80 people without a condition, a test clears 76 and flags 4: Sp = 76 / (76 + 4) = 0.95, or 95%. The other 5% are false alarms. Turned round, a test with a specificity of 0.90 that raised 4 false alarms cleared 0.90 · 4 / 0.10 = 36 people.
The table it comes from
|
Condition present |
Condition absent |
| Test positive |
TP |
FP |
| Test negative |
FN |
TN |
Specificity reads down the second column; sensitivity reads down the first. Together they describe the test itself, independent of how many people tested have the condition, which is what separates them from the predictive values.
The trade
A test with a tunable threshold can be made more sensitive by flagging more, and every extra flag is a true case or a false alarm. Raising sensitivity lowers specificity and the other way round; the right balance depends on what a miss costs against what a false alarm costs. 1 − Sp is the false positive rate, and the positive likelihood ratio, Se / (1 − Sp), puts the two in one number.
Common mistakes
- Dividing by the negatives. TN / (TN + FN) is the negative predictive value, a different question.
- Reading a high specificity as a good test. A test that flags nobody has a specificity of 1 and finds nothing.
- Mixing up the two columns. Specificity is about the healthy; sensitivity about the sick.
Frequently asked questions
What is a good specificity?
High enough that false alarms are rare for the purpose: a confirmatory test is set for specificity,
after a sensitive screen has done the finding.
Specificity or true negative rate?
The same number. 1 − Sp is the false positive rate.
Where do I get the interval?
The sensitivity and specificity calculator gives a 95% Wilson interval from the counts.