Conditional Expectation and Martingales

⚡ Key Takeaways

Conditional expectation E[X∣G]E[X\mid\mathcal{G}] is the best prediction of a random variable XX given the information encoded by a σ\sigma-algebra G\mathcal{G}; it is the unique (a.s.) G\mathcal{G}-measurable, integrable random variable whose averages over G\mathcal{G}-sets match those of XX. A martingale is a stochastic process (Xn)(X_n) that is its own best forecast: E[Xn+1∣Fn]=XnE[X_{n+1}\mid\mathcal{F}_n]=X_n, modeling a fair game. These objects underlie modern probability, stochastic calculus, and mathematical finance, and were forged by Kolmogorov (1933), Lévy, and especially Joseph L. Doob (1940s–50s).

💡 The Core Insight

Information is a σ\sigma-algebra. To "condition on information G\mathcal{G}" is to find the unique random variable that (i) depends only on G\mathcal{G} and (ii) has the same integral as XX on every event you can resolve with G\mathcal{G}. A martingale is the special case where today's value already is the best forecast of tomorrow's — so accumulated forecast errors form an orthogonal, mean-zero sequence, and the laws of large numbers and convergence theorems descend from that structure.

Formal Statement

DefinitionConditional Expectation given a σ-algebra

Let (Ω,F,P)(\Omega,\mathcal{F},P) be a probability space, G⊆F\mathcal{G}\subseteq\mathcal{F} a sub-σ\sigma-algebra, and X∈L1(Ω,F,P)X\in L^1(\Omega,\mathcal{F},P) (i.e. E∣X∣<∞E|X|<\infty). A conditional expectation of XX given G\mathcal{G} is any random variable Y=E[X∣G]Y=E[X\mid\mathcal{G}] satisfying: 1. YY is G\mathcal{G}-measurable; 2. YY is integrable; 3. The partial averaging (defining) identity holds:

1
∫GY dP=∫GX dPfor all G∈G.\quad \int_G Y\,dP = \int_G X\,dP \qquad \text{for all } G\in\mathcal{G}.

Derivation hint: Property (3) is the definition; existence/uniqueness (below) make YY well-defined up to a PP-null set. Symbols: GG ranges over events resolvable by G\mathcal{G}; integrals are Lebesgue integrals against PP. Such YY exists and is unique up to PP-a.s. equality. When G=σ(Z)\mathcal{G}=\sigma(Z) for a random variable ZZ, we write E[X∣Z]E[X\mid Z]; there is a Borel function gg with E[X∣Z]=g(Z)E[X\mid Z]=g(Z) a.s.

TheoremExistence and Uniqueness (Radon–Nikodym / Hilbert projection)

For every X∈L1(P)X\in L^1(P) and sub-σ\sigma-algebra G\mathcal{G}, E[X∣G]E[X\mid\mathcal{G}] exists and is unique up to PP-null sets. For X∈L2(P)X\in L^2(P), E[⋅∣G]E[\cdot\mid\mathcal{G}] is the orthogonal projection of L2(F)L^2(\mathcal{F}) onto the closed subspace L2(G)L^2(\mathcal{G}):

2
E[X∣G]=ΠL2(G)(X)=arg⁡min⁡Y∈L2(G)E[(X−Y)2].\quad E[X\mid\mathcal{G}] = \Pi_{L^2(\mathcal{G})}(X) = \arg\min_{Y\in L^2(\mathcal{G})} E\big[(X-Y)^2\big].

Derivation hint: L2(G)L^2(\mathcal{G}) is a closed subspace of the Hilbert space L2(F)L^2(\mathcal{F}); the projection theorem gives a unique minimizer YY with X−Y⊥L2(G)X-Y\perp L^2(\mathcal{G}), i.e. E[(X−Y)1G]=0E[(X-Y)\mathbf{1}_G]=0, which is exactly [1]. Extend from L2L^2 to L1L^1 by approximation/monotone limits.

DefinitionFiltration, Adapted Process, Martingale

A filtration is an increasing family (Fn)n≥0(\mathcal{F}_n)_{n\ge 0} of sub-σ\sigma-algebras, F0⊆F1⊆⋯⊆F\mathcal{F}_0\subseteq\mathcal{F}_1\subseteq\cdots\subseteq\mathcal{F}, modeling information accumulating over time. A process (Xn)(X_n) is adapted if each XnX_n is Fn\mathcal{F}_n-measurable. An adapted, integrable process is a martingale if

3
E[Xn+1∣Fn]=Xna.s. for all n≥0.\quad E[X_{n+1}\mid\mathcal{F}_n] = X_n \quad\text{a.s. for all } n\ge 0.

Derivation hint: This is the "fair game" axiom. Replacing "==" with "≥\ge" gives a submartingale (favorable game); "≤\le" gives a supermartingale. Taking expectations in [3] gives constant mean E[Xn]=E[X0]E[X_n]=E[X_0]. Equivalently, the increments dn=Xn−Xn−1d_n=X_n-X_{n-1} satisfy E[dn∣Fn−1]=0E[d_n\mid\mathcal{F}_{n-1}]=0 — they form a martingale difference sequence.

TheoremFundamental Properties of Conditional Expectation

Let X,Y∈L1X,Y\in L^1, a,b∈Ra,b\in\mathbb{R}, and H⊆G⊆F\mathcal{H}\subseteq\mathcal{G}\subseteq\mathcal{F}.

4
E[aX+bY∣G]=aE[X∣G]+bE[Y∣G](linearity).\quad E[aX+bY\mid\mathcal{G}] = aE[X\mid\mathcal{G}]+bE[Y\mid\mathcal{G}] \quad\text{(linearity)}.

Derivation hint: Both sides are G\mathcal{G}-measurable and satisfy [1] by linearity of the integral; uniqueness forces equality.

5
E[E[X∣G]∣H]=E[X∣H](tower / smoothing).\quad E\big[E[X\mid\mathcal{G}]\mid\mathcal{H}\big] = E[X\mid\mathcal{H}] \quad\text{(tower / smoothing)}.

Derivation hint: The RHS is H\mathcal{H}-measurable; for H∈H⊆GH\in\mathcal{H}\subseteq\mathcal{G}, ∫HE[X∣G]=∫HX\int_H E[X\mid\mathcal{G}] = \int_H X by [1] (since H∈GH\in\mathcal{G}), matching ∫HE[X∣H]\int_H E[X\mid\mathcal{H}].

6
E[ZX∣G]=Z E[X∣G]if Z is G-measurable, ZX∈L1(taking out what is known).\quad E[ZX\mid\mathcal{G}] = Z\,E[X\mid\mathcal{G}] \quad\text{if } Z \text{ is } \mathcal{G}\text{-measurable, } ZX\in L^1 \quad\text{(taking out what is known)}.

Derivation hint: Verify [1] for Z=1G0Z=\mathbf{1}_{G_0}, G0∈GG_0\in\mathcal{G}, then extend by linearity, monotone convergence, and approximation to general bounded/integrable G\mathcal{G}-measurable ZZ.

7
φ(E[X∣G])≤E[φ(X)∣G]for convex φ(conditional Jensen).\quad \varphi\big(E[X\mid\mathcal{G}]\big) \le E[\varphi(X)\mid\mathcal{G}] \quad\text{for convex } \varphi \quad\text{(conditional Jensen)}.

Derivation hint: Write φ(x)=sup⁡n(anx+bn)\varphi(x)=\sup_n (a_n x+b_n) over supporting lines; apply linearity and monotonicity to anX+bn≤φ(X)a_n X+b_n\le\varphi(X), then take the sup inside via G\mathcal{G}-measurability.

Why It Holds / Derivation

:::proof[Existence of E[X∣G]E[X\mid\mathcal{G}] via Radon–Nikodym] Step 1 (reduce to X≥0X\ge 0). Write X=X+−X−X=X^+-X^-; treat each part, then subtract using linearity. Assume X≥0X\ge 0, E[X]<∞E[X]<\infty.

Step 2 (build a measure). Define ν(G)=∫GX dP\nu(G)=\int_G X\,dP for G∈GG\in\mathcal{G}. Then ν\nu is a finite measure on (Ω,G)(\Omega,\mathcal{G}), and ν(G)=0\nu(G)=0 whenever P(G)=0P(G)=0, so ν≪P∣G\nu\ll P|_{\mathcal{G}} (absolute continuity).

Step 3 (Radon–Nikodym). By the Radon–Nikodym theorem there is a G\mathcal{G}-measurable density Y=dνdP∣G≥0Y=\dfrac{d\nu}{dP|_{\mathcal{G}}}\ge 0 with

8
ν(G)=∫GY dPfor all G∈G.\quad \nu(G)=\int_G Y\,dP \quad\text{for all }G\in\mathcal{G}.

Derivation hint: This is exactly [1] with ν(G)=∫GX dP\nu(G)=\int_G X\,dP. The density is G\mathcal{G}-measurable because ν,P∣G\nu, P|_{\mathcal{G}} live on G\mathcal{G}.

Step 4 (integrability and uniqueness). Taking G=ΩG=\Omega gives E[Y]=E[X]<∞E[Y]=E[X]<\infty, so Y∈L1Y\in L^1. If Y1,Y2Y_1,Y_2 both satisfy [1], then ∫G(Y1−Y2) dP=0\int_G (Y_1-Y_2)\,dP=0 for all G∈GG\in\mathcal{G}; choosing G={Y1>Y2}∈GG=\{Y_1>Y_2\}\in\mathcal{G} forces P(Y1>Y2)=0P(Y_1>Y_2)=0, and symmetrically, so Y1=Y2Y_1=Y_2 a.s. ■\qquad\blacksquare

ProofDoob's Martingale Convergence Theorem (upcrossing argument)

Claim. If (Xn)(X_n) is a martingale (or supermartingale) with sup⁡nE[Xn−]<∞\sup_n E[X_n^-]<\infty (equivalently sup⁡nE∣Xn∣<∞\sup_n E|X_n|<\infty), then Xn→X∞X_n\to X_\infty a.s. with X∞∈L1X_\infty\in L^1.

Step 1 (upcrossings). For reals a<ba<b, let Un[a,b]U_n[a,b] be the number of times (Xk)k≤n(X_k)_{k\le n} crosses upward from below aa to above bb. Doob's upcrossing inequality states

9
(b−a) E[Un[a,b]]≤E[(Xn−a)−]≤∣a∣+E∣Xn∣.\quad (b-a)\,E\big[U_n[a,b]\big]\le E\big[(X_n-a)^-\big]\le |a|+E|X_n|.

Derivation hint: Build a predictable 0/10/1 "betting" strategy CkC_k that buys below aa and sells above bb; the resulting gain (C⋅X)n=∑kCk(Xk−Xk−1)(C\cdot X)_n=\sum_k C_k(X_k-X_{k-1}) is a supermartingale with mean ≤0\le 0, and each completed upcrossing contributes at least (b−a)(b-a).

Step 2 (finite upcrossings). Let U∞[a,b]=lim⁡nUn[a,b]U_\infty[a,b]=\lim_n U_n[a,b]. Monotone convergence in [9] gives (b−a)E[U∞[a,b]]≤∣a∣+sup⁡nE∣Xn∣<∞(b-a)E[U_\infty[a,b]]\le |a|+\sup_n E|X_n|<\infty, so U∞[a,b]<∞U_\infty[a,b]<\infty a.s.

Step 3 (rule out oscillation). On the event {lim inf⁡Xn<lim sup⁡Xn}\{\liminf X_n < \limsup X_n\} there exist rationals a<ba<b with lim inf⁡<a<b<lim sup⁡\liminf<a<b<\limsup, forcing U∞[a,b]=∞U_\infty[a,b]=\infty. Taking the union over countably many rational pairs, P(lim inf⁡Xn<lim sup⁡Xn)=0P(\liminf X_n<\limsup X_n)=0, so Xn→X∞∈[−∞,∞]X_n\to X_\infty\in[-\infty,\infty] a.s.

Step 4 (integrability). Fatou's lemma: E∣X∞∣≤lim inf⁡E∣Xn∣≤sup⁡nE∣Xn∣<∞E|X_\infty|\le\liminf E|X_n|\le\sup_n E|X_n|<\infty, so X∞X_\infty is finite a.s. and in L1L^1. ■\qquad\blacksquare

∎
mathematician · Joseph Leo Doob | 1910–2004

Doob, working at the University of Illinois, transformed an informal "fair game" idea (named after a French betting strategy) into a rigorous theory between 1940 and 1953, culminating in his monograph Stochastic Processes (1953). He proved the martingale convergence theorem, the optional stopping theorem, the maximal and LpL^p inequalities, and the Doob–Meyer decomposition. He insisted on σ\sigma-algebras as the carrier of information and on conditional expectation as a projection — a viewpoint that made stochastic analysis possible. Paul Lévy independently developed closely related ideas; Kolmogorov's 1933 Grundbegriffe had supplied the measure-theoretic foundation via Radon–Nikodym.

Building Intuition

🧠 Intuition

Think of G\mathcal{G} as a blurry photograph of Ω\Omega: you can only distinguish events G\mathcal{G} can resolve. E[X∣G]E[X\mid\mathcal{G}] replaces XX by its average within each cell of the blur — constant on indistinguishable outcomes, but matching the true average over every region you can see (that is [1]). In L2L^2 this is literally dropping a perpendicular: E[X∣G]E[X\mid\mathcal{G}] is the closest G\mathcal{G}-measurable shadow of XX, and the error X−E[X∣G]X-E[X\mid\mathcal{G}] is orthogonal to everything you know. A martingale is then a process where the best guess of tomorrow, using all of today's information, equals today's value. The increments are pure "surprise": uncorrelated with the past and mean-zero. Because surprises orthogonally accumulate, the variance grows additively (like a random walk), yet the upcrossing argument shows a martingale cannot oscillate forever without unbounded energy — hence convergence. The tower property [5] is the formal statement that "coarsening a refined forecast gives the coarse forecast": you cannot gain by predicting your own prediction.

Figure
Conditional expectation as averaging over a partition; martingale as a constant-mean random walk

```svg

Conditional expectation: average X over each cell of the σ-algebra G G1 G2 G3 X(ω) E[X|G] Martingale: E[X_{n+1}|F_n]=X_n mean level E[X0] n=0 n Increments d_n = X_n − X_{n−1} are mean-zero given the past. Constant expectation; no drift; bounded in L¹ ⇒ converges a.s. Gold step matches the gray curve's average on each cell: ∫_{Gi} E[X|G] dP = ∫_{Gi} X dP (partial averaging).

```

Worked Examples

ExampleConditional expectation given a discrete partition

Given. Roll a fair die, Ω={1,…,6}\Omega=\{1,\dots,6\} each with P=16P=\tfrac16. Let X(ω)=ω2X(\omega)=\omega^2 (the squared face). Let G=σ({1,2,3},{4,5,6})\mathcal{G}=\sigma(\{1,2,3\},\{4,5,6\}) — you only learn "low" vs "high".

Steps.

  • G\mathcal{G} has two atoms: L={1,2,3}L=\{1,2,3\}, H={4,5,6}H=\{4,5,6\}, each with P=12P=\tfrac12.
  • On an atom AA, E[X∣G]=1P(A)∫AX dP=∑ω∈AX(ω)∣A∣E[X\mid\mathcal{G}]=\dfrac{1}{P(A)}\int_A X\,dP = \dfrac{\sum_{\omega\in A}X(\omega)}{|A|}.
  • Low: 1+4+93=143\dfrac{1+4+9}{3}=\dfrac{14}{3}. High: 16+25+363=773\dfrac{16+25+36}{3}=\dfrac{77}{3}.

Check [1] on Ω\Omega. E[E[X∣G]]=12⋅143+12⋅773=916E\big[E[X\mid\mathcal{G}]\big]=\tfrac12\cdot\tfrac{14}{3}+\tfrac12\cdot\tfrac{77}{3}=\tfrac{91}{6}, and E[X]=1+4+9+16+25+366=916.E[X]=\tfrac{1+4+9+16+25+36}{6}=\tfrac{91}{6}. ✓

E[X∣G]=143 1{1,2,3}+773 1{4,5,6}≈4.67 on low, 25.67 on high (dimensionless)\boxed{E[X\mid\mathcal{G}] = \tfrac{14}{3}\,\mathbf{1}_{\{1,2,3\}} + \tfrac{77}{3}\,\mathbf{1}_{\{4,5,6\}}\approx 4.67\text{ on low, }25.67\text{ on high (dimensionless)}}
ExampleOptional stopping for a gambler's fair random walk

Given. Xn=∑k=1nξkX_n=\sum_{k=1}^n \xi_k with i.i.d. ξk=±1\xi_k=\pm 1 each prob 12\tfrac12, X0=0X_0=0 (symmetric simple random walk; a martingale since E[ξk]=0E[\xi_{k}]=0). Start with capital that lets you bet between barriers −a-a and +b+b (a,b>0a,b>0 integers). Let T=inf⁡{n:Xn=−a or Xn=b}T=\inf\{n: X_n=-a \text{ or } X_n=b\}, the first hit of a barrier.

Steps.

  • TT is a stopping time and E[T]<∞E[T]<\infty (finite expected exit time for bounded walk), with ∣Xn∧T∣≤max⁡(a,b)|X_{n\wedge T}|\le\max(a,b), so the Optional Stopping Theorem applies:
10
E[XT]=E[X0]=0.\quad E[X_T]=E[X_0]=0.

Derivation hint: (Xn∧T)(X_{n\wedge T}) is a bounded martingale; uniform integrability/bounded convergence gives E[XT]=lim⁡nE[Xn∧T]=E[X0]E[X_T]=\lim_n E[X_{n\wedge T}]=E[X_0].

  • Let p=P(hit b first)p=P(\text{hit }b\text{ first}), so 1−p=P(hit −a first)1-p=P(\text{hit }-a\text{ first}). Then E[XT]=p⋅b+(1−p)(−a)=0E[X_T]=p\cdot b+(1-p)(-a)=0.
  • Solve: pb=(1−p)a⇒p=aa+bpb=(1-p)a\Rightarrow p=\dfrac{a}{a+b}.
  • Expected duration via the martingale Xn2−nX_n^2-n (since E[Xn2−n]E[X_n^2-n] is constant): E[T]=E[XT2]=p b2+(1−p)a2=aa+bb2+ba+ba2=ab.E[T]=E[X_T^2]=p\,b^2+(1-p)a^2=\dfrac{a}{a+b}b^2+\dfrac{b}{a+b}a^2=ab.

Numbers. With a=3a=3, b=5b=5:

P(reach +5)=38=0.375,E[T]=3⋅5=15 steps\boxed{P(\text{reach }+5)=\dfrac{3}{8}=0.375,\quad E[T]=3\cdot 5=15\text{ steps}}

Common Misconceptions

⚠️ Common mistake

Conditional expectation is a random variable, not a number. E[X∣G]E[X\mid\mathcal{G}] is a function on Ω\Omega, G\mathcal{G}-measurable. Only E[X∣Y=y]E[X\mid Y=y] for a fixed value yy is a number. Confusing the two breaks the tower property.

Optional stopping needs a hypothesis. E[XT]=E[X0]E[X_T]=E[X_0] can FAIL for unbounded TT or unbounded Xn∧TX_{n\wedge T}. One sufficient condition: TT bounded; or E[T]<∞E[T]<\infty with bounded increments; or (Xn∧T)(X_{n\wedge T}) uniformly integrable.

Martingale ≠ Markov, and Markov ≠ martingale. A martingale is defined by a mean condition relative to the whole filtration; a Markov process is defined by distributional memorylessness. Each can hold without the other.

E[X∣G]E[X\mid\mathcal{G}] depends on PP, not just on G\mathcal{G} and XX. Changing the measure (e.g. a Girsanov change) changes conditional expectations and can turn a non-martingale into a martingale.

CounterexampleA martingale where naive optional stopping fails — the doubling strategy

Let XnX_n be a fair random walk and consider the gambler who doubles the bet after each loss until the first win, stopping at T=inf⁡{n:first win}T=\inf\{n:\text{first win}\}. The wealth process is a martingale and T<∞T<\infty a.s., yet XT=+1X_T=+1 deterministically, so E[XT]=1≠0=E[X0]E[X_T]=1\neq 0=E[X_0]. Optional stopping is violated because (Xn∧T)(X_{n\wedge T}) is not uniformly integrable: the potential losses before stopping are unbounded. This is precisely why casinos impose table limits and why "sure-win" systems require infinite capital.

Connections

connection

Conditional expectation is the analytic backbone of Bayesian Inference (posterior means are conditional expectations) and of Filtering Theory (the Kalman filter computes E[state∣observations]E[\text{state}\mid\text{observations}]). Through [2], it ties probability to Hilbert Space Projection and the geometry of L2L^2. Martingales generalize sums of independent mean-zero variables, refining the Law of Large Numbers and the Central Limit Theorem (via the martingale CLT). The Doob–Meyer decomposition links submartingales to Stochastic Integration and the Itô Calculus, where the integral ∫H dM\int H\,dM against a martingale is again a martingale. Optional stopping connects to Potential Theory (harmonic functions of Brownian motion are martingales) and to the theory of Markov Processes via the generator and Dynkin's formula.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1654 — Pascal–Fermat correspondence on the "problem of points" computes fair-division expectations: the embryo of conditional expectation and fair games.
- 1900 — Louis Bachelier models stock prices by Brownian motion, implicitly using the martingale (fair-game) property in Théorie de la spéculation.
- 1909–1912 — Émile Borel and others develop measure theory; the term martingale (a doubling betting system) enters probabilistic vocabulary.
- 1933 — Kolmogorov's Grundbegriffe der Wahrscheinlichkeitsrechnung gives the measure-theoretic foundation and defines conditional expectation via Radon–Nikodym.
- 1934–1940 — Paul Lévy studies sums of dependent variables and "conditionally centered" sequences, proving early convergence results (Lévy's martingale convergence / 0–1 law).
- 1940 — J. L. Doob introduces and names the systematic theory of martingales, proving convergence and inequalities.
- 1953 — Doob's Stochastic Processes codifies optional stopping, maximal inequalities, LpL^p inequalities, and regularization.
- 1962–1963 — Paul-André Meyer and the Strasbourg school develop the Doob–Meyer decomposition and the "general theory of processes," enabling continuous-time stochastic integration.
- 1979–1981 — Harrison, Kreps, and Pliska recast option pricing entirely in martingale terms, launching modern quantitative finance.

Subtleties & Limits

open-problem

Regular conditional distributions need not exist in pathological (non-Polish) spaces; the standard guarantee requires the underlying space to be a standard Borel space. Constructing them in greater generality, and understanding when "disintegration" fails, remains technically delicate.

Continuous-time foundations require the "usual conditions" (right-continuity and completeness of the filtration) and notions of predictability; the choice of filtration is not innocent, and questions about enlargement of filtrations (initial vs progressive) and their effect on the martingale property are an active research area (informed trading, insider information models).

Branching-measure and noncommutative analogues. Free-probability martingales and quantum (von Neumann algebra) conditional expectations generalize [1]–[2] to noncommutative LpL^p spaces; sharp constants in noncommutative Burkholder–Davis–Gundy and Doob inequalities are still being refined.

Optimal constants in classical martingale inequalities (Doob's LpL^p maximal inequality, Burkholder's sharp constants for martingale transforms and the UMD property) connect to deep problems in harmonic analysis (the Beurling–Ahlfors transform), where exact best constants remain partly conjectural.

See Also

Brownian Motion · Optional Stopping Theorem · Burkholder–Davis–Gundy Inequalities · Radon–Nikodym Theorem · Filtration · Uniform Integrability · Girsanov Theorem · Martingale Representation Theorem