Basis Lab

Answers · The mathematics underneath

Why does a test for a rare disease give so many false positives if the test is accurate?

In shortA positive result means the test fired, not that you are likely to be ill; when the disease is rare, healthy people vastly outnumber ill ones, so a small false-alarm rate on them swamps the few true cases.

A positive result does not mean you probably have the disease. An accurate test for a rare disease produces mostly false positives because the healthy group is so much larger than the ill group that a small error rate on the healthy side yields more flags than the entire ill group supplies true cases. The test is doing its job; the arithmetic of who was tested is doing the rest.

P(ill∣+)=P(+∣ill) P(ill)P(+∣ill) P(ill)+P(+∣healthy) P(healthy)P(\text{ill}\mid +)=\frac{P(+\mid \text{ill})\,P(\text{ill})}{P(+\mid \text{ill})\,P(\text{ill})+P(+\mid \text{healthy})\,P(\text{healthy})}

The arithmetic in counts

Take 10,000 people and a condition that affects one in a thousand. That gives 10 ill and 9,990 healthy. If the test catches every ill person, it produces 10 true positives. If it wrongly flags 5 healthy people in every 100, then 5 percent of 9,990 is 499.5, which rounds to 500 false positives. The positive column therefore holds 10+500=510 people. The share who really are ill is 10/510 = 1/51 ≈ 0.0196, or about 2 percent. The tiny group of ill people has been swamped by a small fraction of a very large healthy group.

FIG 1Ten thousand people, a rare condition, an accurate test
tests positivetests negativerow totals
has the condition10010
does not have it50094909990
totals510949010000
Among 510 positives, 10 are true and 500 are false. The marked cell is the small one that a positive result is trying to locate.

The asymmetry is visible in the row totals. The ill row has only 10 people, so even a perfect test can contribute at most 10 true positives. The healthy row has 9,990 people, so a 5 percent error contributes 500 false positives. No clever reading of the positive column can make the healthy row smaller. Only a higher base rate, or a much lower false-positive rate, changes the balance.

The reversed conditional

The tempting step is to take the test's sensitivity, the chance of a positive given illness, and read it as the chance of illness given a positive. Those are different conditionals. A test that catches every case has P(+∣ill)=1P(+\mid \text{ill})=1, but a positive result asks for P(ill∣+)P(\text{ill}\mid +), and the denominator is every positive, not every ill person. Here the denominator is 510, and 500 of those are healthy. The false positives are not a sign that the test is broken. They are what a 5 percent error rate looks like when it is applied to 9,990 people rather than to 10.

The reversal rule puts the base rate where it cannot be ignored: P(ill∣+)=P(+∣ill)P(ill)/P(+)P(\text{ill}\mid +)=P(+\mid \text{ill})P(\text{ill})/P(+). With P(ill)=0.001P(\text{ill})=0.001, P(+∣ill)=1P(+\mid \text{ill})=1 and P(+∣healthy)=0.05P(+\mid \text{healthy})=0.05, the numerator is 0.001 and the denominator is 0.001+0.05×0.999=0.001+0.04995=0.050950.001+0.05\times0.999=0.001+0.04995=0.05095. Dividing gives 0.001/0.05095≈0.01960.001/0.05095≈0.0196, the same 2 percent. The base rate is not a detail to add at the end. It is part of the denominator, and when it is small it keeps the denominator large compared with the numerator. A perfect sensitivity can coexist with a low posterior probability because sensitivity is the numerator's factor, while the base rate controls how much healthy weight enters the denominator.

Where the number moves

Move the base rate and the same test tells a different story. At one in a hundred, 10,000 people split into 100 ill and 9,900 healthy. The test still catches all 100, and 5 percent of 9,900 is 495 false positives. Now positives are 100+495=595, and the chance of illness after a positive is 100/595≈0.168, about 17 percent. That is far from certain, but it is far larger than the 2 percent above, with no change in the test. The variable doing the work is how common the condition is in the group being tested. A screening programme over the whole population and a clinic that sees symptomatic people are not the same experiment, even when the instrument is identical.

The 2 percent answer is not a property of the test alone. It assumes the person tested is a random draw from a population where one in a thousand is ill. If the person has symptoms, a known exposure, or a family history, their prior is higher, and the same positive can mean much more. If the disease is common, the false positives stop dominating. If the test is used repeatedly or with a confirmatory second test, the arithmetic changes again because the second result is conditioned on the first. What does not change is the direction of the question: a positive result gives you the positive column, and you still have to ask what fraction of that column is real.

Worth keeping

  • A positive result gives you the positive column, not the ill row.
  • When the base rate is low, false positives from the large healthy group can outnumber true positives from the small ill group.
  • Reversing a conditional requires the base rate, so the same test means different things in a screening population and in a high-risk clinic.

Where this goes next

This question is one step of Chance, Spread and What to Expect, a course that works through its subject from the beginning. The page that teaches this part of it is Learning From What You Saw, and it reads the whole way through whether or not you have an account.

What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.

Read that pageThe whole course

Other questions people ask about this

  1. What is the difference between variance and standard deviation?They measure the same spread: variance is the average squared distance from the mean, standard deviation is its square root, so you report the standard deviation and calculate with the variance.
  2. Why does variance square the deviations instead of just averaging how far each value is from the mean?Variance squares deviations because signed deviations cancel to zero, and squares remove the sign while allowing the algebra, scaling and addition rules that absolute distances do not.
  3. What does expected value actually mean if I never actually get that number?It is a weighted average over all possible outcomes, not a prediction of the outcome you will see; it can be a number no single result ever takes.
  4. Why does the average of many random draws get closer to the expected value as I take more?Averaging divides by the number of draws, so the spread of the average shrinks with the square root of that number; no draw ever compensates for earlier ones.
  5. How do you make a vague claim precise enough to tell whether it's true?Fix what is being talked about, what is asserted, which cases are covered and the cut-off, then name an observation that would prove it false.
  6. How do you find the parabola that best fits a function near a point?Match the function's height, slope and bending at the chosen point; those three conditions single out exactly one parabola.

Read alongside