Bayes' theorem — updating beliefs with evidence
▸ Pretest — guess, even if you don't know
A disease affects 1% of a population. A test catches 99% of true cases, but also gives a false positive on 5% of healthy people. You test positive. Roughly what's the probability you have the disease?
Two lines of algebra
You already own everything needed to derive Bayes' theorem. From A1-05, the joint probability factors two ways:
Divide by :
That's it. Bayes' theorem is the exchange rate between the two conditionals from A1-05's inversion trap — and , the base rate (or prior), is what you pay at the exchange.
In practice is expanded over the ways can happen:
The denominator says: evidence can come from the world where is true, or from the world where it isn't. The posterior is just the share of -occurrences that come from the -world.
The diagnostic example, in counts
Formulas hide intuition; counts reveal it. Take 10,000 people, disease base rate 1%, sensitivity 99%, false-positive rate 5%:
| Test positive | Test negative | Total | |
|---|---|---|---|
| Diseased | 99 | 1 | 100 |
| Healthy | 495 | 9,405 | 9,900 |
The false positives (495) swamp the true positives (99) — not because the test is bad, but because healthy people outnumber diseased ones 99 to 1. When the condition you're testing for is rare, even a good test yields mostly false alarms.
Your backtest passed. So what?
Now the version of this problem you will live inside for the rest of this curriculum. Replace "disease" with "strategy has a real edge" and "positive test" with "backtest looks good":
- Prior: most strategy ideas have no edge. Be generous and say 5% of the ideas you'll ever test are genuinely good.
- Power: a good backtest protocol catches a real edge, say, 60% of the time (real edges are small and noisy — more in A2-04).
- False pass rate: a no-edge strategy passes anyway 5% of the time (the classic significance threshold — A2-05).
A passing backtest, under honest and even somewhat optimistic assumptions, means roughly a 39% chance the strategy is actually good. Less than a coin flip. The pass moved you from 5% to 39% — genuinely valuable evidence — but treating it as a verdict ("it works!") is the diagnostic fallacy with money attached.
And it gets worse: if you tested 100 variations and kept the best-looking one, your effective false-pass rate is far above 5%, and the posterior collapses toward the prior. That is the multiple-testing problem, which A2-05 treats in full — Bayes is why it's lethal.
Beliefs are distributions, not verdicts
The deeper shift Bayes asks of you: stop treating claims as true/false flags waiting to be set, and start treating them as probabilities that move as evidence arrives. Before the backtest: 5%. After one clean pass: 39%. After a year of live trading in line with the backtest: higher still. After a live year that looks nothing like the backtest: back down.
Nothing is ever "proven" — you just accumulate evidence and update. Full Bayesian statistics (priors and posteriors over parameters, not just events — McElreath's Statistical Rethinking is the classic on-ramp) builds an entire inference framework on this one theorem. For now, the discipline to internalize is: always ask what the base rate is before celebrating a positive signal.
⧉ Review cardState Bayes' theorem.
⧉ Review cardDisease base rate 1%, test sensitivity 99%, false-positive rate 5%. Why is P(disease given positive) only about 17%?
⧉ Review cardYour backtest passed. Why is the probability the strategy is genuinely good still low?
⧉ Review cardWhat is the Bayesian stance toward beliefs about strategies?
Predict before the next lesson
Next lesson: the Law of Large Numbers and the Central Limit Theorem — the machinery behind "more data reveals the truth." Predict:
- You flip a fair coin 1,000 times. Roughly what range of head-counts would surprise you?
- A casino's edge on one roulette spin is about 5%, yet a single gambler can walk away a winner. Why is the casino nonetheless certain to profit over a million spins?
- Yesterday's Bayes posterior of 39% was based on one backtest. What kind of additional evidence would push it above 90% — and how much of it do you guess you'd need?
Note your answers. We check them against the math next.
◈ Calibration check
Could you set up and compute a Bayes update from a base rate, a hit rate, and a false-alarm rate?
1 = guessing · 5 = could teach it
⏻ End of lesson
Mark it read to book its 4 review cards into your deck.
Sources & further reading
- bookWasserman (2004), All of Statistics — §1, 2
- bookKahneman (2011), Thinking, Fast and Slow — §16
- bookMcElreath (2020), Statistical Rethinking, 2e — §1, 2