Bayes Theorem Calculator
Calculate posterior and evidence probabilities from a prior and two conditional likelihoods.
About Bayes theorem
Bayes theorem examples
| Prior; likelihood; alternative likelihood | Posterior | Interpretation |
|---|---|---|
| 1%; 99%; 5% | 16.6667% | Rare-condition medical screening |
| 50%; 80%; 20% | 80.0000% | Evidence strongly favors A from equal prior odds |
| 20%; 60%; 10% | 60.0000% | Evidence triples the prior probability |
How to use Bayes theorem
- Estimate the prior probability that hypothesis A is true before observing B.
- Enter the probability of observing B when A is true.
- Enter the probability of observing B when A is false.
- Select Calculate Posterior and interpret the updated probability together with the evidence probability.
Frequently asked questions
What is a prior probability?
A prior is the probability assigned to a hypothesis before considering the current evidence. It may come from prevalence, historical data, or a defensible initial model.
What is posterior probability?
The posterior is the updated probability of the hypothesis after accounting for the observed evidence. It can become the prior for a later update when new evidence arrives.
Is likelihood the same as posterior probability?
No, likelihood describes evidence assuming the hypothesis, while posterior probability describes the hypothesis given evidence. Reversing these conditional probabilities is a common error.
Why include P(B|not A)?
The evidence may also occur when A is false, and that alternative route contributes to the denominator. Ignoring it usually exaggerates how strongly B supports A.
Can Bayes theorem handle more than two hypotheses?
Yes, the evidence denominator can sum likelihood times prior across all mutually exclusive hypotheses. This calculator focuses on the common binary case of A versus not A.