Discrete-Time Martingales, Stopping Times, and Optional Stopping
Anchor (Master): Williams — Probability with Martingales Ch. 10-14; Durrett §4.1-4.8; Neveu — Discrete-Parameter Martingales (North-Holland, 1975) Ch. I-IV
Intuition Beginner
A martingale is the mathematics of a fair game. Picture your bankroll while gambling at a table where every bet is exactly fair: on average you neither win nor lose on the next round. The honest statement is that, given everything you have seen so far, your expected fortune after the next bet equals your fortune right now. That single sentence is the whole idea. A martingale is a running total whose best forecast for tomorrow, using all of today's information, is simply today's value.
The reason this matters is that "fair on every step" turns out to control the long run, not just one step. The headline fact is bleak-proof: no clever betting scheme that decides how much to wager based only on the past can turn a fair game into a profitable one. You may double your stake after losses, sit out certain rounds, or quit on a hunch, but as long as each individual bet stays fair, your average fortune stays put. People rediscover this the hard way every time a roulette system fails.
The second idea is a rule about when you are allowed to stop. A stopping time is a quitting rule you could actually obey in real time: "leave when I first reach 100 dollars" is legal, because at each moment you know whether the rule has fired, but "leave one bet before my peak" is illegal, because you would need to see the future to know your peak. The question of whether stopping at a clever moment can beat a fair game is exactly the question of optional stopping.
The takeaway: a martingale is a fair-game fortune, and the deep result is that fairness survives both your betting strategy and your stopping strategy, under reasonable conditions. When those conditions fail, the game can be beaten — and seeing exactly how they fail is the most instructive part.
Visual Beginner
Picture three columns of information growing taller as time passes. At each time step a new piece of information is revealed and added to the column, and your fortune is one number computed from everything revealed so far.
Top band: time 0, little information, fortune at its starting height. Each lower band adds the next step's information. The dashed line is the forecast: averaged over all the ways the next step could go, the fortune lands back at its current height. That is the fair-game balance. The jagged overlay is one real run, which of course wanders up and down — the balance is a statement about the average over many runs, not about any single path.
A stopping rule is a flag you can raise looking only at the bands above the current one. The optional-stopping question is whether raising that flag at a smart moment lets the fortune at the flag differ, on average, from the starting height.
Worked example Beginner
We test "you cannot beat the system" on the simplest fair game: a coin-flip walk. Start with fortune . Each round flip a fair coin; win on heads, lose on tails. After each round your fortune is the running sum of these plus-or-minus-one steps. This is a fair game: at any moment, the expected change on the next flip is , so your expected next fortune equals your current fortune. It is a martingale.
Step 1. A naive strategy. You decide to bet only on rounds and sit out the even rounds, hoping to "skip the unlucky flips." On a skipped round your fortune does not change. On a played round it goes up or down by with equal chance. The expected change on every round, played or skipped, is still . So after any number of rounds your expected fortune is still . Skipping rounds changed nothing on average.
Step 2. A doubling strategy. Now you bet ; if you lose you bet ; if you lose again you bet , doubling until your first win, then stop. Compute the expected fortune at the moment you stop. If your first win comes on round , you lost dollars on the earlier rounds and won on round , for a net of exactly . The chance the first win is on round is . So you finish with probability — it looks like a sure profit.
Step 3. Where the catch hides. To guarantee that you must be willing to keep doubling without limit. The total you might need to stake before winning has no finite ceiling: the expected size of your largest bet is infinite. With any real bankroll the strategy fails on the run where you lose many times in a row, and that rare run is large enough to wipe out all the small wins. The fair-game balance was never actually broken — it was only hidden by ignoring the unbounded stake.
Step 4. The honest score. If instead you cap the game at a fixed number of rounds, or cap your bankroll, the expected final fortune is exactly again, every time. The doubling "system" only seemed to win because it secretly required infinite resources and unbounded time.
What this tells us: a fair game stays fair under any past-based betting rule, and the only way to appear to beat it is to smuggle in an unbounded bet or an unbounded waiting time. The optional-stopping theorem is precisely the bookkeeping that says when the smuggling is impossible.
Check your understanding Beginner
Formal definition Intermediate+
Fix a probability space . A filtration is an increasing sequence of sub--algebras , where models the information available at time . A process is adapted to if each is -measurable, and predictable if each is -measurable (for ); a predictable process is one whose value at time is decided one step in advance.
Throughout we take conditional expectation as a verified construction from the Radon-Nikodym theorem 02.07.08: for and a sub--algebra , is the -a.s. unique -measurable element of with for all . The properties used below are: linearity; the tower property when ; taking out what is known, for bounded -measurable ; conditional Jensen for convex ; and the characterisation of as orthogonal projection onto . We do not re-derive existence here.
Definition (martingale, sub/supermartingale). An adapted process with each is a martingale (relative to ) if $$ \mathbb{E}[X_{n+1} \mid \mathcal{F}n] = X_n \quad \text{a.s. for every } n \ge 0. $$ It is a submartingale if $\mathbb{E}[X{n+1} \mid \mathcal{F}n] \ge X_n\mathbb{E}[X{n+1} \mid \mathcal{F}_n] \le X_n\mathbb{E}[X_n] = \mathbb{E}[X_0]$; a submartingale has nondecreasing mean; a supermartingale nonincreasing.
Definition (martingale transform). If is predictable and is adapted, the transform is the process with . Reading as the stake placed on game and as the per-unit payoff, is the discrete stochastic integral of against — the gambler's accumulated winnings.
Definition (stopping time). A map is a stopping time for if for every (equivalently ). The stopped process is , where . The -algebra of the past at is , on which is measurable (on ).
Counterexamples to common slips Intermediate+
Constant mean is necessary but not sufficient for the martingale property. A process can satisfy for all without being a martingale: the conditional identity is strictly stronger than equality of unconditional means. The martingale property is a statement at every (a.s.), not merely on average.
Adapted is not predictable. A martingale is adapted, so is known at time ; it is almost never predictable. If a martingale were predictable it would be a.s. constant in : .
The last time is not a stopping time. For the coin-flip walk on , "the last time the walk visits " is not a stopping time — knowing time is the last visit requires the future. "The first time the walk hits " is a stopping time.
can fail. For the symmetric walk, first hitting time of level is a.s. finite, yet in expectation. Optional stopping needs a hypothesis (boundedness, or uniform integrability); fairness does not extend to arbitrary unbounded stopping times for free.
A supermartingale stopped is still a supermartingale, not a martingale. Stopping preserves the inequality direction; it does not upgrade a strict supermartingale into a martingale.
Key theorem with proof Intermediate+
Theorem (you cannot beat the system; Doob's optional stopping). Let be a martingale and a bounded predictable process. Then the transform is a martingale with for all . Consequently, for a stopping time the stopped process is a martingale, so for all . If in addition any one of the following holds, then and :
(i) is bounded ( a.s. for some constant );
(ii) a.s., the increments are bounded ( a.s. for a constant ) and ;
(iii) the stopped family is uniformly integrable.
Proof. Transform is a martingale. Since is -measurable and bounded, taking out what is known and the martingale property of give $$ \mathbb{E}[Y_{n+1} - Y_n \mid \mathcal{F}n] = \mathbb{E}[C{n+1}(X_{n+1} - X_n) \mid \mathcal{F}n] = C{n+1},\mathbb{E}[X_{n+1} - X_n \mid \mathcal{F}n] = 0. $$ Each is integrable (a finite sum of products of a bounded factor with increments), and is adapted, so $\mathbb{E}[Y{n+1} \mid \mathcal{F}_n] = Y_nY\mathbb{E}[Y_n] = \mathbb{E}[Y_0] = 0$.
Stopped process is a martingale. Take the predictable strategy . The event lies in , so is predictable and bounded by . Its transform telescopes to $$ (C \bullet X)n = \sum{k=1}^n \mathbf{1}{{\tau \ge k}}(X_k - X{k-1}) = X_{\tau \wedge n} - X_0. $$ By the first part this is a martingale of mean zero, so is a martingale and for every . This is the precise form of "no past-based stopping rule beats a fair game over a finite horizon."
Passing to the limit under each condition.
(i) If , then exactly, and the identity at reads .
(ii) Bound the increments of the stopped process:
$$
|X_{\tau \wedge n} - X_0| = \Big| \sum_{k=1}^{\tau \wedge n} (X_k - X_{k-1}) \Big| \le \sum_{k=1}^{\tau} |X_k - X_{k-1}| \le K,\tau.
$$
Since , the integrable random variable dominates the family . As a.s., a.s.; dominated convergence 02.07.05 gives , and the left side is constantly .
(iii) A uniformly integrable family that converges a.s. converges in (Vitali's convergence theorem; uniform integrability plus a.s. convergence yields convergence). Here a.s. on , and uniform integrability of forces and convergence, so , again equal to .
Bridge. The optional-stopping theorem builds toward the entire edifice of martingale limit theory and reappears in the convergence theorem and the Markov-chain hitting-time calculus, and it appears again in the continuous-time optional sampling of stochastic analysis. The foundational reason a fair game cannot be beaten is the predictability of the stake: because is fixed before the increment is revealed, the conditional expectation of the gain is the stake times zero, and this is exactly the discrete shadow of the non-anticipation that makes the Itô integral a martingale. The three conditions (i)-(iii) are one phenomenon in three guises — each is a way to license the interchange of limit and expectation , the central insight that the only way to break is to lose uniform integrability at infinity. Condition (iii) generalises the other two: a bounded stopping time and the bounded-increment-integrable-time pair both force uniform integrability of the stopped family, so the bridge is that optional stopping is, at bottom, a uniform-integrability theorem dressed in the language of fair games. Putting these together, optional stopping is the engine that converts the abstract martingale identity into concrete computations of hitting probabilities and expected durations, which is exactly the gambler's-ruin calculus carried out below.
Exercises Intermediate+
Advanced results Master
The structural backbone of discrete martingale theory is the Doob decomposition: every adapted integrable process has a unique decomposition with a martingale, , and predictable with , given by and . The process is a submartingale precisely when is a.s. nondecreasing. Specialising to for an -martingale produces the predictable quadratic variation (or angle bracket) , the unique predictable increasing process with a martingale; it is the discrete-time progenitor of the quadratic variation of Brownian motion, and recovers Exercise 3.
Optional stopping combines with the optional sampling theorem in its sharper form: if is a uniformly integrable martingale and are stopping times, then . Uniform integrability is the exact dividing line. A uniformly integrable martingale is one of the form for an integrable terminal variable — a closed martingale — and for such processes the optional-sampling identity holds for all pairs of stopping times without finiteness or boundedness side-conditions. The Radon-Nikodym viewpoint of 02.07.08 makes this transparent: is the density of the measure restricted to , against , and optional sampling is the restriction of that density identity to the -algebra .
The martingale convergence theorem is the limit companion of optional stopping. Doob's upcrossing inequality bounds the expected number of upcrossings of an interval by time : . An -bounded supermartingale cannot oscillate across any rational interval infinitely often, so it converges a.s. to an integrable limit . Convergence is in (and the martingale closes with terminal value ) if and only if the family is uniformly integrable; convergence for holds for -bounded martingales via Doob's inequality .
The gambler's-ruin problem is the canonical proving ground for the whole apparatus. For the asymmetric walk with up-probability , the three martingales , , and deliver, via optional stopping, the ruin probability, the expected duration, and the boundary-absorption split. The exponential martingale with is the discrete Doléans-Dade exponential; the change of measure is a Radon-Nikodym derivative that conjugates the -walk into the -walk, the discrete Girsanov transform. This single example exhibits martingale, stopping time, optional stopping, change of measure, and the convergence dichotomy in one computation.
Synthesis. The foundational reason optional stopping holds is that the stopped martingale is the transform by the predictable stake , and a predictable stake against a fair increment has zero conditional mean — this is exactly the mechanism by which non-anticipation makes the Itô integral a martingale, the discrete shadow of accounting carried by . Putting these together, the Doob decomposition, the angle bracket, optional sampling, and the convergence theorem are one structure: every adapted process splits into a predictable drift plus a martingale, the martingale part is controlled at stopping times by uniform integrability, and the same uniform integrability is dual to the closure that the Radon-Nikodym theorem produces. This is exactly the central insight that organises the subject: a martingale is a consistent system of conditional-expectation densities, optional stopping is the restriction of that consistency to stopping-time -algebras, and the convergence theorem is the time-asymptotic Radon-Nikodym identification of the system with a single limit density. The gambler's ruin generalises this from a slogan into arithmetic, and it is dual to the continuous-time optional sampling that drives the Feynman-Kac and Girsanov machinery downstream.
Full proof set Master
The optional-stopping theorem and its three conditions are proved in full in the Key theorem section. The remaining Master claims are recorded here.
Proposition (Doob decomposition; uniqueness). Every adapted process with admits a unique decomposition with a martingale, predictable, .
Proof. For existence, set , which is -measurable (predictable) and integrable, and . Then , so is a martingale. For uniqueness, suppose with both martingales and predictable, vanishing at . Then is both predictable and a martingale; a predictable martingale satisfies , so the difference is constant in , hence equal to its value at . Thus and .
Proposition (Doob's upcrossing inequality). Let be a supermartingale and . Let be the number of upcrossings of completed by time . Then .
Proof. Define a predictable -valued strategy that "buys at and sells at ": set and, for , , which is -measurable. Each completed upcrossing increases the transform by at least , while the final incomplete crossing costs at most , so . Since is predictable, bounded, and nonnegative and is a supermartingale, is a supermartingale with . Taking expectations of the inequality yields .
Proposition (martingale convergence theorem). An -bounded supermartingale converges a.s. to an integrable limit .
Proof. By the upcrossing inequality, for fixed rationals , by -boundedness and monotone convergence, so a.s. The event that fails to converge in is , a countable union of sets each forcing infinitely many upcrossings, hence of probability zero. So a.s. in . Fatou's lemma 02.07.05 gives , so is a.s. finite and integrable.
Proposition (closed martingales and uniform integrability). A martingale is uniformly integrable if and only if there exists with for all ; in that case a.s. and in .
Proof. If , then is uniformly integrable because the family is uniformly integrable for any fixed (conditional Jensen on plus absolute continuity of the integral). Conversely, if is uniformly integrable, it is -bounded, so by the convergence theorem a.s.; uniform integrability upgrades this to convergence (Vitali). For fixed and , the martingale property gives for all ; passing under convergence yields , which is the defining identity .
Connections Master
Conditional expectation and the Radon-Nikodym theorem 02.07.08 are the load-bearing prerequisite. The martingale property is an identity between conditional expectations, a closed martingale is literally the Radon-Nikodym density process , and the optional-sampling theorem is the restriction of that density identity to a stopping-time -algebra; without the existence and tower property of conditional expectation proved there, nothing in this unit is even definable.
Fatou's lemma and dominated convergence 02.07.05 are the analytic engine behind every limit taken here. The passage from the finite-horizon identity to the optional-stopping conclusion uses dominated convergence under conditions (i) and (ii), and the integrability of the a.s. limit in the convergence theorem is exactly Fatou applied to .
The elementary probability of rules and distributions 26.02.01 supplies the concrete random variables and the i.i.d. increment structure that the worked examples and gambler's-ruin computations run on; the binomial step distribution of the simple random walk, expectation linearity, and independence are all taken from there and lifted into the filtration-and-conditioning language of this unit.
Historical & philosophical context Master
The martingale property was isolated by Paul Lévy in the 1930s as a generalisation of sums of independent mean-zero variables, and the name — borrowed from the doubling betting system and ultimately from a piece of horse harness — was attached by Jean Ville in his 1939 Étude critique de la notion de collectif, where martingales served to refute von Mises's frequentist definition of randomness. Joseph Doob gave the theory its modern measure-theoretic form, introducing the systematic conditional-expectation formulation and the optional sampling theorem in his 1940 paper (Trans. Amer. Math. Soc. 47, 455) [Doob 1940] and codifying it in Stochastic Processes (1953). The upcrossing inequality and the convergence theorem are Doob's; the predictable decomposition of a submartingale is Doob's discrete-time result, later extended to continuous time by Meyer as the Doob-Meyer decomposition.
The gambler's-ruin problem long predates the abstract theory: Pascal and Fermat treated absorption probabilities in their 1654 correspondence, Huygens posed the ruin problem in De ratiociniis in ludo aleae (1657), and Abraham de Moivre gave the asymmetric solution in The Doctrine of Chances (1718) using the recurrence that the exponential martingale now solves in one line. Wald's identity arose from sequential analysis in the 1940s (Wald, Sequential Analysis, 1947), where stopping times model the random sample size of a sequential test. The conceptual content is that conditioning on an information filtration converts the static notion of a fair bet into a dynamic, time-indexed object whose fairness is preserved exactly when no information can be borrowed from the future — through the stake (predictability) or through the stopping rule (the stopping-time condition) — and the optional-stopping theorem is the precise accounting of when that borrowing is impossible.
Bibliography Master
@book{williams1991,
author = {Williams, David},
title = {Probability with Martingales},
publisher = {Cambridge University Press},
series = {Cambridge Mathematical Textbooks},
year = {1991}
}
@article{doob1940,
author = {Doob, Joseph L.},
title = {Regularity properties of certain families of chance variables},
journal = {Transactions of the American Mathematical Society},
volume = {47},
number = {3},
pages = {455--486},
year = {1940}
}
@book{doob1953,
author = {Doob, Joseph L.},
title = {Stochastic Processes},
publisher = {John Wiley \& Sons, New York},
year = {1953}
}
@book{durrett2019,
author = {Durrett, Rick},
title = {Probability: Theory and Examples},
edition = {5th},
series = {Cambridge Series in Statistical and Probabilistic Mathematics},
publisher = {Cambridge University Press},
year = {2019}
}
@book{neveu1975,
author = {Neveu, Jacques},
title = {Discrete-Parameter Martingales},
publisher = {North-Holland, Amsterdam},
year = {1975}
}
@book{wald1947,
author = {Wald, Abraham},
title = {Sequential Analysis},
publisher = {John Wiley \& Sons, New York},
year = {1947}
}
@book{demoivre1718,
author = {de Moivre, Abraham},
title = {The Doctrine of Chances},
publisher = {W. Pearson, London},
year = {1718}
}