Post Test Probability Calculator - Fagan-style Bayes Update
Post test probability calculator that turns a pre-test probability and a likelihood ratio into the Bayes-rule post-test probability, with pre-test and post-test odds shown for teaching.
Post Test Probability Calculator
Results
What Is Post Test Probability Calculator?
The post test probability calculator takes a pre-test probability and a test likelihood ratio and returns the Bayes-rule post-test probability for that single test result. The same tool shows pre-test odds and post-test odds so the Fagan-style intermediate step stays visible, and it accepts the likelihood ratio directly or derives it from sensitivity and specificity when the test summary is what you have on hand.
- • Reading a single screening result: plug in the prevalence and the test sensitivity and specificity, then read the post-test probability for a positive or negative screen.
- • Updating a class prior: use a chosen prior probability and a published likelihood ratio to walk through the Bayes-rule update during a statistics lesson.
- • Comparing a strong and a weak test: swap the likelihood ratio in and out to see how a high-LR test and a low-LR test move the pre-test probability at the same prevalence.
- • Working through a homework problem: use the same calculator for a homework set so the intermediate odds, the LR, and the final probability all match the textbook Bayes-rule update.
The result panel lists the post-test probability, the pre-test odds, the post-test odds, the likelihood ratio, and a one-line reading. The same Bayes rule update is taught in epidemiology, evidence-based medicine, and introductory statistics, and it drives the Fagan nomogram used in clinical teaching.
When you want to work the same update from a 2x2 table of true positives, false positives, false negatives, and true negatives, the Bayes Theorem Calculator handles the cell counts and reads the posterior probability from there.
How Post Test Probability Calculator Works
The post test probability calculator converts the pre-test probability into pre-test odds, multiplies by the likelihood ratio for the observed test result, and converts the post-test odds back to a probability. Sensitivity and specificity only matter when the LR source is the test summary, in which case the calculator derives LR+ or LR- first.
- prevalence: Pre-test probability of the condition, expressed as a percentage between 0.01% and 99.99%.
- testDirection: Positive test uses LR+; negative test uses the absolute value of LR-.
- sensitivity: Test sensitivity as a percentage. Used only when the LR source is sensitivity and specificity.
- specificity: Test specificity as a percentage. Used only when the LR source is sensitivity and specificity.
- likelihoodRatio: LR+ for a positive test or absolute value of LR- for a negative test when entered directly.
Pre-test odds sit next to post-test odds, and the likelihood ratio is repeated so the multiplier that drove the update is never hidden.
10% prevalence with a 90% sensitive, 90% specific positive test
prevalence = 10%, sensitivity = 90%, specificity = 90%, testDirection = positive
LR+ = 0.90 / 0.10 = 9. preTestOdds = 0.1111. postTestOdds = 1.0. postTestProbability = 0.50.
post-test probability 50.00%, pre-test odds 0.1111, post-test odds 1.0000, LR+ 9.0000
A positive test on a moderately accurate test moves a 10% prior to 50%, the textbook one-in-two example.
1% prevalence with the same 90/90 test, positive result
prevalence = 1%, sensitivity = 90%, specificity = 90%, testDirection = positive
LR+ = 9. preTestOdds = 0.0101. postTestOdds = 0.0909. postTestProbability = 0.0833.
post-test probability 8.33%, pre-test odds 0.0101, post-test odds 0.0909, LR+ 9.0000
Dropping the pre-test probability from 10% to 1% on the same 90/90 test moves the post-test probability from 50% to about 8%.
According to Wikipedia likelihood ratios in diagnostic testing, the positive likelihood ratio is sensitivity divided by 1 minus specificity, and the negative likelihood ratio is 1 minus sensitivity divided by specificity, with both restricted to non-negative values.
For a different statistics-for-students update that pairs naturally with a Bayes-rule lesson, the T-Test Calculator turns a sample mean and a sample standard deviation into a t-statistic and a p-value.
Key Concepts Explained
Four concepts carry the weight of a post test probability result. Naming them keeps the Bayes rule from being read as a black box.
Pre-test probability
the probability of the condition before the test, usually from population prevalence or an individual clinical prior. It sits at the start of the Bayes-rule update.
Likelihood ratio (LR+ and LR-)
the factor that turns pre-test odds into post-test odds. LR+ answers how much more likely a positive test is in someone with the condition than without; LR- does the same for a negative test.
Pre-test and post-test odds
the odds form of the pre-test and post-test probabilities. Showing the odds keeps the multiplication visible.
Screen, not diagnosis
a single post-test probability is a single test result, not a clinical diagnosis. The result feeds a shared decision, not a stand-alone answer.
A 90/90 test on a 1% prevalence gives a post-test probability of about 8%, a low absolute probability even after a positive screen.
According to Wikipedia pre- and post-test probability, post-test probability is calculated from pre-test probability by converting pre-test probability to pre-test odds, multiplying by the likelihood ratio, and converting post-test odds back to a probability.
When the published sensitivity or specificity comes with a confidence interval, the Confidence Interval Calculator is a useful companion for reading the uncertainty around the point estimate before you trust the LR.
How to Use This Calculator
Six steps cover both the sensitivity-and-specificity workflow and the direct likelihood ratio workflow. The same result panel works for both.
- 1 Set the pre-test probability: enter the population prevalence or the individual prior as a percentage. The default 10% is a useful starting point for a quick worked example.
- 2 Pick the observed test direction: choose positive test (use LR+) or negative test (use LR-). The same Bayes rule works in both directions, but the likelihood ratio is different.
- 3 Choose the LR source: select sensitivity and specificity when the test summary is what you have, or likelihood ratio when the literature already reports an LR+ or LR- for the test.
- 4 Enter sensitivity and specificity or the LR: type the percentage values for sensitivity and specificity, or type the LR+ (positive test) or absolute value of LR- (negative test) on the direct entry path.
- 5 Read the post-test probability and the odds: treat the post-test probability, the pre-test odds, and the post-test odds as a set. The result panel also shows the LR the calculator used so the multiplier is never hidden.
- 6 Frame the result as a screen: use the post-test probability to decide whether to repeat the test, order a different test, or discuss further workup.
A reader working a textbook example enters prevalence = 1%, test direction = positive, sensitivity = 90%, specificity = 90%. The calculator derives LR+ = 9, pre-test odds = 0.0101, post-test odds = 0.0909, post-test probability 8.33%.
When a classroom example also needs a test of independence from a 2x2 table of test results and disease status, the Chi-Square Calculator takes the same cells and returns the chi-square statistic and the p-value.
Benefits of Using This Calculator
The Bayes rule update is the same in every evidence-based-medicine textbook, and a calculator that mirrors the textbook steps is faster than the pen-and-paper alternative.
- • Bayes-rule update in one form: the form follows the textbook sequence: pre-test probability, test direction, LR source, then the result.
- • Sensitivity and specificity support: enter sensitivity and specificity and the calculator derives LR+ or LR- for you, so the LR never has to be hand-computed from a textbook.
- • Direct LR entry: switch the LR source to enter an LR+ or LR- directly when the literature already reports the LR for the test.
- • Odds visible alongside the probability: the result panel shows pre-test odds and post-test odds next to the post-test probability so the multiplication step is never hidden.
- • Positive and negative test support: the same form handles a positive test and a negative test, with the correct likelihood ratio chosen for each.
The odds, the LR, and the probability are all listed in the same place so the result panel stays readable on a phone or printed page.
For another teaching-grade summary statistic that often sits next to a Bayes-rule lesson in a statistics-for-clinicians course, the Standard Deviation Calculator reads the standard deviation from a small list of numbers.
Factors That Affect Your Results
Four factors drive the post-test probability. The same calculator shows the pre-test odds, the LR, and the post-test odds, so a sensitivity analysis is a matter of changing the inputs.
Pre-test probability (prevalence)
the pre-test probability drives the size of the pre-test odds and is the largest mover of the post-test probability on most tests. A 1% and a 10% prevalence give very different post-test probabilities on the same 90/90 test.
Likelihood ratio of the test
the likelihood ratio is the multiplier. LR+ above 10 typically rules in, LR- below 0.1 rules out, and an LR near 1 leaves the post-test probability close to the pre-test probability.
Test direction (positive or negative)
a positive test uses LR+ and a negative test uses LR-, so the same test can move the probability up or down depending on the result.
Sensitivity and specificity
sensitivity and specificity only matter when the LR source is sensitivity and specificity. A slightly better specificity moves LR+ more than a slightly better sensitivity.
- • The post test probability calculator is a teaching tool, not a clinical decision support system. A clinician or pharmacist comparing the result with the patient history and biomarkers is the usual next step.
- • Sensitivity and specificity are often reported with a confidence interval, and a borderline value can move LR+ or LR- across a clinical threshold. Treat the result as a screen, not a single answer.
- • A population prevalence used as an individual prior can underestimate or overestimate the post-test probability for a particular patient.
A flat LR near 1 leaves the odds close to their pre-test value, while a strong LR (10 or 0.1) moves the odds by a factor of 10.
According to CDC public health site, screening test results are read as a post-test probability, and a positive screen is a starting point for a clinical evaluation rather than a stand-alone diagnosis.
For a single test with a known sensitivity and a fixed number of trials, the Binomial Distribution Calculator shows the binomial probability of observing that many positives, which is a useful sanity check on the LR-based update.
Frequently Asked Questions
Q: What is post test probability?
A: Post test probability is the probability that a condition is present after a single test result, returned from the pre-test probability and the test likelihood ratio using the Bayes rule update.
Q: How do you calculate post test probability?
A: Convert the pre-test probability to pre-test odds, multiply by the likelihood ratio for the observed test result, and convert the post-test odds back to a probability.
Q: What is the difference between pre test probability and pre test odds?
A: Pre-test probability is the chance the condition is present before the test, usually from population prevalence. Pre-test odds are the probability divided by one minus the probability, the form that multiplies cleanly with the LR.
Q: How do you calculate post test odds?
A: Post test odds equal pre-test odds multiplied by the likelihood ratio for the observed test result. The calculator shows the pre-test odds, the LR, and the post-test odds in the result panel.
Q: When should I use the positive or negative likelihood ratio?
A: Use the positive likelihood ratio LR+ when the test came back positive, and the absolute value of the negative likelihood ratio LR- when the test came back negative.
Q: Can a negative test result give a high post test probability?
A: Yes, when the pre-test probability is already high or the negative likelihood ratio is not very small. A 50% pre-test probability on a 90/90 test gives a post-test probability of about 10% after a negative test.