Bayes' Theorem Calculator

Update a probability with new evidence.

P(A | B) 0.1538
P(A | B) (%) 15.385

Formula: P(A|B) = P(B|A)P(A) ÷ [P(B|A)P(A) + P(B|¬A)P(¬A)]

Step-by-step with your numbers:
1. Values used:
2. P(A) prior = 0.01
3. P(B | A) true positive = 0.9
4. P(B | not A) false positive = 0.05
5.
6. P(A | B) = 0.1538
7. P(A | B) = 15.385%
Did we solve your problem today?

Bayes' theorem revises a prior probability after seeing evidence — key for medical tests.

How the Math Works

Bayes' Theorem mathematically updates the probability of a hypothesis (A) when new evidence (B) emerges. The formula P(A|B) = P(B|A)P(A) ÷ [P(B|A)P(A) + P(B|¬A)P(¬A)] calculates the posterior probability by multiplying the likelihood of the evidence given the hypothesis (P(B|A)) with the prior probability of the hypothesis (P(A)), then normalizing by the total probability of the evidence. This ensures probabilities remain valid (between 0 and 1) while incorporating new data into existing beliefs.

Practical Applications

This calculation is essential in fields like medical diagnostics, where a doctor combines test accuracy (likelihood) with disease prevalence (prior) to refine a patient's infection probability. It's also used in spam filters, where email characteristics (evidence) update the likelihood of an email being spam based on historical data. Financial analysts similarly apply it to adjust investment risk assessments as market conditions change, turning raw data into actionable insights through probabilistic reasoning.

Day-to-Day Use

In daily life, Bayes' Theorem helps you mentally reassess risks and decisions as new information arrives. For example, if a weather forecast predicts rain (evidence), you might adjust your umbrella-carrying habits (prior belief) based on the forecast's reliability (likelihood). It also aids in evaluating product reviews—updating your confidence in a purchase by weighing new customer feedback (evidence) against existing ratings (prior belief)—ultimately leading to more informed choices and reduced uncertainty in routine decisions.

Worked example

1% prior, 90% sensitivity, 5% false positive → ~15.4%.

FAQ

Surprising result?

With a rare condition, even an accurate test gives many false positives.