Martingales §
A martingale is a stochastic process whose conditional expectation of the future, given the past, equals the present value: . It formalizes a “fair game” with no trend.
Key results: optional stopping theorem, Doob’s inequalities, martingale convergence theorems; the tool behind proofs of the strong law of large numbers and hitting-time estimates for Markov chains.
Builds on Random variables and expectation and Conditional probability.
Why it matters §
A martingale is the precise mathematical statement that “no strategy can beat a fair game.” Once you can recognize a quantity as a martingale, three powerful conclusions come for free:
- No drift, so averages stabilize. If is a martingale with bounded increments, then almost surely. This is the engine behind the strong law of large numbers: the running average of i.i.d. variables is a martingale up to a constant, and the martingale convergence machinery turns “the average stops moving” into a rigorous almost-sure limit. See Limit theorems.
- Hitting times become computable. For a Markov chain, the time to reach a target state (a hitting time) is often infinite in expectation or finite but hard to bound. Martingales let you convert “when does the chain hit state ?” into an equation about expectations, giving sharp bounds on hitting times and on the probability of ever reaching a state.
- Fairness is preserved under stopping. The optional stopping theorem says you cannot, by choosing when to stop, turn a fair game into a winning one — provided the stopping rule is well behaved. This is the backbone of gambler’s-ruin calculations and of many results in queueing and finance.
The rest of this page builds the machinery in order: the definition and its fair-game intuition, stopping times, the inequalities and convergence theorems that make the machinery usable, and the canonical examples that show the property cuts across every family of stochastic process.
Authoritative sources
Definition and the fair-game intuition §
Definition. Let be a stochastic process and the information available up to time (the filtration). Then:
- is a martingale if for all .
- is a submartingale if (a game that, on average, drifts up).
- is a supermartingale if (a game that, on average, drifts down).
In each case the process must be adapted ( is measurable w.r.t. — you can observe it at time ), integrable (), and the conditional expectation must exist.
Details
Step 1 — Read the definition as a prediction rule. The conditional expectation is the best (mean-square) prediction of the next value using everything you know so far. A martingale says: the best prediction of the future is exactly where you are now. There is no edge to exploit, no trend to ride. A submartingale says the future is, on average, at least as large as the present (a favorable game); a supermartingale says at most as large (an unfavorable game). The martingale is the knife-edge between the two.
Step 2 — The symmetric random walk is the prototype. Let and let where the are i.i.d. with . This is the gambler’s fortune after fair coin flips. Given the whole past, the next increment is still a fair coin, so
The walk is a martingale. Notice the variance grows (), so the path wanders farther and farther from zero even though its mean stays pinned at zero: no trend, but plenty of spread.
Step 3 — A biased walk is a submartingale. If instead , then and : the walk is a submartingale with a genuine upward drift. The martingale is exactly the case.
Example. A gambler starts with a fortune of 100 and bets 1 unit on a fair coin each round. Their fortune is a martingale: after any history, the expected fortune one round later is exactly the current fortune. The expected fortune is always 100, no matter how long they play — yet the probability of eventually going broke is (a fact the convergence theorems below make precise).
Authoritative sources
Example problem
A coin is biased with . A player gains 1 unit on heads and loses 1 unit on tails, starting at . Is a martingale, a submartingale, or a supermartingale? Compute .
Solution
Each increment has . Hence , so is a submartingale (a favorable game). The expected fortune after 10 rounds is units.
Stopping times and the optional stopping theorem §
Stopping time. A random time is a stopping time (with respect to ) if the event is determined by the information up to time — i.e. for every . You can decide to stop at using only what you have seen so far, never by peeking into the future.
Optional stopping theorem (OST). If is a martingale and is a stopping time satisfying suitable conditions (e.g. is bounded, or a.s. with integrable and the stopped process uniformly integrable), then
The stopped process (frozen at ) is itself a martingale.
Details
Step 1 — Why stopping times are the right notion of “a rule.” A strategy that says “stop when your fortune first hits 150” is a stopping time: at each moment you can check whether the target has been reached using only the past. A rule like “stop at the time of the maximum” is not a stopping time, because you cannot know a time is the maximum until you see the future. The OST applies only to the honest kind.
Step 2 — The theorem in one line. For a martingale, the expected value is constant in time: . If you freeze the process at a well-behaved stopping time , the frozen value still has the same expectation. Fairness is preserved by any legitimate stopping rule.
Step 3 — The conditions are not decoration. The classic trap is a stopping time that is almost surely finite but whose stopped value is not integrable, or whose tail carries enough mass to break the equality. The next example is the canonical demonstration.
The gambler’s-ruin counterexample. A gambler plays a fair coin, gaining or losing 1 unit per round, starting at . They adopt the rule: stop when the fortune first reaches or . Let be that stopping time. The walk is a martingale and a.s. (a symmetric walk hits either boundary with probability ), so it is tempting to conclude .
But , so where . Setting this to gives , i.e. . So the gambler reaches with probability only and with probability . The OST does hold here (the stopped value is bounded, hence integrable), and it correctly predicts the win probability — the “counterexample” is to the naive reading that “I’ll stop as soon as I’m ahead, so I’m guaranteed to win.” The rule does not create an edge; it only reshapes the distribution.
The genuinely dangerous version: a gambler who stops at the first time the fortune is positive (rule ) has always, so . The OST’s hypotheses fail: although a.s., the stopped process is not uniformly integrable and . This is the “you can’t beat a fair game, but you can make the expected stopping time infinite” paradox.
Authoritative sources
Example problem
A fair random walk starts at and is stopped when it first hits or . What is the probability it hits before ?
Solution
The walk is a martingale and the stopping time is bounded in the sense that the stopped value lies in (integrable), so the OST applies: . Writing , we have , hence . The gambler wins with probability .
Doob’s maximal inequality §
Doob’s maximal inequality. If is a nonnegative submartingale, then for every and every horizon ,
For a martingale, , so the bound is simply . The version (Doob’s inequality): if is a submartingale with , then
Details
Step 1 — What the inequality controls. A martingale has constant mean, but its path can spike far above that mean before settling. Doob’s inequality bounds the probability of such a spike in terms of the terminal (or initial) size: the chance the running maximum ever exceeds is at most the mean divided by . It is the maximal-function analogue of Markov’s inequality.
Step 2 — The idea of the proof (upcrossings). The proof counts how often the path upcrosses a level (goes from below to above ). For a submartingale, each upcrossing must be “paid for” by an increase in the process, and the total number of upcrossings is bounded by the total increase divided by the gap . Letting converts the upcrossing count into a bound on the maximum. This is the same “energy accounting” that underlies the convergence theorems.
Step 3 — Why it is useful. Doob’s inequality is the workhorse that turns “the mean is controlled” into “the whole path is controlled with high probability.” It is the key step in proving the martingale convergence theorems and in establishing almost-sure versions of limit theorems.
Example. Let be a symmetric random walk (a martingale, hence a submartingale in absolute value via ). Doob’s inequality says the probability the walk ever reaches before a fixed horizon is at most , a quantity that grows only like — so the chance of a huge spike stays small for moderate .
Authoritative sources
Example problem
A nonnegative submartingale satisfies . Use Doob’s maximal inequality to bound .
Solution
By Doob’s maximal inequality, . So the probability the process ever reaches is at most .
Martingale convergence theorems §
Martingale convergence theorem. If is a martingale with (an -bounded martingale), then converges almost surely to a finite random variable as . If in addition the family is uniformly integrable, then the convergence also holds in , i.e. .
Details
Step 1 — Bounded mean forces convergence. An -bounded martingale cannot keep oscillating forever: the upcrossing argument of Doob’s inequality shows the expected number of upcrossings of any level is finite, which forces the path to settle down. Hence a.s.
Step 2 — Uniform integrability upgrades the mode of convergence. Almost-sure convergence alone does not guarantee that expectations converge (). Uniform integrability rules out “mass escaping to the tail,” and then in , so .
Step 3 — Connection to the strong law of large numbers. Let be i.i.d. with and , and set . Then is a martingale. The strong law of large numbers, a.s., is a direct corollary of the martingale convergence theorem applied to the normalized martingale (see Limit theorems). Martingale convergence is thus the general engine behind the almost-sure stabilization of averages.
Example. The gambler’s fortune in a fair game is an -bounded martingale only if the fortune is bounded; an unbounded fair walk has , so the theorem’s hypothesis fails and the walk does not converge — it wanders off to in the sense that it visits every level infinitely often.
Authoritative sources
Example problem
Let be a martingale with . Does converge almost surely? If the family is also uniformly integrable, what can you say about ?
Solution
Yes: is -bounded, so by the martingale convergence theorem a.s. for some finite . If the family is also uniformly integrable, the convergence is in , and therefore (the mean is preserved in the limit).
Canonical examples §
The martingale property is not a family of processes but a structural property that members of every family can have. The three examples below show how it cuts across the discrete-time, counting, and continuous families.
- Brownian motion (continuous martingale). The Wiener process is the canonical continuous-time martingale: independent Gaussian increments with mean zero give for . It is the scaling limit of the symmetric random walk, so the discrete fair game and the continuous fair game are the same object at different resolutions.
- The compensated Poisson process (jump martingale). The Poisson counting process has upward drift and is a submartingale. Subtracting the drift, , removes the trend and leaves a martingale: the jumps are exactly balanced, on average, by the continuous downward drift. This is the standard way to turn a counting process into a martingale.
- Martingale-difference sequences (discrete-time building block). A sequence with filtration is a martingale-difference sequence if . Any such sequence, accumulated as , is a martingale. This is the discrete-time definition in its most useful form and the reason martingales appear in the analysis of Lévy processes (whose compensated jump part is a martingale) and in stochastic approximation.
Details
Step 1 — One property, many families. The martingale condition only asks that the conditional mean of the increment vanish. It does not care whether the increments are Gaussian (Brownian), Poisson (compensated counting), or arbitrary (martingale-difference). That is why a single set of tools — optional stopping, Doob’s inequalities, convergence theorems — applies uniformly across all of stochastic processes.
Step 2 — Compensating a drift is the general recipe. Whenever a process has a predictable drift, subtracting the accumulated drift yields a martingale. The Poisson process drifts up at rate ; does not. A biased random walk drifts at per step; is a martingale. This “compensation” is the bridge between submartingales (drifting up) and martingales (drift-free).
Step 3 — Martingale-difference sequences are the atoms. Every discrete-time martingale is a sum of martingale-difference terms: has conditional mean zero. Conversely, summing any martingale-difference sequence gives a martingale. So the discrete theory reduces to understanding zero-conditional-mean increments, which is exactly the content of the fair-game definition.
Example. A Poisson process with rate has . The compensated process satisfies for : a martingale with mean zero and variance .
Authoritative sources
Example problem
Let be a Poisson process with rate . Show that is a martingale, and compute .
Solution
For , , so . Hence is a martingale. Since and is deterministic, .
Related pages §
- Brownian motion — the canonical continuous-time martingale.
- Poisson processes — the counting process whose compensated version is a martingale.
- Lévy processes — every Lévy process decomposes into a drift, a Brownian martingale part, and a compensated-jump martingale part.
- Markov chains — martingales are the tool for bounding hitting times.
- Limit theorems — the strong law of large numbers follows from martingale convergence.
- Parent topic: Stochastic processes.
Quizz §
Quizz
A player starts with a fortune of 30 and plays a fair coin, winning or losing 1 unit per round. They stop as soon as their fortune reaches either 0 (broke) or 100.
(a) Identify the martingale and the stopping time, and justify that the optional stopping theorem applies.
(b) What is the probability the player reaches 100 before going broke?
Solution
(a) The fortune is a symmetric random walk, hence a martingale. The stopping time is a stopping time (decidable from the past), and the stopped value is bounded, hence integrable. The OST applies.
(b) By the OST, . Writing , we get , so . The player reaches 100 with probability and goes broke with probability — the fair game gives no edge, only a reshaping of the outcome distribution.