Written by Dackohn; last reviewed November 2026.
Bayes’ theorem updates a probability when new evidence arrives: P(A | B) = P(B | A) × P(A) / P(B). The result depends heavily on how common A was to begin with. For a condition affecting 1% of people, a positive result from a test with 90% sensitivity and 95% specificity means only a 15.4% chance of having it.
The example, by counting
A condition affects 1% of people. A test detects 90% of true cases (sensitivity) and correctly clears 95% of healthy people (specificity). You test positive. What is the chance you have the condition? Picture 10,000 people:
| Test positive | Test negative | Total | |
|---|---|---|---|
| Has the condition | 90 | 10 | 100 |
| Healthy | 495 | 9,405 | 9,900 |
Of the 585 positive results, only 90 are real: 90 / 585 = 15.4%. Most positives are false alarms, because 5% of a very large healthy group outnumbers 90% of a small sick group.
The same thing with the formula
P(positive) = 0.01 × 0.90 + 0.99 × 0.05 = 0.0585. Then P(condition | positive) = (0.90 × 0.01) / 0.0585 = 0.154. The formula does in one line what the table does by counting. Many people find the table easier to get right.
The base rate fallacy
Most people guess close to 90%, because they confuse two different questions:
- P(positive | condition) = 90%: how often the test finds the condition.
- P(condition | positive) = 15.4%: what you want to know.
Ignoring how rare the condition is, the base rate, is called the base rate fallacy. If the condition affected 10% of the people tested, the same positive result would mean 66.7%. This is why screening a whole population gives different results from testing people who already have symptoms.
Updating with more evidence
Today’s result becomes tomorrow’s starting point. After one positive, your probability is 15.4%. Use this as the base rate for a second, independent test, and a second positive raises it to 76.6%. Each piece of evidence updates the previous belief. This is the core of Bayesian statistics, and the bandit algorithm in our Beat the Algorithm game learns the same way.
Why it matters for p-values
A p-value is like P(data | no effect), not P(no effect | data). Confusing them is the same mistake as confusing sensitivity with the chance of disease. A significant result for an unlikely hypothesis can still probably be a false positive. See how to interpret a p-value.
Try it yourself
Bayes’ Theorem Calculator →Enter a base rate, sensitivity and specificity and see the counts. Probability Calculator →Combine events: AND, OR and conditional probability.Frequently asked questions
What is Bayes' theorem in simple terms?
It is a rule for updating a probability with new evidence. The answer depends on how likely the evidence is if the idea is true, how likely it is otherwise, and how likely the idea was to begin with.
What is the base rate fallacy?
Ignoring how common something is when judging evidence, for example assuming a positive test means disease without considering how rare the disease is.
What is a prior in Bayesian statistics?
The probability you assign before seeing the new evidence. After the evidence, the updated value is called the posterior.
Related reading: How to interpret a p-value · Type I and Type II errors · Simpson’s paradox
Sources & further reading: NIST/SEMATECH e-Handbook of Statistical Methods · OpenStax Introductory Statistics. How we compute & validate: methodology. Written & reviewed by Dackohn; last reviewed August 2026.