uncertainty

Bayes Theorem in Medical Screening: What a Positive Means

A positive screening result is not a diagnosis. See how prevalence and test accuracy combine to change what that result means.

Bayes Theorem in Medical Screening: What a Positive Means: Equal true and false alerts produce 50% precisionAmong 10,000 synthetic cases with a one percent base rate, 99 true alerts and 99 false alerts create 198 alerts. Exactly half of the alerts correspond to the target condition.SYNTHETIC / FIXED VALUES10,000 synthetic casesTarget present: 100Target absent: 9,900True alerts: 99False alerts: 99Missed target: 1Correct clears: 9,801198 alerts / 99 true = 50% precision
Synthetic counts for 10,000 cases at 1% prevalence, 99% sensitivity, and 99% specificity. The alert precision is 99 divided by 198, or 50%.
View the synthetic values in this figure
Synthetic values used in the equal true and false alerts produce 50% precision figure
OutcomeCountShare of all cases
True alert990.99%
False alert990.99%
Missed target10.01%
Correct clear9,80198.01%
All alerts19850% true
On this page
Synthetic by design. The scenario below is generated for explanation. It is not a survey, forecast, diagnosis, product test, or claim about a real group.

Bayes theorem in medical screening: the question behind a positive

A screening test can be good at detecting a condition and still produce positive results in many people who do not have it. That is not a contradiction. Test performance describes what happens when disease status is already known; a person receiving a result wants to reason in the opposite direction. Given this result, how likely is the condition?

Bayes theorem connects those questions. It combines how common the condition is before testing with how often the test returns each result for people with and without the condition. The starting frequency is called prevalence, or the base rate. The answer for an individual also depends on whether that starting frequency describes a group relevant to them.

The distinction is a standard application of conditional probability: the probability of a positive result given a condition is not generally the probability of the condition given a positive result. OpenStax explains conditional probability and its rules in Two Basic Rules of Probability.

Three quantities that play different roles

Sensitivity is the probability of a positive result among people who have the condition. Specificity is the probability of a negative result among people who do not have it. Prevalence is the proportion of people in the group being considered who have the condition before seeing their test results. Each quantity uses a different group as its denominator.

A false positive is a positive result for someone without the condition. The false-positive rate is the complement of specificity. What many readers actually want after a positive result is the positive predictive value: the proportion of all positive results that belong to people with the condition. It cannot be read from sensitivity alone, because positive results also include false positives.

In probability notation, Bayes theorem gives P(condition | positive) = P(positive | condition) × P(condition) / P(positive). The denominator includes positive results from both people with the condition and people without it. A table of counts often makes that denominator more intuitive than the formula; OpenStax introduces this way of organizing outcomes in Contingency Tables.

A worked screening example

Everything numerical in this section is synthetic and illustrative, not a claim about any real test or disease. Imagine screening 10,000 people in a group where prevalence is 1%. Assume the illustrative test has 90% sensitivity and 95% specificity. Under those synthetic assumptions, 100 people have the condition and 9,900 do not.

Among the 100 illustrative people with the condition, 90 test positive and 10 test negative. Among the 9,900 illustrative people without it, 9,405 test negative and 495 test positive. The positive-result column therefore contains 90 true positives and 495 false positives. This is the same two-way classification that a contingency table records.

For this synthetic example, the positive predictive value is 90 / (90 + 495), or about 15.4%. The calculation does not mean the test detects only 15.4% of cases: its assumed sensitivity remains 90%. It means that, within this illustrative group, about 15.4% of positive results come from people who have the condition. Because far more people start without the condition, even an illustrative 5% false-positive rate contributes many positive results.

Why the starting group changes the answer

Now consider a second, entirely synthetic group of 10,000 people. Keep the same illustrative 90% sensitivity and 95% specificity, but assume prevalence is 10%. In this illustrative group, 1,000 people have the condition and 9,000 do not. The assumed test produces 900 true positives and 450 false positives.

Among positive results in that second synthetic group, the proportion with the condition is 900 / (900 + 450), or about 66.7%. The test did not improve between the two illustrations. The group changed: more people started with the condition, so true positives account for a larger share of all positive results. A tree diagram offers another way to follow those branches from starting group to test outcome; see OpenStax’s Tree and Venn Diagrams.

That is why a predictive value reported for one population may not carry over unchanged to another. When interpreting a screening result, ask who was screened and how the starting chance of the condition was estimated. A prevalence figure for a broad group may not represent a particular person’s circumstances. Bayes theorem shows how a stated starting probability affects the result; it does not supply that starting probability by itself.

What a negative result does and does not say

The same synthetic counts can be read from the negative-result column. In the first illustrative group, 10 people with the condition test negative, while 9,405 people without it test negative. Among the 9,415 illustrative negative results, 10 belong to people with the condition. The synthetic proportion is 10 / 9,415, or about 0.11%.

That proportion answers a different question from sensitivity or specificity. It asks how often the condition remains present among people with a negative result in the stated illustrative group. Change the prevalence, sensitivity, or specificity and the answer can change too. A negative result is therefore evidence, not an unconditional guarantee.

The examples also assume a clear yes-or-no condition and a single test with fixed performance. Real interpretation requires attention to which population a test’s performance estimates describe and what result is being evaluated. The calculation is useful precisely because it makes those inputs visible instead of compressing them into a vague claim that a test is accurate.

A practical way to read a screening result

Start by separating the direction of each claim. Sensitivity asks about results among people with the condition. Specificity asks about results among people without it. Positive predictive value asks about people with the condition among everyone who tested positive. Swapping those denominators changes the question, even when the same words, such as positive and condition, appear in both statements.

When possible, translate the probabilities into an illustrative group of people and count every branch. Clearly label those counts as illustrative unless they come from observed data. Then compare true positives with all positives, or people with the condition among negative results with all negatives. This count-based approach exposes which assumptions drive the answer without requiring a reader to memorize the formula.

Practical checklist:

  • Identify the group whose prevalence is being used.
  • Check what sensitivity and specificity refer to.
  • Count both true and false results in the column of interest.
  • Keep an illustrative calculation separate from a clinical interpretation of an individual result.

Keep these distinctions

  • A test's sensitivity is not the probability that a person with a positive result has the condition.
  • The proportion of positive results that are true positives depends on how common the condition is in the group being screened.
  • A count-based table makes the role of false positives easier to see than a test accuracy percentage alone.

Sources checked

These sources support the statistical definitions and boundaries. The scenario, prose, calculations, and figure on this page are original to Count & Chance.

  1. 01Two Basic Rules of ProbabilityOpenStax / checked 2026-09-18
  2. 02Contingency TablesOpenStax / checked 2026-09-18
  3. 03Tree and Venn DiagramsOpenStax / checked 2026-09-18