Bayesian Inference Calculator
Apply Bayes' theorem to a binary hypothesis using a prior probability, sensitivity, and false-positive rate; view the evidence probability, posterior probability, and change from the prior.
This Bayesian Inference Calculator applies Bayes' theorem to a binary hypothesis H. Enter the prior probability P(H), evidence sensitivity P(E|H), and false-positive rate P(E|not H). The results are the evidence probability P(E), posterior probability P(H|E), and the change from prior to posterior.
- Enter the prior probability of the hypothesis as a percentage from 0 to 100.
- Enter the sensitivity, P(E|H), as a percentage from 0 to 100.
- Enter the false-positive rate, P(E|not H), as a percentage from 0 to 100.
- Read P(E), P(H|E), and the percentage-point change from the prior.
Binary-hypothesis Bayes formula
Evidence probability: P(E) = P(E|H)P(H) + P(E|not H)P(not H).
Posterior probability: P(H|E) = P(E|H)P(H) / P(E).
The posterior change is P(H|E) − P(H), expressed in percentage points.
Interpreting Bayesian results
The evidence rate sets the denominator
P(E) combines evidence from cases where H is true and where it is false. The posterior updates the prior using the supplied sensitivity and false-positive rate. For a prior of 1%, sensitivity of 90%, and false-positive rate of 5%, P(E) is 5.85% and P(H|E) is approximately 15.3846%.
Statistics tips and best practices
- Use percentages that describe the same evidence definition and population.
- Do not confuse the false-positive rate P(E|not H) with specificity; specificity is its complement.
- A zero evidence probability cannot produce a defined posterior from this calculation.
- With prior 50%, sensitivity 80%, and false-positive rate 20%, the posterior is 80%.
- A low prior can keep the posterior modest even when sensitivity is high if false positives are common.
Common mistakes to avoid
- Entering specificity where the false-positive rate is requested.
- Using sensitivity or false-positive rates from a different population or evidence definition.
- Interpreting the posterior as certainty rather than a result conditional on the inputs.
This is a mathematical update for user-supplied probabilities, not a diagnosis or validation of a test. Verify consequential evidence and assumptions with qualified professionals.