A logbook for curious waters
← All Reckonings

The Daily Reckoning

How Can a 99%-Sensitive Test Give Mostly False Alarms?

A positive result reverses the question a test was designed to answer—and the condition's rarity can dominate the answer.

Difficulty
Foundational
Area
Probability and statistics
Reading time
9 minutes
Prerequisites
Percentages · Fractions · The probability of one event given another
A dark maritime probability chart routes a narrow green true-positive stream and a broad pink false-positive stream into a pool of six positive results: one green and five pink.

Imagine a screening test with 99% sensitivity. Among people who truly have the condition, the test correctly flags 99 out of every 100. You receive a positive result.

Does that mean there is a 99% chance you have the condition?

No. For one plausible set of numbers, the chance is only one in six.

This lesson uses an invented test—not a recommendation about any real assay—to isolate the mathematics. The test has 99% sensitivity, 95% specificity, and is used in a population where 1% of people have the condition. Specificity is the percentage of people without the condition who correctly test negative. A specificity of 95% also means that 5% of people without the condition receive false positive results.

Count people before manipulating symbols

The interactive grid below represents 10,000 people. Each row contains 100 people, so one row equals one percentage point of prevalence. Prevalence means the percentage of this population that has the condition before anyone’s test result is known.

10,000-person test bench

Change how rare the condition is

Expected test results among 10,000 peopleAt one percent prevalence, the top row represents 100 people with the condition: 99 test positive and one tests negative. The remaining 99 rows represent 9,900 people without the condition: 495 test positive and 9,405 test negative.

The imagined test keeps 99% sensitivity and 95% specificity. Arrow keys adjust a focused slider.

• True positive× False negative/ False positive□ True negative
Have the condition100
True positives99
False positives495
Among positive results1 in 6 is a true positive · 16.7%
Each row represents 100 people. Rows above the bright divider contain people who have the condition; rows below it contain people who do not. At 1% prevalence, five columns of false positives outweigh the single row of true positives.

At 1% prevalence, only the first row contains people who have the condition. Nearly that whole row becomes true positives. The five pink columns below it are false positives drawn from the much larger group without the condition. A small error rate applied to 9,900 people can outweigh an excellent detection rate applied to 100 people.

Move the prevalence slider. The sensitivity and specificity do not change, but the meaning of a positive result changes substantially. The population being tested supplies information before the assay does.

Two questions that sound alike

Let DD denote the event that a person has the condition, and let ++ denote the event that the person receives a positive test result.

Sensitivity answers this question:

P(+∣D)=0.99.P(+\mid D)=0.99.

The vertical bar in P(+∣D)P(+\mid D) means “given that.” The expression says: among people known to have the condition, what fraction test positive?

After receiving a positive result, however, the patient wants the probability in the other direction:

P(D∣+).P(D\mid +).

That expression asks: among people known to have tested positive, what fraction have the condition? Reversing the order around the vertical bar changes the group being counted. In general,

P(+∣D)≠P(D∣+).P(+\mid D)\ne P(D\mid +).

The second probability is called the positive predictive value in diagnostic testing. The National Library of Medicine’s diagnostic-testing overview defines it as the number of true positives divided by all positive results and notes that prevalence affects predictive values.

Bayes’ theorem turns the question around

For this two-outcome testing problem, Bayes’ theorem gives

P(D∣+)=P(+∣D)P(D)P(+∣D)P(D)+P(+∣¬D)P(¬D).P(D\mid +) = \frac{P(+\mid D)P(D)} {P(+\mid D)P(D)+P(+\mid \neg D)P(\neg D)}.

Every symbol has a concrete role:

  • P(D)P(D) is the prevalence, or prior probability of the condition.
  • P(¬D)P(\neg D) is the probability of not having the condition. The symbol ¬\neg means “not.”
  • P(+∣D)P(+\mid D) is the sensitivity.
  • P(+∣¬D)P(+\mid \neg D) is the false positive rate, equal to one minus the specificity.
  • P(D∣+)P(D\mid +) is the positive predictive value we want.

The numerator counts the probability of being both affected and positive. The denominator counts every route to a positive result: a true positive route plus a false positive route.

Worked example: 10,000 tests

Begin with the 1% prevalence rather than the positive result.

Step 1: Divide the population by condition status.

Among 10,000 people, 1% have the condition:

10,000×0.01=100.10{,}000\times0.01=100.

The remaining number without the condition is

10,000−100=9,900.10{,}000-100=9{,}900.

Step 2: Apply the 99% sensitivity only to the 100 affected people.

The number of true positives is

100×0.99=99.100\times0.99=99.

One affected person receives a false negative result.

Step 3: Apply the 95% specificity only to the 9,900 unaffected people.

A 95% specificity leaves a 5% false positive rate. The number of false positives is

9,900×0.05=495.9{,}900\times0.05=495.

Step 4: Look only at positive results.

There are 9999 true positives and 495495 false positives, for a total of

99+495=59499+495=594

positive results. Therefore

P(D∣+)=99594=16≈16.7%.P(D\mid +) =\frac{99}{594} =\frac16 \approx16.7\%.

The 99% sensitivity was not misleading; it answered a different conditional question. The surprise comes from neglecting the base rate, another name for the 1% prevalence known before the result.

The same arithmetic fits directly into Bayes’ theorem:

P(D∣+)=(0.99)(0.01)(0.99)(0.01)+(0.05)(0.99)=0.00990.0099+0.0495=0.00990.0594=16.\begin{aligned} P(D\mid +) &=\frac{(0.99)(0.01)}{(0.99)(0.01)+(0.05)(0.99)}\\ &=\frac{0.0099}{0.0099+0.0495}\\ &=\frac{0.0099}{0.0594}\\ &=\frac16. \end{aligned}

The two appearances of 0.990.99 in the first line have different meanings: the first is sensitivity, while the second is P(¬D)=1−0.01P(\neg D)=1-0.01, the fraction of the population without the condition.

Try two variations

Problem 1

Keep the same 99% sensitivity and 95% specificity, but suppose prevalence rises to 10%. Among 10,000 people, what is the positive predictive value?

Reveal the solution

At 10% prevalence, 1,0001{,}000 people have the condition and 9,0009{,}000 do not.

The number of true positives is

1,000×0.99=990.1{,}000\times0.99=990.

The number of false positives is

9,000×0.05=450.9{,}000\times0.05=450.

There are 990+450=1,440990+450=1{,}440 positive results. The positive predictive value is

9901,440=0.6875=68.75%.\frac{990}{1{,}440}=0.6875=68.75\%.

The test characteristics stayed fixed. Raising the prevalence from 1% to 10% raised the positive predictive value from 16.7% to 68.75%.

Problem 2

Return to 1% prevalence and 99% sensitivity. What specificity is needed for exactly half of all positive results to be true positives?

Reveal the solution

Among 10,000 people, the test produces 9999 true positives. For true positives to make up exactly half of positive results, the number of false positives must also be 9999.

The false positive rate must therefore be

999,900=0.01=1%.\frac{99}{9{,}900}=0.01=1\%.

Specificity is one minus the false positive rate:

1−0.01=0.99=99%.1-0.01=0.99=99\%.

At 1% prevalence, raising specificity from 95% to 99% raises the positive predictive value from one sixth to one half.

A theorem published by a second author

Thomas Bayes did not publish the work now attached to his name. Bayes, an English Presbyterian minister, died in 1761. Richard Price found an unpublished probability manuscript among Bayes’ papers, edited it, wrote an introduction, and communicated it to the Royal Society. The resulting 1763 paper in Philosophical Transactions asked how observed successes and failures should change an estimate of an unknown chance.

Price’s role complicates the familiar eponym. He supplied more than clerical delivery, and his introduction attached a theological purpose to the calculation: recurring order, Price argued, gave reason to infer stable causes and ultimately an intelligent cause. That claim belongs to Price’s introduction; surviving evidence does not establish it as Bayes’ own reason for doing the mathematics.

Price also belonged to the political life of eighteenth-century Britain. The Stanford Encyclopedia of Philosophy describes him as a dissenting minister who campaigned against penalties on religious nonconformists and supported the American and French revolutions. Edmund Burke attacked Price’s defense of the French Revolution; Thomas Paine and Mary Wollstonecraft answered Burke. The 1763 probability paper concerns induction, not those political campaigns, but the person who brought it into print was not an apolitical courier.

Pierre-Simon Laplace appears to have developed inverse probability without knowing Bayes’ paper, although the surviving evidence does not settle that point. His first major paper on the subject appeared in 1774. Laplace later used probabilistic inference on population data, including birth ratios and estimates of France’s population. The Encyclopedia of Mathematics account of Laplace notes that his work helped show how methods used for physical phenomena could also be applied to the social world. Bayes supplied an early solution; Price preserved and framed it; Laplace turned the idea into a sustained program.

What changes outside the example

Clinical testing. Sensitivity, specificity, predictive value, specimen selection, and the reference standard all matter. The U.S. Food and Drug Administration’s guidance on diagnostic-test studies recommends reporting paired accuracy measures with confidence intervals and warns that study populations and benchmarks affect interpretation. A screening result can change a probability without settling a diagnosis. Real clinical decisions require the actual test’s validation data and the patient’s circumstances, not the invented numbers in this lesson.

Search and rescue. A search team can begin with a probability map for a missing vessel, then lower the probability assigned to a region after searching it without success and redistribute probability elsewhere. The Society for Industrial and Applied Mathematics describes Bayesian search theory as the analytic core of the U.S. Coast Guard’s Search and Rescue Optimal Planning System. A failed search does not prove an area is empty because detection is imperfect—the same conditional-probability reversal appears in a different uniform.

Classification systems. Spam filters and other probabilistic classifiers combine an initial rate with evidence from features. A rare category can still attract many false alarms when a system processes an enormous unaffected population. Modern systems may be much more complicated than the two-branch calculation above, but calibration still asks whether a reported probability matches observed frequencies.

One idea to remember

A test result cannot be interpreted from sensitivity alone. Bayes’ theorem counts both paths to the observed result, and the larger population can make a small false positive rate dominate.

For another lesson about changing probabilities, revisit Markov chains and their long-run behavior. A useful next step is to replace one positive result with a sequence of independent results and ask when multiplying evidence is justified.

Sources