Axioms, conditioning & Bayes
Three axioms generate all of probability theory. This chapter states them, derives their immediate consequences — complements, monotonicity, the union bound, continuity — and then builds the machinery of conditioning: the chain rule, the law of total probability, and Bayes’ theorem. Along the way it dissects Monty Hall properly, quantifies the base-rate fallacy with real numbers, and names the fallacies that cost traders money.
The axioms are bookkeeping: they guarantee probabilities behave like consistent proportions of belief, so you can compute without contradiction. The action is in conditioning. Every practical question — what is the chance of an edge given this backtest, of a fill given this book, of a crash given this vol regime — is a conditional probability. Problems in this area are rarely hard mathematically; they are hard because it is easy to condition on the wrong event, or to silently swap for . The cure is mechanical: write the sample space, write what you learned, cut down, renormalise.
Sample spaces, events, and σ-algebras#
A probability model has three parts. The sample space lists every possible outcome of the experiment — for two coin flips, . An event is a subset of — “at least one head” is . The collection of events we assign probabilities to must be a σ-algebra: it contains , is closed under complement, and is closed under countable unions.
For finite spaces you can take all subsets and forget the issue. The concept earns its keep in continuous settings, where not every subset of can consistently be assigned a probability, and in stochastic processes, where a filtration — a growing family of σ-algebras — formalises “the information available by time ”. That idea carries the whole of martingales & optional stopping; here we only need the vocabulary.
The Kolmogorov axioms and their consequences#
A probability measure on satisfies exactly three axioms:
- Non-negativity: for every event .
- Normalisation: .
- Countable additivity: for pairwise disjoint events , .
Everything else is a theorem. The ones used daily:
Complement. and are disjoint with union , so additivity and normalisation give . ■
Monotonicity. If , write , disjoint. Then by non-negativity. ■
Union bound (Boole’s inequality). Disjointify: let and . The are pairwise disjoint, have the same union as the , and each . Then
Crude but unconditional — it needs no independence, which is why it powers the Bonferroni correction in multiple testing: the chance that any of 20 null strategies clears is at most , however correlated the strategies are.
If events increase, , then . Sketch: write the union as the disjoint union of rings ; countable additivity turns into a telescoping series whose partial sums are exactly . The decreasing case follows by complements. ■This is the axiom-level fact behind statements like “a random walk hits every level eventually with probability 1” — you approximate the infinite-horizon event by finite-horizon ones and pass to the limit.
A die is loaded so that and the other five faces are equally likely: each gets . Then by additivity, and by the complement rule. Mechanical — and that is the point: the axioms make every downstream computation an exercise in decomposition.
Conditional probability and the chain rule#
Learning that occurred shrinks the sample space to and renormalises:
For fixed , the map is itself a probability measure — it satisfies all three axioms — so every theorem above applies verbatim after conditioning. Rearranging the definition and iterating gives the chain rule:
Draw two cards without replacement. . The chain rule is the formal version of “multiply along the tree,” and it is how the without-replacement dependence of the counting chapter gets priced in draw by draw.
The law of total probability#
Let partition — disjoint, with union , each with positive probability. Then for any event :
The sets are pairwise disjoint (the are) and their union is . Countable additivity gives , and the definition of conditional probability rewrites each term as . ■ In words: average the conditional probabilities, weighted by how likely each condition is. It is the probability-level version of the tower rule for expectations proved in joint distributions.
A breakout strategy wins 55% of trades in trending regimes and 35% in choppy ones; the market trends 40% of the time. Unconditional win rate: . Note what the law quietly enforces: the blended rate must lie between the conditional rates, weighted toward the more common regime. If your backtest shows 55% overall, you have implicitly assumed the market always trends — see regime detection for the applied version.
Bayes’ theorem#
Conditioning is asymmetric — in general — and Bayes’ theorem is the exact exchange rate between the two directions:
Write the definition of conditional probability in both directions for the same joint event: . Divide by , then expand the denominator with the law of total probability over the partition . ■
The odds form is the version to compute with under pressure. For hypothesis and evidence :
Multiply your prior odds by the likelihood ratio; done. Evidence with likelihood ratio 10 turns 1:99 odds into 10:99 — still an underdog. Sequential evidence just multiplies more ratios on, which is the engine of Bayesian inference and of the belief-updating chart below.

The base-rate fallacy, with numbers#
The classic: a disease affects 1% of the population. A test detects it 99% of the time when present (sensitivity) and gives a false positive 5% of the time when absent. You test positive. The tempting answer — “99% likely sick” — confuses with . Bayes with a population of 10,000:
Of 10,000 people, 100 are sick and ~99 test positive; of the 9,900 healthy, ~495 also test positive. A positive result is five times more likely to come from the huge healthy pool than from the tiny sick one. The posterior is 16.7%, not 99% — the base rate dominates the test.

Replace “sick” with “strategy has a real edge” and “positive test” with “great backtest.” True edges are rare (a low base rate), and flukes pass backtests at a non-trivial false-positive rate — so most impressive backtests are false positives, exactly as most positive tests above were healthy people. The arithmetic is worked as Problem 5 below, and the cure — demanding stronger evidence via permutation tests, walk-forward, out-of-sample —is the entire agenda of why backtests lie and the gauntlet. Bayes is not a topic in quant research; it is quant research.
Independence and conditional independence#
Events and are independent when — equivalently : learning moves nothing. They are conditionally independent given when . Neither notion implies the other, and both directions of failure matter:
- Dependent, but conditionally independent. Pick a coin at random — one fair, one two-headed — and flip it twice. The flips are dependent (a first head raises the chance the coin is two-headed, hence the chance of a second head: ), yet given the cointhey are independent. Shared hidden causes create dependence — the reason “uncorrelated” strategies all drawing on the same regime crash together.
- Independent, but conditionally dependent. Flip two fair coins; let be “at least one tail.” Unconditionally the flips are independent, but given , while . Conditioning on a common effectinduces dependence — Berkson’s paradox, formalised in multiple testing & paradoxes: select funds on (skill or luck) and, within the selected, skill and luck turn negatively related.
Monty Hall, in full#
Three doors: one car, two goats. You pick door 1. The host — who knows where the car is and always opens a goat door you did not pick — opens door 3. Switch to door 2 or stay?
Condition properly on the host’s action, not just “the car is not behind 3.” Let the car be at 1, 2, or 3 with prior each, and let = “host opens door 3”:
- Car at 1 (you were right): host may open 2 or 3, so .
- Car at 2: host is forced to open 3, so .
- Car at 3: host never reveals the car, so .
Switching wins with probability . The slick argument: your door wins iff your original pick was right — probability , untouched by the host’s show — so the remaining door carries the other . The information came from the host’s constraint: he was twice as likely to open door 3 when the car was at 2 (forced) as when it was at 1 (a coin toss), a likelihood ratio of 2 that turns prior odds 1:1 (door 1 vs door 2) into posterior odds 1:2.

import numpy as np
rng = np.random.default_rng(11)
trials = 100_000
car = rng.integers(0, 3, trials) # where the car is
pick = rng.integers(0, 3, trials) # your initial pick
# Host opens a goat door you didn't pick (forced when pick != car,
# random among the two goats when pick == car).
stay_wins = (pick == car)
# Switching wins exactly when your first pick was wrong:
switch_wins = ~stay_wins
print(f"stay wins: {stay_wins.mean():.4f} (theory 1/3 = 0.3333)")
print(f"switch wins: {switch_wins.mean():.4f} (theory 2/3 = 0.6667)")
# Variant to try: a host who opens a random unpicked door (restart if it's
# the car) gives 50/50 — the forced-reveal mechanism is the whole answer.Change the host’s protocol and the answer changes. If the host opens a random unpicked door and it happens to show a goat, the likelihood ratio is 1 and switching is worth exactly — the “Monty Fall” variant. If the host only offers switches when you picked the car, switching always loses. Good prep questions probe precisely this: the answer is a consequence of the information-generating mechanism, not of the doors. Stating the protocol before computing is the mark of someone who actually understands conditioning.
Fallacies: gambler’s fallacy and Simpson preview#
The gambler’s fallacyexpects independent trials to self-correct: after five losses, a win is “due.” Independence says exactly the opposite — . What is true is that long-run frequencies converge (the LLN, in LLN & CLT) — by dilution of early outcomes, not compensation. Either trades are independent (a streak means nothing) or they are not (then model the dependence — Markov chains — rather than vibe it).
A second preview: aggregated and disaggregated conditional probabilities can point in opposite directions — a strategy can win within every regime yet lose overall if it concentrates exposure in the bad regime. That is Simpson’s paradox, dissected with numbers in multiple testing & paradoxes; the law of total probability above is the tool that resolves it.
Practice problems#
Five classics of conditioning — in each, the entire difficulty is identifying what you are conditioning on.
A family has two children. (a) Given that at least one is a boy, what is the probability both are boys? (b) Given that at least one is a boy born on a Tuesday, what is the probability both are boys?
Solution. (a) Sample space of equally likely sex orders: . Conditioning removes , leaving among three: — not , because “at least one boy” is not “the first is a boy” (that conditioning gives ). (b) Count outcomes over sex × weekday (14 types per child). Families with a Tuesday boy: (complement count); of those, both-boys cases: . Answer: . The extra detail almost restores : the more specific the reported feature, the closer “at least one such child” comes to pointing at a particular child. The meta-lesson — how you learned a fact changes what it tells you— is Monty Hall’s lesson too.
100 doors, one car. You pick one; the host, knowing the layout, opens 98 goat doors from the rest. Switch?
Solution. Your door retains its prior ; the host’s reveals are a deterministic show that squeezes the remaining onto the single unopened door. Switching wins with probability . This exaggerated version is the standard cure for 50/50 intuition — with the formal Bayes computation identical to the 3-door case: (host chose which door to leave shut at random) versus (forced), likelihood ratio 99.
You have a coin with unknown bias . Produce a fair 50/50 bit.
Solution. Flip twice. Output heads on , tails on , and discard-and-repeat on or . By independence, — the two accepted outcomes are exactly symmetric, so conditioned on acceptance each has probability regardless of . Expected flips: acceptance probability per round is , so — 4 flips for a fair coin, worse as bias grows. The design pattern — manufacture symmetry, then condition on the symmetric subset — recurs across probability problems.
Roll a fair die repeatedly until the first 6. Given that every roll in the sequence was even, what is the expected number of rolls?
Solution.The famous wrong answer is 3 — “given even rolls, it is a fair 3-sided die on , so geometric with .” But conditioning on “allrolls even” is a statement about the whole sequence, and long sequences are less likely to stay even — the conditioning punishes length. Compute: (each pre-6 roll must be 2 or 4), so , and
Expected 1.5 rolls — shorter than the unconditional 6, and shorter even than the fake three-sided-die answer. Conditioning on a survival-type event reshapes the whole distribution; the same subtlety underlies survivorship bias in fund databases.
One strategy in fifty has a genuine edge. Your validation pipeline passes 90% of genuine edges and 10% of duds. A candidate passes. What is the probability it is genuine — and what after passing a second, independent validation?
Solution. Odds form. Prior odds: . Likelihood ratio of a pass: . Posterior odds , i.e. — a passing grade still means probably a dud. A second independent pass multiplies another 9: , giving . Two lessons worth internalising: base rates make single confirmations weak, and independent evidence compounds multiplicatively in odds — why the gauntletstacks tests, and why “independent” matters: re-running a backtest on the same data multiplies by a likelihood ratio of 1.
Next: events and their probabilities become numbers and their distributions — expectation, variance, moment generating functions, and the indicator trick. Random variables & moments.


