From pre-test to post-test probability

A 90%-sensitive, 90%-specific test comes back positive on two people the same afternoon. The first walked in for a routine screen, where the condition turns up in about 1 person in 100. The second was sent over by a clinician who, from the history and exam, already put the chance of disease near 1 in 3 before anything was drawn. Same test, same word on the report — positive — and yet for the first person it means roughly an 8% chance the disease is real, while for the second it means about 79%. The assay never changed. What changed is where each person started.

That starting point has a name: the pre-test probability. The thing you actually want — the chance the disease is present after the result is in — is the post-test probability. Moving from one to the other is a single operation, Bayesian updating, and it is the engine sitting underneath every other guide on this site.

Pre-test probability: where the calculation starts

The pre-test probability is your best estimate of disease before the result is known. In a screening program it is the prevalence — how common the condition is in the group being screened. In a diagnostic work-up it is the clinician's suspicion, read off the symptoms, exam, and risk factors of one particular patient. Those are two ways of filling the same slot in the formula, and the test cannot tell which one you used: a positive result carries the same evidential weight either way. Everything that makes that positive worth more or less is contributed by the number you brought to it.

Because it does so much of the work, the pre-test probability deserves an honest estimate rather than a reflex: low by definition for a rare condition screened across the general public, but an order of magnitude higher for a symptomatic patient a clinician already suspects. That gap is the whole story below.

Road one: update in odds form

The cleanest way to run the update is in odds, in three steps.

  1. Convert the pre-test probability to odds. preOdds = p ÷ (1 − p).
  2. Multiply by the likelihood ratio for the result you got. postOdds = preOdds × LR — using LR+ after a positive, LR− after a negative.
  3. Convert the answer back to a probability. postProb = postOdds ÷ (1 + postOdds).

Take the first patient, at a pre-test probability of 1% (p = 0.01), tested with the 90/90 tool. Its LR+ is sensitivity ÷ (1 − specificity) = 0.90 ÷ 0.10 = 9. So preOdds = 0.01 ÷ 0.99 = 0.0101; postOdds = 0.0101 × 9 = 0.0909; and postProb = 0.0909 ÷ 1.0909 = 0.083 — about 8.3%. The likelihood ratio is built only from sensitivity and specificity, so it does not move with prevalence; the same LR+ of 9 applies to every patient this test touches (see likelihood ratios). A positive nudged the odds up nine-fold — but starting from long odds, nine-fold still lands low. Laying a straightedge from a pre-test probability through the likelihood ratio to read off the answer is exactly what a Fagan nomogram does, and the calculator draws one live.

Try it

The low-suspicion screen: a 90%/90% test at 1% pre-test probability lands a positive at only about 8%.

Open this scenario in the calculator →

Road two: just count the people

You can reach the same number without ever writing an odd. Put 1,000 people through the same scenario as whole bodies — the natural-frequency version of the question. At 1% prevalence, 10 have the condition and 990 do not. A 90%-sensitive test flags 9 of the 10 true cases; a 90%-specific test clears most of the healthy group but lets 10% slip through as 99 false alarms. That makes 9 + 99 = 108 positive results, of which 9 are real: 9 ÷ 108 = 0.083, about 8.3% — the identical figure the odds road produced.

The two answers match because they are the same theorem written two ways. After a positive test, the post-test probability is the positive predictive value; the odds road and the counting road are two routes to one destination. That equivalence is worth leaning on: whenever the probability version feels slippery, the count version sits right beside it to check it. The calculator's Bayes tree draws the counting road and the nomogram draws the odds road — both update the same starting probability, and never disagree.

The same test, a different patient

Now the second patient, whom the clinician placed at a pre-test probability of 30% (p = 0.30) before any test. Run the identical machinery. Odds road: preOdds = 0.30 ÷ 0.70 = 0.4286; postOdds = 0.4286 × 9 = 3.857; postProb = 3.857 ÷ 4.857 = 0.794, about 79.4%. Counting road: among 1,000 such patients, 300 have the condition, so the test flags 270 true positives and 70 false positives — 340 positives in all, of which 270 ÷ 340 = 0.794 are real. Same two roads, same destination, at a second starting point.

Look at what just happened. The test contributed the same nine-fold shift in the odds both times — that is all an LR+ of 9 ever means. But applied to a pre-test probability of 1% it produced an 8% post-test probability, and applied to a pre-test probability of 30% it produced a 79% one. One identical positive result, differing by nearly a factor of ten in what it implies, purely because the two people started in different places. The population a test is used in is not a footnote to the result; it is half of the result.

Try it

The same 90%/90% test on a higher-suspicion patient — 30% pre-test probability — pushes a positive to about 79%.

Open the higher-suspicion scenario →

A negative result updates the same way

Updating runs in both directions. A negative shifts the odds down, using the negative likelihood ratio — here LR− = (1 − sensitivity) ÷ specificity = 0.10 ÷ 0.90 = 0.11 — and the residual chance of disease it leaves behind equals 1 − NPV. For the 30% patient, a negative multiplies the pre-test odds of 0.4286 by 0.11 to give post-test odds of 0.048, a residual probability of about 4.5%. For the 1% screen the same negative lands near 0.1%. A negative reassures far more when you began with little to lose. A result never zeroes a probability out; it only revises it.

Screening lives where the pre-test probability is low

The 30% patient is a diagnostic scenario — someone a clinician already suspected. Screening is the opposite by design: it casts a wide net over people who are mostly well, so the pre-test probability going in is small. Hold the same 90/90 test fixed (LR+ still 9) and read it against the real background rates from three screening settings:

Screening setting (pre-test probability)Pre-test oddsPost-test odds (× 9)Post-test probability
Undiagnosed HIV, US adults — 0.4%0.00400.0363.5%
Lung cancer, high-risk smokers — 1.1%0.01110.1009.1%
Prostate cancer, first-round — 5.4%0.05710.51434%

Every row runs the same recipe with the same LR+ = 9; only the first column changed. Even the highest realistic starting point — a 5.4% first-round prostate risk — leaves a positive at about 34%, while the lowest sits at 3.5%, where a false alarm is by far the likeliest explanation. It took a genuine 30% suspicion to push the earlier patient to 79%. So screening positives usually land low because screened people start low — and that low predictive value is not a flaw in the test but a fact about the population, the cascade of false alarms taken up in the base-rate fallacy. (The prevalences are real; the 90/90 accuracy is one teaching test held constant — each screen's own likelihood ratio is on its test page.)

Try it

Keep the same 90/90 test but drag the prevalence to 5.4% — first-round prostate cancer. The identical positive result now lands near 34%, not 8%.

Open the prostate-prevalence scenario →

What the update does and doesn't settle

This is a deliberately clean model. It takes one test with a single positive-or-negative result, treats its likelihood ratio as a fixed known quantity, and treats the pre-test probability as a number you can simply name — when in a real clinic it is an estimate with its own uncertainty, and chaining several tests assumes their errors are independent in ways they often are not. What the update does handle is the move the whole site is built on: how the strength of a result — sensitivity and specificity, packaged as a likelihood ratio — combines with a starting probability to yield an updated one. It says nothing about whether a person should be tested, or what to do once a probability is in hand; those turn on the harms and benefits that follow, not on the arithmetic here. Step through the same update with your own inputs in the calculator's worked example, moving one slider at a time.

References

  1. Fagan TJ. Nomogram for Bayes's theorem. N Engl J Med, 1975;293(5):257.
  2. Deeks JJ, Altman DG. Diagnostic tests 4: likelihood ratios. BMJ, 2004;329(7458):168–169.
  3. Altman DG, Bland JM. Diagnostic tests 2: predictive values. BMJ, 1994;309(6947):102.
  4. Gigerenzer G, Edwards A. Simple tools for understanding risks: from innumeracy to insight. BMJ, 2003;327(7417):741–744.
  5. U.S. Preventive Services Task Force. Human immunodeficiency virus (HIV) infection: screening. USPSTF, 2019.
  6. National Lung Screening Trial Research Team. Reduced lung-cancer mortality with low-dose computed tomographic screening. N Engl J Med, 2013;365(5):395–409.
  7. Heijnsdijk EAM, der Kinderen A, Wever EM, et al. Overdetection, overtreatment and costs in prostate-specific antigen screening (ERSPC Rotterdam). Br J Cancer, 2009;101(11):1833–1838.

Educational model — not medical advice. It illustrates the statistics of testing and treatment; it does not describe any specific real-world test.