Glossary Math & Statistics

Bayes' Theorem

Bayes' theorem is the rule for updating the probability of a hypothesis after seeing new evidence: P(A|B) = P(B|A) × P(A) / P(B).

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

It links two conditional probabilities. The prior P(A) is what you believed before the evidence; the likelihood P(B|A) is how probable the evidence is if A is true; the posterior P(A|B) is the updated belief. P(B) is the overall chance of the evidence, found by adding the cases where A is true and where it is false. Equivalently, posterior odds equal prior odds times the likelihood ratio.

Why it matters

It explains why a positive result from an accurate test for a rare condition is often a false alarm, a mistake called the base-rate fallacy, and it underlies spam filters and many machine-learning methods. Try your own numbers in the Bayes’ Theorem Calculator.

Example

With a 1 % prevalence, 90 % sensitivity and 91 % specificity, the probability of having the condition after a positive test is 90 / (90 + 891) = 9.17 %.

AdSense Placeholder
Slot: footer_leaderboard