1. Home
  2. Explore
  3. Mathematics
  4. Medical Test Paradox & Bayes

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Medical Test Paradox & Bayes

The Medical Test Paradox and Bayesian Reasoning

The Paradox of Highly Accurate Tests with Low Predictive Value

A veridical paradox is a fact that is provably true yet feels false when phrased in a certain way. The medical test paradox is a classic example: a test that is highly accurate for most people can still give a result that is very likely wrong for a particular individual. An accurate test is not necessarily a predictive test.


Concrete Example with Numbers

Picture 1000 women, with 1% prevalence of breast cancer (10 women have cancer, 990 do not). Suppose all undergo screening:

  • Among the 10 with cancer: 9 get true positive results, 1 gets a false negative

  • Among the 990 without cancer: 89 get false positives, 901 get true negatives

If a woman receives a positive test result, she is either one of the 9 true positives or one of the 89 false positives. The probability she actually has cancer given a positive result is:

P(cancer∣positive)=99+89=998≈111P(\text{cancer} \mid \text{positive}) = \frac{9}{9 + 89} = \frac{9}{98} \approx \frac{1}{11}P(cancer∣positive)=9+899​=989​≈111​

In medical terminology, this is called the positive predictive value (PPV) — the number of true positives divided by the total number of positive test results. It answers the question: to what extent does a positive test actually predict the disease?


Key Terminology: Test Accuracy Metrics

Test accuracy is not a single number but two separate numbers:

For Those with the Disease

  • Sensitivity (true positive rate): how often the test correctly identifies those with the disease

    • In the example: 9/10 = 90%

  • False negative rate: the complement — 10% in this example

For Those without the Disease

  • Specificity (true negative rate): how often the test correctly identifies those without the disease

    • In the example: 901/990 ≈ 91%

  • False positive rate: the complement — about 9% in this example

The paradox: The test is over 90% accurate overall (gives correct results to over 90% of patients), yet a positive result has only about a 1 in 11 chance of being accurate.


The Psychological Reality: The Gigerenzer Study

In 2006–2007, psychologist Gerd Gigerenzer gave statistics seminars to practicing gynecologists using this exact scenario:

  • A 50-year-old woman, no symptoms, participates in routine mammography

  • She tests positive and wants to know her chance of having cancer

  • The doctors are told: prevalence is 1%, sensitivity is 90%, specificity is 91%

The correct answer (about 1 in 11, or roughly 9%) was the least common choice among the doctors. Over half answered 9 in 10 (90%), and only a fifth gave the correct answer — worse than random guessing.


Understanding What Tests Actually Do: Updating Probabilities

The fundamental misconception is thinking that tests provide a final answer about whether you have a disease. Instead, tests update your chances.

  • Prior probability: Before taking the test, the patient's chance of having cancer was 1 in 100 (the population prevalence)

  • Posterior probability: After the positive test, the chance is updated to about 1 in 11

The test accuracy tells us the strength of this updating, not a final answer. A test with a sensitivity of 90% does not mean a positive result gives you a 90% chance of having the disease.


The Bayes Factor (Likelihood Ratio)

The Bayes factor (also called the likelihood ratio) is a single number extracted from the test's accuracy statistics:

Bayes factor=SensitivityFalse positive rate=90%9%=10\text{Bayes factor} = \frac{\text{Sensitivity}}{\text{False positive rate}} = \frac{90\%}{9\%} = 10Bayes factor=False positive rateSensitivity​=9%90%​=10

This answers the question: how much more likely are you to see a positive test result with cancer versus without it?

Rule of Thumb for Small Priors

For small prior probabilities, the posterior probability can be approximated by multiplying the prior by the Bayes factor:

  • Prior = 1% (1 in 100), Bayes factor = 10 → estimated posterior ≈ 1 in 10 (slightly above the true 1 in 11)

  • Prior = 0.1% (1 in 1000), Bayes factor = 10 → estimated posterior ≈ 1 in 100

Verification with a sample population for the 0.1% case: Picture 10,000 patients where only 10 have cancer. With 90% sensitivity, 9 true positives. With 91% specificity, 9% of 9990 ≈ 900 false positives. So the probability is 9 ÷ (9 + 900) ≈ 1%, matching the rule of thumb.

The Rule Breaks for Large Priors

For a prior of 10%, the naive multiplication rule (10% × 10 = 100%) would be wrong. Using a sample population approach: out of 100 patients with 10 having cancer, the test gives 9 true positives and about 8 false positives (9% of 90). So the probability is 9 ÷ (9 + 8) = 9/17 ≈ 53%, not 100%.


Odds: A More Natural Unit for Bayesian Updating

Probability is the ratio of positive cases to all possible cases (e.g., 1 in 5, 1 in 10). Odds is the ratio of positive cases to negative cases (e.g., 1 to 4, 1 to 9).

Probability

Odds

50%

1 to 1 (written 1:1)

10%

1 to 9 (written 1:9)

80%

4 to 1 (written 4:1)

Key difference: probabilities range from 0 to 1 with even chances at 0.5, while odds range from 0 to infinity with even chances at 1.


Bayes' Rule in Odds Form: A Precise, Simple Formula

The exact form of Bayes' rule using odds is:

Posterior odds=Prior odds×Bayes factor\text{Posterior odds} = \text{Prior odds} \times \text{Bayes factor}Posterior odds=Prior odds×Bayes factor

Working Through the Examples

1% prevalence (prior odds = 1:99):

Posterior odds=1:99×10=10:99\text{Posterior odds} = 1:99 \times 10 = 10:99Posterior odds=1:99×10=10:99

Converting back to probability: 10÷(10+99)≈1/1110 \div (10 + 99) \approx 1/1110÷(10+99)≈1/11 ✅

10% prevalence (prior odds = 1:9):

Posterior odds=1:9×10=10:9\text{Posterior odds} = 1:9 \times 10 = 10:9Posterior odds=1:9×10=10:9

This reads intuitively as "a little above even chances." Converting: 10÷(10+9)=10/19≈53%10 \div (10 + 9) = 10/19 \approx 53\%10÷(10+9)=10/19≈53% ✅

1% prevalence with a more accurate test (false positive rate = 1%, Bayes factor = 90):

Posterior odds=1:99×90=90:99\text{Posterior odds} = 1:99 \times 90 = 90:99Posterior odds=1:99×90=90:99

This is "a little under even chances." Converting: 90÷(90+99)≈48%90 \div (90 + 99) \approx 48\%90÷(90+99)≈48%

The Critical Insight

The Bayes factor stays constant across different patients taking the same test, even though the posterior probability varies wildly depending on prior odds. The test updates each patient's individual prior by the same multiplicative factor.

Note: The prior is not necessarily the population prevalence — symptoms, known contacts, and other personal factors also shape the prior.


Negative Test Results

The logic is identical for negative results, but the Bayes factor changes:

Bayes factor (negative)=False negative rateSpecificity=10%91%≈19\text{Bayes factor (negative)} = \frac{\text{False negative rate}}{\text{Specificity}} = \frac{10\%}{91\%} \approx \frac{1}{9}Bayes factor (negative)=SpecificityFalse negative rate​=91%10%​≈91​

A negative test result in this example would reduce the prior odds by about an order of magnitude.


Comparison with the Traditional Bayes' Rule Formula

The Traditional Formula

P(disease∣positive)=P(disease)×P(positive∣disease)P(positive)P(\text{disease} \mid \text{positive}) = \frac{P(\text{disease}) \times P(\text{positive} \mid \text{disease})}{P(\text{positive})}P(disease∣positive)=P(positive)P(disease)×P(positive∣disease)​

When expanded for calculations:

P(disease∣positive)=P(disease)×sensitivityP(disease)×sensitivity+P(no disease)×false positive rateP(\text{disease} \mid \text{positive}) = \frac{P(\text{disease}) \times \text{sensitivity}}{P(\text{disease}) \times \text{sensitivity} + P(\text{no disease}) \times \text{false positive rate}}P(disease∣positive)=P(disease)×sensitivity+P(no disease)×false positive rateP(disease)×sensitivity​

This is exactly what the sample population approach does symbolically — the numerator is the proportion of true positives, and the denominator is true positives plus false positives.

Key Differences

Traditional formula:

  • Mixes prior probability and test accuracy together in one expression

  • Requires recomputing everything from scratch when the prior changes

  • Does not readily separate the role of prior knowledge from the role of the test

Odds formulation with Bayes factor:

  • Cleanly separates prior odds (patient context) from the Bayes factor (test characteristic)

  • Allows precomputing the Bayes factor and reusing it with different priors

  • Makes sequential updating with multiple pieces of evidence straightforward

Multiple Pieces of Evidence

With the odds formulation, updating on multiple pieces of evidence is simply repeated multiplication:

Posterior odds=Prior odds×Bayes factor1×Bayes factor2×…\text{Posterior odds} = \text{Prior odds} \times \text{Bayes factor}_1 \times \text{Bayes factor}_2 \times \dotsPosterior odds=Prior odds×Bayes factor1​×Bayes factor2​×…

Each piece of evidence (a second test, presence of symptoms, known exposure) contributes its own Bayes factor — the answer to "how much more likely would you see this evidence with the disease versus without it?"


Conceptual Advantages of the Bayes Factor Approach

The Bayes factor is a number that does not look like a probability, which helps prevent misinterpretation:

  • Saying "the test has a 9% false positive rate" sounds dangerously close to "there is a 9% chance your positive result is wrong"

  • Saying "the Bayes factor for a positive result is 10" explicitly frames the test result as something that acts on a prior, forcing recognition that the prior exists and matters

The traditional formula, however, has its own strength: when understood as an encapsulation of the sample population idea, it can be more intuitive for building initial understanding. It served as the verification method throughout this discussion.

Like any design decision, there is no clear-cut objective best — but seriously considering the question leads to a deeper understanding of Bayes' rule.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent