Bayesian Probability Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Why update probability with Bayesian evidence?

Bayesian probability updating gives a disciplined way to revise a hypothesis after observing evidence. Rather than treating an initial probability as final, Bayes’ theorem combines that starting belief with how expected the evidence would be if the hypothesis were true or false. This distinction matters in questions involving spam filters, A/B tests, fraud alerts, diagnostic tests, quality checks, and risk assessment.

This Bayesian probability calculator uses the binary form of Bayes’ theorem: the hypothesis is either true (H) or false (¬H), and the evidence E is observed. Enter the prior probability of H, the chance of E when H is true, and the chance of E when H is false. The result is the posterior probability that H is true after E has been observed.

Bayesian probability inputs in plain language

Each percentage in this Bayes’ theorem calculation describes a different conditional probability, so the direction of the condition matters.

Tip: In a Bayesian test calculation, specificity is not the value for “Likelihood if False.” Convert specificity to a false-positive rate first: false positive rate = 100% − specificity.

Bayes’ theorem formula for posterior probability

This calculator obtains the posterior probability of H after evidence E with the following version of Bayes’ theorem:

P(H|E) = P(E|H) P(H) P(E|H) P(H) + P(E|¬H) P(¬H)

Here, P(¬H) = 1 − P(H). The denominator weights the two possible states of the hypothesis and keeps the Bayesian posterior between 0 and 1. It is also the overall probability of observing the evidence:

P(E) = P(E|H)P(H) + P(E|¬H)P(¬H)

Interpreting a Bayesian posterior probability

The calculator’s output, P(H|E), answers: “Given that E occurred, how likely is H?” Compare it with the prior. A posterior above the prior means this particular evidence favors H; a posterior below the prior means the evidence weighs against H.

When reading a Bayesian posterior, avoid these two common mistakes:

Worked example: Bayesian posterior for a medical test

Consider a condition affecting 1% of a population. A test is positive 95% of the time when the condition is present and is also positive 10% of the time when the condition is absent.

For a positive result, the Bayesian posterior is:

P(H|E) = (0.95×0.01) / (0.95×0.01 + 0.10×0.99) ≈ 0.0876

Thus the probability that a person with a positive result has the condition is about 8.8%. Although the test is sensitive, the low prior and the 10% false-positive rate mean that positive results also arise among many people without the condition.

Bayesian posterior comparison table

These Bayes’ theorem scenarios show how changing the prior or either likelihood changes the posterior after the same type of evidence.

Scenario Prior P(H) P(E|H) P(E|¬H) Posterior P(H|E) What changed?
Baseline medical-test example 1% 95% 10% ≈ 8.8% Rare condition limits posterior
Higher prior probability 10% 95% 10% ≈ 51.3% Greater initial plausibility raises posterior
Lower false-positive rate 1% 95% 1% ≈ 49.0% Higher specificity makes a positive result more informative
Less discriminating evidence 1% 60% 10% ≈ 5.7% Evidence provides less support for H

Bayesian probability assumptions and limitations

This Bayesian posterior calculation is intentionally limited to one binary hypothesis and one observed item of evidence.

Bayesian probability reference note

Bayes’ theorem is the probability identity that links the posterior P(H|E) to the likelihood P(E|H), the false-hypothesis likelihood P(E|¬H), and the prior P(H). In diagnostic testing, sensitivity and specificity provide familiar names for the likelihood quantities used in this calculator. Before entering values, make sure all three percentages refer to the same population, time period, evidence definition, and decision threshold; otherwise the resulting posterior can be mathematically correct yet poorly matched to the question being asked.

Fill in the probabilities to see the updated chance.

Bayesian Signal Sweep Mini-Game

Move the decision lens to catch evidence cards whose likelihood ratio supports H and avoid cards that favor ¬H. Each caught card updates the game’s posterior as the uncertainty conditions change.

Start the Bayesian Signal Sweep

Catch evidence that supports H, avoid evidence that favors ¬H, and watch the posterior move.

Best score: 0

Posterior50.0%
Score0
Best0
Combox1
Time Left80s

Tip: a card with higher P(E|H) than P(E|¬H) supports H. Catch those cards to raise the game posterior.