Conditional expectation and martingales
The lesson "Probability spaces, σ-algebras and random variables" set up the probability space , and "Filtrations, adapted processes and stopping times" described how information grows over time through a filtration . This lesson uses both to define conditional expectation given a σ-algebra, states its calculation rules, defines a martingale (the mathematical model of a fair game), and proves why no betting strategy turns a fair game into a profitable one. The coin-flip walk and Brownian motion from "Random walks and Brownian motion" serve as the running examples.
Conditional expectation given a σ-algebra
Let be an integrable random variable, , and let be a sub-σ-algebra: the events whose occurrence is known when the information is available. The conditional expectation is a random variable with two properties:
- is -measurable: its value can be computed from the information in .
- for every event : on every event that can see, has the same average as .
Such a exists (by the Radon–Nikodym theorem) and is unique up to a set of probability zero. When has a finite variance, is the -measurable random variable closest to in mean square, which is why it is called the best forecast of given . It is not a number fixed in advance but a random variable, because the forecast depends on what has been observed.
Example: toss a fair coin twice, let be the number of heads and the information from the first toss. contains only the events "first toss heads" and "first toss tails" (and , ), so must be constant on each: after heads and after tails. The defining property holds on : on both sides.
Rules for conditional expectation
All of these follow from the definition, and they are what one actually computes with. Here and are integrable and are sub-σ-algebras.
- Linearity: .
- Tower property: . Forecasting with less information what a better-informed forecast will be gives the less-informed forecast. With this is .
- Taking out what is known: if is -measurable and is integrable, then .
- Independence: if is independent of , then . Information unrelated to does not change its forecast.
In the coin example the tower property reads .
Martingales
Fix a filtration . A process is a martingale with respect to if
- it is adapted: is -measurable for every ;
- it is integrable: for every ;
- the best forecast of the next value is the current value: .
In continuous time, with a filtration , the third condition becomes for all . If instead, the process is a submartingale (a game in your favour); with it is a supermartingale (a game against you, like a casino with a house edge).
A martingale is a fair game: given everything observed so far, the expected change over the next step is zero. By the tower property the same holds over any number of steps, for , and in particular .
Examples from Brownian motion
Use the natural filtration, the history of the path. Each example is one line with the rules above.
- The symmetric random walk is a martingale: , by taking out what is known and then independence.
- Brownian motion is a martingale in continuous time: for , , and the increment is independent of with mean zero, so .
- is not a martingale. Writing and taking the forecast term by term gives : it drifts upward, so it is a submartingale.
- is a martingale: subtracting the drift removes exactly the upward tendency.
Example: suppose . The forecast of is still 1, but the forecast of is , not 1. The spread of the path grows even though its centre does not move.
Betting strategies
Bet on a fair coin round by round. Before round you choose a stake using only the history (the stake is predictable), and win or lose it: your wealth changes by with . After rounds
The stake is taken out of the forecast because it is known at time , and the coin has conditional mean zero. So the wealth of every such strategy is again a martingale (a martingale transform), and its expected value stays at at every fixed time. A strategy can change the shape of the outcome distribution, but not its mean.
The famous doubling strategy stakes 1, and after every loss doubles the stake, so that the first win recovers all earlier losses plus 1. Limit it to at most 5 rounds. A win in any of the first five rounds gives a net gain of 1. Losing all five rounds has probability and costs . The expected gain is
The strategy wins a little with probability and loses a lot with probability . Without a round limit it needs unlimited credit: after 10 losses in a row the next stake is 512 and the losses so far are 1023.
In the figure you play this game yourself, starting from a wealth of 100. Choose a strategy: a constant stake of 1, doubling after a loss (stakes up to 64, then back to 1), or a stake of 5% of current wealth; no stake can exceed what you have. "Flip once" plays one round and "Play 100 rounds" plays a hundred, drawing your wealth as a step plot. "Simulate 1000 players" lets 1000 players play 100 rounds each with the chosen strategy and draws a histogram of their final wealth, with the average marked; "Reset" starts again with fresh coins. Compare the three strategies. The average final wealth stays near 100 in every case (the readout shows it with its 95% sampling band), but with a constant stake about 46% of players end ahead and nobody falls below about 60, with doubling about two thirds end ahead and some lose everything, and with 5% of wealth only about 38% end ahead while a few players finish with several times their starting wealth.
Press "Simulate 1000 players" to see how final wealth is spread out.
- Wealth now
- 100.00
- Next stake
- 1.00
- Average final wealth
- –
- Ended ahead
- –
- Worst outcome
- –
The same calculation with a longer limit shows that more rounds only move the risk into a rarer, larger loss.
Stopping and the optional stopping theorem
A gambler rarely plays a fixed number of rounds; they stop when something happens. A stopping time is a random time for which the decision to stop by time uses only the information up to : for every . "Stop at the first win" is a stopping time; "stop just before the biggest loss" is not, because it needs the future.
Stopping a martingale at a stopping time keeps it a martingale: the stopped process is again a martingale, so for every fixed . Passing to needs a condition. The optional stopping theorem states: if is a martingale and a stopping time, then
holds under any one of these hypotheses:
- is bounded: for a fixed number ;
- almost surely and the stopped process is dominated: for all , for a fixed (more generally, the family is uniformly integrable);
- and the increments are bounded: .
Example (gambler's ruin): a symmetric walk starts at 0 and stops at , the first time it hits or . The stopped walk stays between and , so the second hypothesis applies, and , where is the probability of reaching first. Hence , without any combinatorics.
The doubling strategy without a round limit shows why the hypotheses matter. Let be the first win. It is a stopping time and finite with probability 1, and , so . The theorem is not contradicted: is unbounded, and before the win the wealth is not bounded below, so no hypothesis holds. With the cap of five rounds, is bounded and the expected gain is 0, as computed above.
Doob's maximal inequality
A martingale also controls how far its path can stray before time , not only where it ends. For a martingale and any , Doob's maximal inequality gives
The second form is the version. Both hold with the maximum replaced by the supremum over for a martingale with continuous paths such as Brownian motion. Example: for the coin-flip walk with , , so the probability that the walk ever reaches distance 30 from the start within 100 steps is at most , and . Inequalities like these are what make limits of martingales, and later the Itô integral, well behaved.
Prices as martingales
Martingales are the language of arbitrage-free pricing. In "Risk-neutral probabilities" the stock was expected to earn the risk-free rate under , which says exactly that the discounted price is a martingale under . A later lesson in this track, on changing the measure, shows how to move from the real-world measure , under which this fails, to , under which it holds. A price is then simply the conditional expectation of the discounted payoff.
Summary
- is the -measurable random variable with the same average as on every event in ; it obeys linearity, the tower property, taking out what is known, and the independence rule.
- A martingale with respect to is adapted, integrable and satisfies (in continuous time ). and are martingales.
- Betting with predictable stakes on a fair game gives a martingale transform: the expected wealth never changes at a fixed time.
- Optional stopping, , needs a bounded stopping time, a dominated stopped process, or with bounded increments; unlimited doubling violates all three.
- Doob's maximal inequality bounds the whole path: .
The next lesson, "Properties of Brownian motion", studies the paths of in detail, using the martingales and found here.