Calcylator
Test sensitivity

Test sensitivity:
formula and worked example

Sensitivity is a test's hit rate on real cases, and the share it misses is the number to worry about.

Calcylator Editorial Team

Updated · 4 min read

How well a test finds what it is looking for

Sensitivity, also called the true positive rate or recall, is the proportion of people who truly have a condition that the test correctly flags. If a test has high sensitivity, few real cases slip through. It is the number to look at when the cost of a miss is high, such as a missed infection, an undetected fault or an unflagged fraud.

The measure looks only at the cases that exist. How many healthy people the test wrongly flags is a separate question handled by specificity. Quoting one without the other gives half a picture, since a test that flags everyone has perfect sensitivity and no usefulness.

In machine learning the same quantity goes by the name recall, and the arithmetic is identical.

A smoke detector again makes the point. A very sensitive one detects even a smouldering fire early, while a poorly tuned one only reacts when the room is already filling with smoke. Early detection is where sensitivity usually matters most, because a test that picks up a condition only in its late stages offers little advantage over noticing symptoms.

The formula and what goes in it

Test sensitivity =true_positives ÷ (true_positives+false_negatives) × 100
true_positives:
True positives
false_negatives:
False negatives
Result is a percentage. Both inputs count people who truly have the condition, as judged by a reference standard.
  • True positives: real cases the test correctly flagged.
  • False negatives: real cases the test missed.

Their sum is every genuine case in the sample. Sensitivity is therefore the proportion detected, and the remainder, 100% minus sensitivity, is the miss rate.

A practical difficulty is the reference standard. To count false negatives you need an independent way of knowing who truly has the condition, such as a biopsy, a laboratory culture or a long follow-up. If the reference itself misses cases, the sensitivity you calculate will be overstated, so report what standard was used.

Worked example: 180 found, 20 missed

A new test is run on 200 people who are confirmed to have a condition. It flags 180 and misses 20.

  • True positives

    180

  • False negatives

    20

Test sensitivity

90 %

The 200 genuine cases are the sum of detected and missed, 180 + 20.

  1. Add detected and missed cases: 180 + 20 = 200.
  2. Divide detected by that total: 180 / 200 = 0.90.
  3. Multiply by 100 to get 90%.
  4. The miss rate is 20 / 200 = 10%.

What 90% sensitivity means in practice

A sensitivity of 90% says the test detects nine real cases in ten and misses one. If 1,000 people with the condition were tested, about 100 would be told, wrongly, that they are clear. For a mild, self-limiting condition that might be tolerable; for a dangerous one it is a serious gap.

Because a negative result from a highly sensitive test is more reliable, clinicians use the rule of thumb that a very sensitive test is good for ruling a condition out when negative. Acceptable levels depend on the stakes and on whether repeat testing is available.

Also check how the cases were gathered. If the sample was built from obvious, advanced cases, sensitivity will be higher than the test will achieve on early or mild ones.

A related habit is to ask what happens to the missed cases afterwards. If they will be caught by a second routine check a week later, a modest sensitivity may be fine. If a miss means the condition goes unnoticed until it is much harder to treat or repair, the same figure is a much bigger problem than it looks.

Adding more detected cases

Sensitivity when true positives rise by 10% and false negatives stay at 20
ScenarioTrue positivesCalculated result
Original assumptions18090 %
True positives increased by 10%19890.826 %

Raising detected cases from 180 to 198 while the 20 misses stay put takes sensitivity from 90% to about 90.83%. The gain is small because the denominator grows too. The more direct way to improve the figure is to shrink the misses: cutting false negatives from 20 to 10 on the original 180 detections would give about 94.7%.

The asymmetry is worth remembering when comparing versions of a test: shaving a few misses off a small false-negative count moves sensitivity far more than adding a similar number of detections to a large true-positive count.

Mistakes with sensitivity

  • Reading sensitivity as the chance that a positive result is correct. That is positive predictive value, which depends on prevalence and specificity.
  • Choosing a threshold to maximise sensitivity without checking the surge in false positives it causes.
  • Evaluating on cases that were already confirmed by the same test or a related one, which creates circular and overly optimistic figures.
  • Dropping uninterpretable or invalid results from the denominator, which hides misses.
  • Comparing sensitivity across studies that used different reference standards or different stages of disease.

Small samples deserve particular suspicion. A sensitivity of 100% from 12 cases is compatible with a true value well below 90%, because the interval around such a small count is wide. Look at the number of true cases behind the percentage before leaning on it.

A short scenario

A factory tests a safety sensor against 500 deliberately introduced faults. It catches 475. Sensitivity is 475 / 500 = 95%, so one fault in twenty goes undetected. If the plant introduces a second, independent sensor with similar performance, the chance that both miss the same fault falls to about 0.05 x 0.05 = 0.25%, assuming the failures are independent, which in practice they often are not.

Common questions

What is a good sensitivity for a test?

There is no universal figure. Tests used to screen for dangerous conditions are usually expected to be highly sensitive, while confirmatory tests lean towards specificity. Acceptable levels depend on the consequence of a miss and what follow-up exists.

Is sensitivity the same as recall?

Yes. Recall in machine learning and information retrieval is the share of actual positives that a model finds, which is exactly the true positive rate used in diagnostic testing.

What is the difference between sensitivity and accuracy?

Sensitivity looks only at those who truly have the condition, whereas accuracy counts all correct results, positive and negative together. A test can have high accuracy and poor sensitivity when real cases are rare.

Can sensitivity and specificity both be 100%?

Only for a perfect test, which in practice almost never exists. Most tests trade the two off against each other by threshold, so improving one usually costs some of the other.

How many cases do you need to estimate sensitivity reliably?

Enough real cases that the interval around the estimate is narrow. With only 20 confirmed cases, one extra miss shifts the figure by 5 points, so small samples give shaky numbers.

Was this guide helpful?

Continue reading

View all blogs