Bayes’ Theorem & Post-Test Probability Calculator
Update pre-test probability (disease prevalence) with test sensitivity and specificity to compute likelihood ratios (LR+ and LR−), post-test odds, and post-test probability for both positive and negative test results.
Pre-Odds = p / (1 - p) | Post-Odds = Pre-Odds * LR | Post-Prob = Post-Odds / (1 + Post-Odds)
Study Guide: How Bayes’ Theorem Updates Diagnostic Probability
Bayes’ Theorem answers the question clinicians and students actually care about: “Given that a patient tested positive, what is the probability they truly have the condition?” Sensitivity and specificity describe how a test performs when disease status is already known; Bayes’ Theorem flips the conditioning by combining those test characteristics with the pre-test probability (base rate).
Two Equivalent Ways to Solve Bayes’ Problems on Exams
- The Odds & Likelihood Ratio Method (Fastest for USMLE/MCAT):
Convert pre-test probability p into pre-test odds:
Odds_pre = p / (1 − p). Multiply byLR+ = Sens / (1 − Spec)for a positive result (orLR− = (1 − Sens) / Specfor a negative result) to getOdds_post. Finally convert back:P_post = Odds_post / (1 + Odds_post). - The 1,000-Person Natural Frequency Table (Least Error-Prone):
Start with 1,000 hypothetical people. Split them into diseased (
1,000 × prevalence) and healthy (1,000 × (1 − prevalence)). Multiply diseased by sensitivity to get True Positives (TP), and multiply healthy by(1 − specificity)to get False Positives (FP). ThenP(Disease | Test +) = TP / (TP + FP).
Benchmark Guide for Likelihood Ratios
| Likelihood Ratio Value | Impact on Pre-Test Probability | Clinical Exam Rule of Thumb |
|---|---|---|
| LR+ > 10 | Large increase in probability | Strong evidence to rule IN a diagnosis |
| LR+ 5 to 10 | Moderate increase | Useful confirmatory support |
| LR = 1.0 | No change at all | Test provides zero diagnostic information |
| LR− 0.1 to 0.2 | Moderate decrease | Helps lower suspicion |
| LR− < 0.1 | Large decrease in probability | Strong evidence to rule OUT a diagnosis |
Worked Example: Why Base Rate Neglect Tricks Students
Problem: A screening assay has 95% sensitivity and 95% specificity. It is given to an asymptomatic population where disease prevalence is only 1%. If a person tests positive, what is the probability they actually have the disease?
Solution (1,000-person table): Out of 1,000 people, 10 have the disease and 990 do not. Among the 10 diseased individuals, 95% × 10 = 9.5 test positive (True Positives). Among the 990 healthy individuals, 5% × 990 = 49.5 test falsely positive (False Positives). Total positives = 9.5 + 49.5 = 59.0. Therefore, Post-Test Probability = 9.5 / 59.0 = 16.1%—even with a “95% accurate” test, over 83% of positive screens are false positives!
P(Test + | Disease) with positive predictive value P(Disease | Test +). Sensitivity and specificity are fixed properties of the test, whereas post-test probability changes dramatically with prevalence.
Frequently Asked Questions
Why do likelihood ratios matter if we already have sensitivity and specificity?
Likelihood ratios combine sensitivity and specificity into a single multiplier that does not depend on prevalence and can be chained sequentially across multiple independent tests: Final Odds = Pre-Odds × LR_test1 × LR_test2.
Is Post-Test Probability after a positive test identical to PPV?
Yes. Positive Predictive Value (PPV) is simply the Bayesian post-test probability given a positive result. Likewise, the post-test probability of disease after a negative test equals 1 − NPV.
Why is a second confirmatory test ordered after a positive screening test?
After the first positive screen raises the patient’s probability from, say, 1% to 16.1%, that 16.1% becomes the new pre-test probability for the confirmatory test, driving the post-test probability much higher if the second test is also positive.