euler
Euler Learn

Bayes’ theorem: an intuitive explanation

How new evidence updates a probability without confusing P(A|B) with P(B|A).

Bayes updates the probability of a hypothesis AA after evidence BB: P(A∣B)=P(B∣A)P(A)P(B).P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}.

The three parts

P(A)P(A) is the prior probability; P(B∣A)P(B\mid A) measures how compatible the evidence is with the hypothesis; P(B)P(B) normalizes across every way the evidence can occur.

An example with 1,000 people

Suppose 10 people have a condition. A test identifies 9 of them but is also positive for 99 healthy people. Among 108 positive tests, only 9 are true cases, so the updated probability is 9/108≈8.3%9/108\approx8.3\%, not 90%90\%.

The common mistake

P(B∣A)P(B\mid A) and P(A∣B)P(A\mid B) are not interchangeable. Test sensitivity among people with a condition is not the probability of the condition after a positive result.

Frequently asked questions

Why does the prior matter so much?

For a rare event, false positives can outnumber true positives even when a test is fairly accurate.

Is Bayes only for medical tests?

No. It is used in statistics, diagnosis, machine learning, and any setting where evidence updates an initial belief.