Bayes’ Theorem Calculator

Bayes’ theorem updates a probability in light of new evidence. The classic example: if a disease affects 1% of people and a test is 95% sensitive with a 5% false-positive rate, what is the chance that someone who tests positive actually has the disease? The calculator gives the answer and a table of “out of 10,000 people” counts that makes it intuitive.

P(A | B) = P(B | A) P(A) ÷ [ P(B | A) P(A) + P(B | not A) P(not A) ]

The answer for the example is only about 16%. When a condition is rare, false positives from the large healthy group outnumber the true positives. This is why screening tests are followed by confirmatory tests.