Skip to content
Machine Learning

What is the difference between sensitivity and specificity?

Sensitivity is the share of actual positives a test catches, TP / (TP + FN), the same as recall. Specificity is the share of actual negatives it correctly clears, TN / (TN + FP). Moving the decision threshold trades one for the other.

datasciencetrivia.com

Card 1 of 259. Answer: Sensitivity is the share of actual positives a test catches, TP / (TP + FN), the same as recall. Specificity is the share of actual negatives it correctly clears, TN / (TN + FP). Moving the decision threshold trades one for the other.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Sensitivity, also called recall or the true positive rate, asks: of the cases that really are positive, how many did we flag? Specificity, the true negative rate, asks: of the cases that really are negative, how many did we leave alone? Specificity is 1 minus the false positive rate. Both are computed within one true class, so neither depends on how common the positive class is.

Example: a screening test is run on 1,000 people, 10 of whom have the disease. It flags 9 of the 10, a sensitivity of 90%, and wrongly flags 99 of the 990 healthy people, a specificity of 90%. Yet of its 108 positive results only 9 are real, a precision (positive predictive value) of about 8%. Good sensitivity and specificity don't guarantee that a positive result is likely to be right when the condition is rare.

Interviewers like the clinical shorthand: a highly sensitive test rules a condition out when negative (SnNout), and a highly specific one rules it in when positive (SpPin). The ROC curve plots sensitivity against 1 − specificity for every threshold. Pick the threshold by comparing the cost of a missed positive with the cost of a false alarm.

All questions