Hone

Lessons · Medicine foundations · sensitivity and specificity

Sensitivity and specificity: two columns of one table

Sensitivity is the share of people who have the condition that the test calls positive, TP / (TP + FN); specificity is the share of people who do not have it that the test calls negative, TN / (TN + FP).

Hone is a place to practise a career, one idea a day. This is one of its lessons, written out in full and free to read without an account.

What it is for

An evidence session hands you four numbers in a two by two table and asks for both figures. The four numbers are always in the question; what is being tested is whether you can see that each answer has one whole column underneath it, and never the whole table.

How to think about it

Draw the table and label the columns by what is true, not by what the test said. Sensitivity reads down the column of people who have it: of those, how many did the test catch. Specificity reads down the other column: of those who do not have it, how many did the test leave alone. Each denominator is one column total.

Worked example

True positives 90, false negatives 10, true negatives 160, false positives 40, all given
Four counts, straight from the question.
Sensitivity = 90 / (90 + 10) = 0.90, which is 90 %
The denominator is everyone who has it: the ones caught plus the ones missed.
Specificity = 160 / (160 + 40) = 0.80, which is 80 %
The denominator is everyone who does not have it: the ones left alone plus the ones wrongly flagged.

Your turn

A table gives 30 true positives and 20 false negatives. Write the line that gives the sensitivity as a percentage.

30 / (30 + 20) × 100 =  %

The trap

Putting all four numbers in the denominator. That gives the share of the whole group, which is a real number about the population and not sensitivity at all, and it is smaller than the right answer in a way that looks modest and reasonable.

Practise sensitivity and specificity on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.