Bayes' Theorem Calculator
Update a probability with new evidence using Bayes' theorem, for example the chance a positive test is right.
About the Bayes' Theorem Calculator
Bayes' theorem combines how likely something was beforehand (the prior) with how well the evidence separates true from false cases. It explains why a 95%-accurate test for a rare condition still gives mostly false positives: when only 1% have it, false positives from the 99% outnumber true positives.
The formula
P(A|B) = P(B|A) P(A) ÷ [P(B|A) P(A) + P(B|¬A) P(¬A)]
Worked example
Prior 1%, sensitivity 95%, false-positive rate 5%
- P(A|B) = 0.95 × 0.01 ÷ (0.95 × 0.01 + 0.05 × 0.99) = 16.1%
Questions people ask
Why is the answer so low?
Because the condition is rare, most positives come from the large healthy group.
What's specificity?
The true negative rate; false positive rate = 100% − specificity.