Kolton Ndoj

Bayes' theorem

Evidence only shifts your belief in proportion to how rare the thing was to begin with.

P(A∣B)=P(B∣A) P(A)P(B)P(A\mid B)=\frac{P(B\mid A)\,P(A)}{P(B)}

What the symbols mean

P(A)P(A)
how likely A was before the evidence
P(B∣A)P(B\mid A)
how likely the evidence is if A is true
P(A∣B)P(A\mid B)
how likely A is now that you saw B

Why it works — the picture

Suppose 1 percent of people have a disease and a test catches 99 percent of them but also wrongly flags 5 percent of healthy people. Test 1000 people: 10 are sick and about 10 test positive; 990 are healthy and about 50 test positive. Of the 60 positives, only 10 are actually sick: about 17 percent. A positive test feels like 99 percent, but the rare disease is outweighed by many false alarms. Count people, not percentages.

Graph for Bayes' theorem 0110
Chance you are really sick after a positive test, against how common the disease is (t). At t = 0.01 it is only about 17 percent. Try lowering the false-alarm rate. (drawn with the default slider values — move the sliders live)

Try it yourself

Where it’s used in real life

Medical testing, spam filtering, and how robots update beliefs from noisy sensors.

The story behind it

Thomas Bayes's essay on it was published after his death, in 1763.

Related

Play with it live →

Math · Probability · Stretch