Home › Probability › Lesson 10

Conditional Expectation and Martingales

Lesson 10 of 12

Key idea of this section

E[X | 𝓖] is the a.s. unique 𝓖-measurable Y with E[Y 1G] = E[X 1G] for all G ∈ 𝓖;
a martingale satisfies E[Mₙ₊₁ | 𝓕ₙ] = Mₙ, and under suitable conditions E MT = E M₀.

Conditioning on a σ-algebra

Elementary conditioning on an event of positive probability does not cover the most important cases, such as conditioning on the value of a continuous random variable, where every individual value has probability zero. Kolmogorov's solution was to condition on a σ-algebra.

Definition 10.1. Let X ∈ L¹(Ω, 𝓕, P) and let 𝓖 ⊆ 𝓕 be a sub-σ-algebra. A conditional expectation of X given 𝓖 is a random variable Y such that (i) Y is 𝓖-measurable and integrable, and (ii) E[Y 1G] = E[X 1G] for every G ∈ 𝓖. We write Y = E[X | 𝓖], and E[X | Z] = E[X | σ(Z)].

Theorem 10.2. Conditional expectation exists and is unique up to almost sure equality.

Proof. Uniqueness: if Y and Y′ both qualify, then G = {Y > Y′} ∈ 𝓖 and E[(Y − Y′) 1G] = 0, forcing P(G) = 0; by symmetry Y = Y′ a.s. Existence for X ∈ L²: the space L²(𝓖) is a closed subspace of the Hilbert space L²(𝓕), and the orthogonal projection Y of X onto it satisfies E[(X − Y)W] = 0 for all W ∈ L²(𝓖), in particular for W = 1G. Existence for X ≥ 0 in L¹ follows by approximating with min(X, n) and monotone convergence, and general X by X = X⁺ − X⁻. (Alternatively, Y is the Radon–Nikodym derivative of the measure G ↦ E[X 1G] with respect to P restricted to 𝓖.) ∎

The projection picture is worth keeping: for X ∈ L², E[X | 𝓖] is the best mean-square predictor of X among 𝓖-measurable variables. When 𝓖 is generated by a finite partition {B₁, …, Bₙ} with P(Bᵢ) > 0, the definition gives the elementary formula E[X | 𝓖] = ∑ᵢ (E[X 1Bᵢ]/P(Bᵢ)) 1Bᵢ. When (X, Z) has joint density f, E[g(X) | Z] = h(Z) with h(z) = ∫ g(x) f(x, z) dx / ∫ f(x, z) dx wherever the denominator is positive.

The essential properties, each provable directly from the definition, are:

linearity and monotonicity;   E[E[X | 𝓖]] = E X
taking out what is known:      E[ZX | 𝓖] = Z E[X | 𝓖] for bounded 𝓖-measurable Z
tower property:                E[E[X | 𝓗] | 𝓖] = E[X | 𝓖] when 𝓖 ⊆ 𝓗
independence:                  E[X | 𝓖] = E X when σ(X) and 𝓖 are independent
conditional Jensen:            φ(E[X | 𝓖]) ≤ E[φ(X) | 𝓖] for convex φ

together with conditional versions of monotone and dominated convergence.

Martingales

Definition 10.3. A filtration is an increasing sequence of σ-algebras 𝓕₀ ⊆ 𝓕₁ ⊆ ⋯ ⊆ 𝓕, representing information available at time n. An adapted integrable sequence (Mₙ) is a martingale if E[Mₙ₊₁ | 𝓕ₙ] = Mₙ for all n, a supermartingale if E[Mₙ₊₁ | 𝓕ₙ] ≤ Mₙ, and a submartingale if E[Mₙ₊₁ | 𝓕ₙ] ≥ Mₙ.

A martingale models the fortune of a gambler in a fair game. Standard examples, with 𝓕ₙ = σ(X₁, …, Xₙ) for independent Xᵢ:

partial sums  Sₙ = X₁ + ⋯ + Xₙ  with E Xᵢ = 0
Sₙ² − nσ²  when the Xᵢ are i.i.d. with mean 0 and variance σ²
products  ∏ᵢ Xᵢ  with Xᵢ ≥ 0 and E Xᵢ = 1;  in particular  exp(θSₙ)/M(θ)ⁿ
Doob martingales  Mₙ = E[Z | 𝓕ₙ]  for any integrable Z
likelihood ratios  ∏ᵢ g(Xᵢ)/f(Xᵢ)  when the Xᵢ have density f and g = 0 wherever f = 0

By the conditional Jensen inequality, a convex function of a martingale is a submartingale (when integrable); for instance |Mₙ| and Mₙ² are submartingales.

Stopping times and optional stopping

Definition 10.4. A random variable T with values in {0, 1, 2, …, ∞} is a stopping time if {T = n} ∈ 𝓕ₙ for every n.

A stopping time is a rule that decides when to stop using only past and present information. The first time a random walk hits a level is a stopping time; the last time it does so is not. The fundamental fact is that one cannot beat a fair game by choosing when to stop, provided the stopping rule is not too wild.

Theorem 10.5 (optional stopping). Let (Mₙ) be a martingale and T a stopping time. Then E MT = E M₀ in each of the following cases: (i) T ≤ N almost surely for a constant N; (ii) T < ∞ a.s. and |Mn∧T| ≤ K for all n, for a constant K; (iii) E T < ∞ and |Mₙ₊₁ − Mₙ| ≤ K for all n.

Proof. (i) Write MT = M₀ + ∑k=1N (Mₖ − Mₖ₋₁) 1{T ≥ k}. The event {T ≥ k} = {T ≤ k − 1}ᶜ belongs to 𝓕ₖ₋₁, so E[(Mₖ − Mₖ₋₁) 1{T ≥ k}] = E[1{T ≥ k} E[Mₖ − Mₖ₋₁ | 𝓕ₖ₋₁]] = 0. (ii) Apply (i) to the bounded stopping time T ∧ n, then let n → ∞ using dominated convergence, since MT∧n → MT a.s. and is bounded by K. (iii) Here |MT∧n − M₀| ≤ K T, which is integrable, so dominated convergence again applies. ∎

The conditions matter. Let Sₙ be a simple symmetric random walk started at 0 and T the first time it reaches 1. Then T < ∞ a.s. (by recurrence, Lesson 11), ST = 1, and E ST = 1 ≠ 0 = E S₀. This is the "doubling strategy" paradox: guaranteed profit requires unbounded credit and has E T = ∞.

Worked example 10.6 (gambler's ruin). A gambler starts with k units and bets one unit at a time, winning with probability p and losing with probability q = 1 − p, until reaching 0 or N. Let T be the stopping time and Sₙ the fortune. In the fair case p = 1/2, Sₙ is a bounded martingale up to T, so k = E ST = N · P(reach N), giving P(reach N) = k/N. Also Sₙ² − n is a martingale with bounded increments up to T, and E T < ∞ (the walk escapes any interval geometrically fast), so E ST² = k² + E T, which gives E T = Nk − k² = k(N − k). In the unfair case, (q/p)Sₙ is a martingale (check: p(q/p) + q(p/q) = q + p = 1), so

P(reach N) = (1 − (q/p)ᵏ) / (1 − (q/p)ᴺ)

With p = 0.4, k = 5 and N = 10, this is (1 − 1.5⁵)/(1 − 1.5¹⁰) = 1/(1 + 1.5⁵) = 32/275 ≈ 0.116, compared with 1/2 in a fair game. A slightly unfavourable game is very likely to ruin a patient player.

Wald's identity is another special case: if X₁, X₂, … are i.i.d. integrable and T is a stopping time with E T < ∞, then E ST = E T · E X₁. A direct proof writes ST = ∑i≥1 Xᵢ 1{T ≥ i}; the event {T ≥ i} lies in 𝓕ᵢ₋₁ and is therefore independent of Xᵢ, so E[|Xᵢ| 1{T ≥ i}] = E|X₁| P(T ≥ i), and these sum to E|X₁| E T < ∞. Fubini's theorem then allows the expectation to be taken term by term, giving E ST = E X₁ ∑ᵢ P(T ≥ i) = E X₁ · E T.

Convergence and inequalities

Theorem 10.7 (Doob's martingale convergence theorem). If (Mₙ) is a supermartingale with supn E Mₙ⁻ < ∞ (for example, a nonnegative supermartingale), then Mₙ converges almost surely to an integrable limit M∞.

The proof counts upcrossings: the number Uₙ[a, b] of times the path crosses from below a to above b by time n satisfies (b − a) E Uₙ[a, b] ≤ E(Mₙ − a)⁻, so for rational a < b only finitely many upcrossings occur, which excludes oscillation. If the martingale is uniformly integrable, convergence also holds in L¹ and Mₙ = E[M∞ | 𝓕ₙ]; if it is bounded in Lᵖ with p > 1, it converges in Lᵖ. Two supporting inequalities are Doob's maximal inequality for a nonnegative submartingale, λ P(maxk≤n Mₖ ≥ λ) ≤ E Mₙ, and the Azuma–Hoeffding inequality, P(Mₙ − M₀ ≥ t) ≤ exp(−t²/(2∑ cₖ²)) when |Mₖ − Mₖ₋₁| ≤ cₖ. The latter is the engine of the concentration-of-measure method in combinatorics and computer science.

Pólya's urn shows a non-degenerate limit. An urn holds one red and one blue ball; repeatedly draw a ball and return it with another of the same colour. The fraction of red balls is a bounded martingale, so it converges almost surely; its limit turns out to be uniformly distributed on (0, 1).

Exercise

  • (a)
    In a fair game starting at k = 3 with absorbing barriers 0 and 10, find the probability of reaching 10 and the expected duration.
  • (b)
    Let Sₙ be a simple symmetric random walk. Show that Sₙ³ − 3nSₙ is a martingale.
  • (c)
    Show that the likelihood-ratio product Lₙ = ∏i≤n g(Xᵢ)/f(Xᵢ), with Xᵢ i.i.d. of density f and g another density such that f is positive wherever g is, satisfies E Lₙ = 1 for all n.
Show solution

Answers: (a) P = 3/10 and E T = 3 × 7 = 21. (b) With Sₙ₊₁ = Sₙ + ξ, E[(Sₙ + ξ)³ | 𝓕ₙ] = Sₙ³ + 3Sₙ (because E ξ = E ξ³ = 0 and E ξ² = 1), and E[3(n + 1)(Sₙ + ξ) | 𝓕ₙ] = 3(n + 1)Sₙ; the difference is Sₙ³ + 3Sₙ − 3(n + 1)Sₙ = Sₙ³ − 3nSₙ. (c) Each factor has mean ∫f>0 (g/f) f dx = ∫f>0 g dx = 1 (because g vanishes where f does), and the factors are independent, so E Lₙ = 1 (indeed Lₙ is a martingale).

V.3.1