Appearance
7.3 — Bayes' Theorem
A disease affects 1 in 1,000 people. A test for it is 99% accurate — it correctly identifies 99% of sick people and correctly clears 99% of healthy people.
You test positive. What is the chance you have the disease?
Most people, including a majority of doctors in repeated studies, say around 99%. The answer is about 9%.
That gap — between 99% and 9% — is why this chapter exists. It is one of the few pieces of mathematics that will change decisions you personally make.
1. Working out the answer
Forget formulas for a moment and imagine 100,000 people.
Who is sick? 1 in 1,000, so 100 people are sick and 99,900 are healthy.
Test the 100 sick people. The test is 99% accurate, so 99 test positive and 1 is missed.
Test the 99,900 healthy people. 99% are correctly cleared, so 1% are not: 999 test positive despite being healthy.
Total positives: 99 + 999 = 1{,}098. Of those, only 99 are genuinely sick.
P(\text{sick}\mid\text{positive}) = \frac{99}{1098} = 0.090 = 9\%
The whole effect is that healthy people vastly outnumber sick people. Even a small error rate applied to a huge healthy group produces more false positives than the accurate test produces true positives. The test is not bad; the disease is rare, and rarity is doing the work.
This natural-frequency presentation is not a teaching gimmick. Gerd Gigerenzer's research found that doctors who get the numbers wrong when stated as percentages usually get them right when stated as counts of people. If you take one practical habit from this chapter, take this one: turn probabilities into counts of people before reasoning about them.
2. The theorem
P(A\mid B) = \frac{P(B\mid A)\,P(A)}{P(B)}
It comes straight from Chapter 7.2. The multiplication rule says P(A\cap B) can be written two ways:
P(A\mid B)P(B) = P(B\mid A)P(A)
Divide by P(B) and you have Bayes' theorem. The proof is one line. All the difficulty is in what it means, not in deriving it.
The pieces have names, and knowing them helps:
- P(A) is the prior — what you believed before the evidence.
- P(B\mid A) is the likelihood — how probable the evidence is if A is true.
- P(A\mid B) is the posterior — your updated belief.
- P(B) is the total probability of the evidence, computed by the law of total probability from Chapter 7.2.
Read the whole thing as a sentence: new belief equals old belief, adjusted by how well the evidence fits.
Applied to the disease:
P(D\mid+) = \frac{0.99\times0.001}{0.99\times0.001 + 0.01\times0.999} = \frac{0.00099}{0.01098} = 0.090
Same 9%.

3. The base rate is the thing people ignore
The mistake in Section 1 is called base rate neglect: focusing on how accurate the test is and forgetting how rare the condition is.
The prior matters as much as the evidence. Change the disease's prevalence and the same test gives wildly different answers:
| Prevalence | P(\text{sick} \mid \text{positive}) |
|---|---|
| 1 in 1,000 | 9% |
| 1 in 100 | 50% |
| 1 in 10 | 92% |
Same test, same 99% accuracy, answers from 9% to 92%.
This is exactly why screening policy works the way it does. Mass screening of a low-risk population generates mostly false positives, causing anxiety, further invasive tests and real harm. Testing people who already have symptoms or risk factors means a much higher prior, so a positive result is far more informative. When a screening programme is narrowed to a particular age band, this arithmetic is usually the reason.
And it is why a second, independent test helps so much. After the first positive your probability is 9% — that is now your prior. A second positive test updates from 9%, not from 0.1%:
P = \frac{0.99\times0.09}{0.99\times0.09+0.01\times0.91} = \frac{0.0891}{0.0982} = 91\%
Two positives take you from 9% to 91%. Sequential updating is Bayes' theorem's most characteristic move, and it is why confirmatory testing is standard practice.
4. Bayes in a courtroom
The prosecutor's fallacy is confusing P(\text{evidence}\mid\text{innocent}) with P(\text{innocent}\mid\text{evidence}). They are different quantities and Bayes' theorem relates them.
A DNA match with a one-in-a-million random-match probability sounds conclusive. But in a city of 10 million, about 10 people would match by chance. If the defendant was identified by a database search with no other evidence, the probability of guilt is roughly 1 in 10, not 999,999 in a million.
If instead the defendant was already a suspect for independent reasons — the prior is high — the same DNA evidence is genuinely damning. Identical evidence, completely different conclusions, depending entirely on the prior. That is not lawyer's sophistry; it is the theorem.
The Sally Clark case in Chapter 7.2 was this fallacy compounded with a false independence assumption.
5. Bayesian reasoning as a way of thinking
Beyond calculation, Bayes offers a discipline for holding beliefs:
Start with a prior, based on what you already know. Gather evidence.Update in proportion to how much the evidence discriminates between hypotheses. Never reach certainty, only stronger or weaker belief.
Two habits follow, and they are worth having.
Extraordinary claims require extraordinary evidence. A very low prior needs a very strong likelihood ratio to be overturned. This is Bayes' theorem, not rhetoric.
Evidence that fits every hypothesis is worthless. If P(B\mid A) = P(B\mid \text{not }A), the posterior equals the prior and nothing was learned. A horoscope that describes everyone describes no one.
A running example. You email a colleague and get no reply for two days. Hypotheses: they are ignoring you, or they are busy. The evidence (silence) fits both, so it barely updates anything. What would discriminate is seeing them reply promptly to someone else — that is much more likely under "ignoring you" than under "busy", and it moves the posterior.
Bayesian versus frequentist, in one paragraph
There are two philosophies of what a probability is.
A frequentist says probability is the long-run frequency of an outcome in repeated trials. The parameter you are estimating has one true fixed value; your data are random. This gives confidence intervals and p-values (Chapter 7.8).
A Bayesian says probability is a degree of belief. The parameter is uncertain and gets a probability distribution; the data are what they are. This gives posterior distributions and credible intervals.
The practical difference: a Bayesian may say "there is a 95% probability the true value lies in this interval", which is what everyone wants to say. A frequentist confidence interval does not license that sentence, and Chapter 7.7 explains what it does mean.
The frequentist approach dominated the twentieth century, partly for philosophical reasons and largely because Bayesian computation was infeasible before cheap computers. Modern practice uses both, chosen by the problem.
6. Where Bayes is doing work right now
Spam filters. The classic Bayesian application. Each word carries a likelihood ratio — how much more often it appears in spam than in legitimate mail — and the filter multiplies them together, starting from a prior. It is called naive Bayes because it assumes the words are independent, which is plainly false and works remarkably well anyway.
Medical diagnosis. Every test result is an update, and the prior is the patient's history and symptoms. This is what clinical judgement formally is.
Search and rescue. The US Coast Guard's SAROPS system maintains a probability map of where a missing vessel might be, updates it as areas are searched without success, and directs the next search to the highest-probability cell. The USS Scorpion submarine was found in 1968 by this method after conventional searching failed.
Language models. Predicting the next token given the previous ones is a conditional probability, and the whole architecture is a machine for estimating it. Volume I, 12.5.
A/B testing. Bayesian methods let you update continuously as data arrives, rather than waiting for a fixed sample size, and they answer "what is the probability B is better than A" directly.
Robot localisation. A robot or self-driving car maintains a probability distribution over where it might be and updates it with every sensor reading. The algorithm is called a Bayes filter, and the Kalman filter used in every aircraft, spacecraft and phone GPS is the version for continuous variables.
7. Where this shows up in your life
Every medical test you ever take. Ask for the base rate before interpreting the result — and know that a positive on a rare-condition screen is usually a false positive.
Every news story about risk. "Doubles your risk" of something that affects 1 in 100,000 people means 2 in 100,000. The base rate is what makes a relative risk meaningful or trivial.
Every spam email that does not reach you.
Every argument you have about evidence. The habit of asking "how likely is this evidence if I am wrong?" is the single most useful thing in this chapter.
Every self-driving car and every drone that knows where it is.
We can now compute probabilities of events. To do anything quantitative, we need probabilities attached to numbers — how many, how long, how much — and that means random variables.