Probability & Statistics
The Optional Stopping Theorem: When You Can't Beat a Fair Game
No matter how clever your quitting strategy, you cannot turn a fair game into a favorable one β that is the Optional Stopping Theorem, the martingale-theory formalization of "there is no free lunch." Precisely: if (Xβ)ββ₯β is a martingale with respect to a filtration (β±β), and Ο is a stopping time, then under any one of three standard hypotheses β Ο is bounded; Ο is finite and X is bounded up to Ο; or πΌ[Ο] < β and the increments are bounded β one has πΌ[X_Ο] = πΌ[Xβ].
The theorem is deceptively simple to state and famously easy to misapply: drop a single hypothesis and a gambler doubling his bets can "guarantee" a profit from a fair coin. Understanding exactly which condition rules out that paradox is the whole content of the result.
- FieldProbability theory / martingale theory
- Named afterJ. L. Doob (optional sampling, 1953)
- StatementπΌ[X_Ο] = πΌ[Xβ] for a martingale X and stopping time Ο (under a boundedness/integrability hypothesis)
- Key hypothesisOne of: Ο bounded; X_{Οβ§n} uniformly integrable; or πΌ[Ο]<β with bounded increments
- Proof techniqueStopped martingale X_{Οβ§n} + Dominated / Monotone convergence to pass n β β
- GeneralizesWald's identities, gambler's ruin, hitting-probability formulas, martingale CLT scaffolding
Interactive visualization
Press play, or step through manually. The visualization is yours to drive β try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough β narrated, captioned, under a minute.
Precise statement: martingales, stopping times, and the three hypotheses
Fix a probability space (Ξ©, β±, β) with a filtration (β±β)ββ₯β β an increasing chain β±β β β±β β β¦ of Ο-algebras encoding information up to time n. A process (Xβ) is a martingale if each Xβ is β±β-measurable, integrable (πΌ|Xβ| < β), and satisfies the fair-game identity πΌ[Xβββ | β±β] = Xβ. A stopping time Ο: Ξ© β {0,1,β¦,β} is a random time with {Ο β€ n} β β±β for all n β you decide to stop using only information available so far, no peeking into the future.
The Optional Stopping (a.k.a. Optional Sampling) Theorem asserts πΌ[X_Ο] = πΌ[Xβ] provided at least one of the following holds: (A) Ο is bounded, Ο β€ N a.s.; (B) Ο < β a.s. and the stopped process is dominated, |X_{Οβ§n}| β€ Y with πΌ[Y] < β; or (C) πΌ[Ο] < β and the conditional increments are bounded, πΌ[|Xβ β Xβββ| | β±βββ] β€ c. For a submartingale (πΌ[Xβββ|β±β] β₯ Xβ) the equality becomes πΌ[X_Ο] β₯ πΌ[Xβ]; for a supermartingale, β€.
The picture: a fair game stays fair, whenever you quit
Imagine your fortune Xβ playing a fair game β each round adds a mean-zero, unpredictable increment. The martingale property says that on average, from where you stand now, you neither gain nor lose next round: πΌ[Xβββ | β±β] = Xβ. The seductive idea is that a smart exit rule could tilt the odds: quit while ahead, keep playing while behind. Optional stopping says this is an illusion β the exit rule Ο, because it cannot see the future, is powerless to bias the expectation.
Geometrically, think of the martingale as a random path whose conditional slope is always zero. Stopping is choosing when to freeze the path, and the freezing decision is measurable with respect to the past. The stopped process Xβ^Ο := X_{Οβ§n} is still a martingale β freezing preserves fairness at every finite horizon. The only subtlety is the limit n β β: does πΌ[X_{Οβ§n}] β πΌ[X_Ο]? The three hypotheses are exactly the conditions that license this passage to the limit; without one, mass can 'escape to infinity' and the fair game appears beatable.
Key idea of the proof: stop early, then take the limit safely
The mechanism has two moves. Move 1 (finite horizon is free). For any stopping time Ο, the stopped process Xβ^Ο = X_{Οβ§n} is a martingale. The one-line reason: X_{Οβ§n} β X_{Οβ§(nβ1)} = 1_{Ο β₯ n}(Xβ β Xβββ), and the indicator 1_{Ο β₯ n} = 1 β 1_{Ο β€ nβ1} is β±βββ-measurable (since {Ο β€ nβ1} β β±βββ). So πΌ[X_{Οβ§n} β X_{Οβ§(nβ1)} | β±βββ] = 1_{Ο β₯ n} Β· πΌ[Xβ β Xβββ | β±βββ] = 0. Telescoping gives πΌ[X_{Οβ§n}] = πΌ[Xβ] for every finite n β this needs no extra hypothesis.
Move 2 (pass to the limit). Since Ο < β a.s., X_{Οβ§n} β X_Ο pointwise. We need πΌ[X_{Οβ§n}] β πΌ[X_Ο]. Under (A) the sequence is finite (Οβ§n = Ο for n β₯ N). Under (B), Dominated Convergence applies via the envelope Y. Under (C), a telescoping bound |X_{Οβ§n} β Xβ| β€ Ξ£_{k=1}^{Ο} |Dβ| gives an integrable majorant (its expectation is β€ cΒ·πΌ[Ο] by a conditional Wald bound), so DCT again applies. The unifying condition is uniform integrability of {X_{Οβ§n}}, which is precisely what makes LΒΉ-convergence follow from a.s. convergence.
Canonical example: gambler's ruin and Wald's identity
Let (ΞΎα΅’) be i.i.d. with β(ΞΎ = +1) = β(ΞΎ = β1) = Β½, and Sβ = ΞΎβ + β¦ + ΞΎβ the simple symmetric random walk, Sβ = 0. Then Sβ is a martingale. For 0 < a and start at position k with 0 < k < a, let Ο = inf{n : Sβ = 0 or Sβ = a} be the exit time of the interval. Here Ο has πΌ[Ο] < β and increments are bounded (|Dβ| = 1), so hypothesis (C) holds. Optional stopping gives πΌ[S_Ο] = Sβ = k. Since S_Ο β {0, a}, writing p = β(hit a first): 0Β·(1βp) + aΒ·p = k, so β(hit a before 0) = k/a β the classic gambler's-ruin formula, extracted in one line.
To get the expected duration, use the companion martingale Mβ = SβΒ² β n (a martingale because πΌ[SβββΒ² | β±β] = SβΒ² + 1). Optional stopping yields πΌ[S_ΟΒ²] β πΌ[Ο] = kΒ², and since πΌ[S_ΟΒ²] = aΒ²Β·(k/a) = ak, we get πΌ[Ο] = k(a β k). The same two martingales, Sβ and SβΒ² β n, deliver both hitting probabilities and expected hitting times.
Why the hypotheses matter: the doubling counterexample
Drop every integrability hypothesis and the theorem is false. Take Sβ the simple symmetric random walk from 0 and Ο = inf{n : Sβ = 1}, the first time you are one unit ahead. Because the walk is recurrent, Ο < β almost surely, and X_Ο = 1 identically. Hence πΌ[X_Ο] = 1 β 0 = πΌ[Xβ] β the fair game looks beaten. What fails? Here πΌ[Ο] = β, so (C) is out; the stopped values X_{Οβ§n} are unbounded below (you can dip arbitrarily negative before hitting +1), so (A) and (B) fail too; and {X_{Οβ§n}} is not uniformly integrable. The martingale-doubling betting scheme is the same phenomenon dressed as a casino strategy: it 'guarantees' a $1 profit but requires an unbounded bankroll and unbounded time.
The moral connects to uniform integrability and Doob's convergence theorems: πΌ[X_Ο] = πΌ[Xβ] holds iff the family {X_{Οβ§n}} is uniformly integrable, the sharp necessary-and-sufficient refinement. This ties optional stopping to the Dominated Convergence Theorem and to martingale LΒΉ/Lα΅ convergence.
Why it matters: from random walks to the pricing of options
Optional stopping is the workhorse behind a startling range of results. In probability it yields Wald's identities (πΌ[S_Ο] = πΌ[Ο]Β·πΌ[ΞΎ] for i.i.d. sums), exit-time and exit-position laws for random walks and Brownian motion, and hitting-probability formulas that solve discrete Dirichlet problems. Its continuous-time analogue (Doob's optional sampling for right-continuous martingales, with Ο a stopping time and X_{Οβ§t} uniformly integrable) underlies the strong Markov property and ItΓ΄-calculus arguments.
In mathematical finance, the fundamental theorem of asset pricing says a market is arbitrage-free iff a discounted-price martingale measure exists; optional stopping is precisely why no stopping-based trading strategy β including early exercise of an American option below its fair value β can produce risk-free profit. In analysis and PDE, martingale representations of harmonic functions use optional stopping to derive mean-value and maximum principles. In algorithms and statistics it certifies sequential-test validity (Wald's SPRT) and powers concentration bounds. It is, quite literally, the theorem that formalizes 'you can't beat a fair game.'
| Hypothesis | Conclusion | What it forbids / typical use |
|---|---|---|
| (A) Ο β€ N almost surely (bounded stopping time) | πΌ[X_Ο] = πΌ[Xβ] always | No hypothesis on X needed; the cleanest case. Rules out 'wait arbitrarily long'. |
| (B) Ο < β a.s. and |X_{Οβ§n}| β€ Y with πΌ[Y] < β (dominated) | πΌ[X_Ο] = πΌ[Xβ] | Bounded game payoffs. Rules out unbounded fortunes like the doubling martingale. |
| (C) πΌ[Ο] < β and πΌ[|Dβ| | β±βββ] β€ c a.s. (bounded increments) | πΌ[X_Ο] = πΌ[Xβ] | Random walks with fixed step size; underlies Wald's identity and gambler's ruin. |
| (D) X_{Οβ§n} uniformly integrable and Ο < β a.s. | πΌ[X_Ο] = πΌ[Xβ] | The sharpest single sufficient condition; (A)β(C) are special cases of it. |
| None (only Ο < β a.s.) | Can FAIL: πΌ[X_Ο] > πΌ[Xβ] | Doubling strategy / simple random walk hitting +1: πΌ[X_Ο] = 1 β 0 = Xβ. |
Frequently asked questions
Why isn't Ο < β almost surely enough on its own?
Because probability mass can escape to infinity in expectation even when the stopping time is finite pointwise. The simple random walk hitting +1 has Ο < β a.s. yet πΌ[X_Ο] = 1 β 0 = πΌ[Xβ]. The failure is that {X_{Οβ§n}} is not uniformly integrable: the walk can dip arbitrarily far negative before hitting +1, and πΌ[Ο] = β. You always have πΌ[X_{Οβ§n}] = πΌ[Xβ] for finite n, but the limit n β β does not commute with expectation without an integrability control.
What is the single sharpest sufficient condition?
Uniform integrability of the stopped family {X_{Οβ§n} : n β₯ 0}, together with Ο < β a.s. This is condition (D) and it implies conclusions (A), (B), and (C) as special cases: bounded Ο, a dominating integrable envelope, or πΌ[Ο] < β with bounded increments each force uniform integrability. In fact πΌ[X_Ο] = πΌ[Xβ] holds if and only if the martingale converges in LΒΉ along the stopped sequence, which is exactly uniform integrability by the Vitali/DunfordβPettis characterization.
How does optional stopping give the gambler's-ruin probabilities?
For the symmetric walk started at k in (0, a) with exit time Ο, hypothesis (C) holds (bounded Β±1 increments, πΌ[Ο] < β), so πΌ[S_Ο] = k. Since S_Ο β {0, a}, solving aΒ·β(hit a first) = k gives β = k/a. Using the second martingale SβΒ² β n and optional stopping gives πΌ[Ο] = k(a β k). For a biased walk you instead use the exponential martingale (q/p)^{Sβ}, which is a martingale precisely when the step law makes it one.
Does the theorem hold in continuous time?
Yes. For a right-continuous martingale (Xβ)ββ₯β adapted to a filtration satisfying the usual conditions, and stopping times Ο β€ Ο, one has πΌ[X_Ο | β±_Ο] = X_Ο provided {X_{Οβ§t}} is uniformly integrable (Doob's optional sampling theorem). Bounded stopping times work with no extra hypothesis. This continuous version is central to ItΓ΄ calculus: it turns the local-martingale part of a stochastic integral into something with controlled expectation once you localize by a sequence of stopping times Ο_n β β.
What is the difference between a martingale and a submartingale version?
For a martingale the conclusion is the equality πΌ[X_Ο] = πΌ[Xβ]. For a submartingale (πΌ[Xβββ|β±β] β₯ Xβ, a 'favorable' game) it weakens to the inequality πΌ[X_Ο] β₯ πΌ[Xβ], and for a supermartingale to πΌ[X_Ο] β€ πΌ[Xβ]. More generally, for two ordered stopping times Ο β€ Ο satisfying the integrability hypothesis, πΌ[X_Ο | β±_Ο] equals X_Ο (martingale), is β₯ X_Ο (submartingale), or β€ X_Ο (supermartingale). The Doob decomposition reduces the submartingale case to the martingale case plus a monotone predictable part.
Is the stopped process X_{Οβ§n} always a martingale?
Yes, and crucially with no extra hypotheses β this is the 'free' half of the proof. The increment X_{Οβ§n} β X_{Οβ§(nβ1)} = 1_{Οβ₯n}(Xβ β Xβββ), and 1_{Οβ₯n} is β±βββ-measurable because {Ο β₯ n} = {Ο β€ nβ1}αΆ β β±βββ. Taking conditional expectation kills the martingale increment, so πΌ[X_{Οβ§n} | β±βββ] = X_{Οβ§(nβ1)}. Hence πΌ[X_{Οβ§n}] = πΌ[Xβ] for every finite n. All the work in optional stopping is justifying the limit n β β; the finite-horizon identity is automatic.