Conditional expectation, martingales and optional stopping, the Itô integral and Itô’s formula.
43 min read · Updated Oct 20, 2026
Read with Øksendal, Stochastic Differential Equations, chapters 3 (the Itô integral) and 4 (Itô's formula and the martingale representation theorem); Shreve, Stochastic Calculus for Finance II, chapters 2 (information and conditioning) and 4 (stochastic calculus); and Taylor II, chapter 11 (the stochastic integral and Itô's formula in the setting of Wiener measure). Karatzas and Shreve, Brownian Motion and Stochastic Calculus, is the thorough reference. This chapter proves the properties of conditional expectation, optional stopping for bounded stopping times and Doob's L2 maximal inequality in discrete time, the Itô isometry, the computation of ∫BdB, and Itô's formula for f(Bt) with f∈Cb3; the density of simple processes, Lévy's characterisation and Girsanov's theorem are stated.
Brownian paths have infinite length (6D.1 Brownian Motion), so the integral ∫0tf(s)dBs cannot be defined path by path, as a Riemann–Stieltjes integral. Kiyosi Itô's idea (1944) was to define it as a limit in L2(P), using the independence of Brownian increments from the past, and to evaluate the integrand at the left endpoint of each time step: you choose how much to bet before you see the outcome. The resulting integral is a martingale, a fair game, and it obeys a new chain rule, Itô's formula, with an extra second-order term coming from (dB)2=dt:
df(Bt)=f′(Bt)dBt+21f′′(Bt)dt.
That extra term is where the Laplacian enters probability, and through it the heat equation. It is also the term that makes the Black–Scholes equation (6D.6 Black–Scholes) a heat equation rather than a transport equation.
By the end of this chapter you will be able to:
define conditional expectation, as an L2 projection and in general, and compute with it;
define martingales and stopping times, prove optional stopping for bounded stopping times, and explain why the doubling strategy fails;
prove Doob's L2 maximal inequality;
define the Itô integral, prove the Itô isometry, and compute ∫0tBdB=21(Bt2−t);
prove Itô's formula for f(Bt), and use its multidimensional form for Itô processes;
state Girsanov's theorem and verify it for the one-dimensional marginal.
In eighteenth-century France a "martingale" was a betting system: bet one unit on a fair coin; after each loss, double the bet; stop at the first win. Whenever you win, you recover all previous losses plus one unit, so the strategy seems to guarantee a profit of 1. The catch is that the losing streak before the first win can be long, and with k losses in a row you have lost 2k−1 units. Your expected capital at the stopping time is 1, but your expected maximum loss along the way is infinite, and with any finite bankroll or table limit the strategy has expected gain exactly zero (Exercise 2.15).
Jean Ville borrowed the word in 1939 for the mathematical notion of a fair game, and Joseph Doob built the theory of martingales in the 1940s, culminating in his 1953 book Stochastic Processes. The optional stopping theorem of this chapter is the precise statement that no strategy of stopping a fair game, using only past information and within bounded time, changes its expected value. In finance this is the absence of arbitrage: under the right probability measure, discounted prices are martingales, and no trading strategy makes money from nothing (6D.6 Black–Scholes).
Let (Ω,F,P) be a probability space and G⊆F a sub-σ-algebra, representing partial information: an event in G is one whose occurrence we know.
Definition 2.1Conditional expectation
For X∈L1(P), the conditional expectationE[X∣G] is the (almost surely unique) G-measurable integrable random variable Y with
E[Y1A]=E[X1A]for every A∈G.
Existence. For X∈L2, L2(Ω,G,P) is a closed subspace of L2(Ω,F,P), and the orthogonal projection Y of X onto it (4A.5 Hilbert Spaces and Lax–Milgram) satisfies E[(X−Y)Z]=0 for every G-measurable Z∈L2, in particular Z=1A. So E[X∣G] is the best prediction of X in mean square given the information G. For X≥0 in L1, the measure ν(A)=E[X1A] on G is absolutely continuous with respect to P, and Y=dν/dP (Radon–Nikodym, 3A.4 Measures, Probability and Weights); split a general X into positive and negative parts. Uniqueness: if Y,Y′ both qualify, E[(Y−Y′)1A]=0 for A={Y>Y′}∈G, so Y≤Y′ almost surely, and symmetrically.
Proposition 2.2Properties of conditional expectation
For integrable X, Y and sub-σ-algebras H⊆G:
(linearity and positivity) E[aX+bY∣G]=aE[X∣G]+bE[Y∣G]; if X≥0 then E[X∣G]≥0;
(tower) E[E[X∣G]∣H]=E[X∣H], and E[E[X∣G]]=EX;
(taking out what is known) if Z is G-measurable and ZX integrable, E[ZX∣G]=ZE[X∣G];
(independence) if X is independent of G, E[X∣G]=EX;
(Jensen) for convex φ with φ(X) integrable, φ(E[X∣G])≤E[φ(X)∣G].
Proof. Each is checked against the definition. (1) Both sides are G-measurable with the same integrals over A∈G; positivity is the uniqueness argument. (2) For A∈H⊆G, E[E[X∣G]1A]=E[X1A]; take H trivial for the second statement. (3) For Z=1B with B∈G, E[1BE[X∣G]1A]=E[X1A∩B]=E[1BX1A]; extend to simple Z by linearity and to general Z by monotone or dominated convergence. (4) E[X1A]=EX⋅P(A) by independence, which is the integral of the constant EX over A. (5) A convex φ is the supremum of countably many affine functions ℓk(x)=akx+bk; by (1), ℓk(E[X∣G])=E[ℓk(X)∣G]≤E[φ(X)∣G] almost surely, for all k simultaneously; take the supremum.
A filtration is an increasing family of σ-algebras (Ft)t≥0, the information available at time t. For Brownian motion we use Ft=σ(Bs:s≤t) (completed by the null sets). A process Xt is adapted if each Xt is Ft-measurable: its value at time t is known at time t.
Definition 2.3Martingales
An adapted process X with E∣Xt∣<∞ is a martingale if E[Xt∣Fs]=Xs for all s≤t; a submartingale if E[Xt∣Fs]≥Xs; a supermartingale if ≤. The same definitions apply in discrete time, t∈{0,1,2,…}.
Example 2.4Brownian martingales
The processes Bt, Bt2−t and exp(θBt−2θ2t) (θ∈R) are martingales. For s<t, write Bt=Bs+Δ with Δ=Bt−Bs∼N(0,t−s) independent of Fs. Then E[Bt∣Fs]=Bs+EΔ=Bs; E[Bt2∣Fs]=Bs2+2BsEΔ+EΔ2=Bs2+t−s; and E[eθBt∣Fs]=eθBsEeθΔ=eθBseθ2(t−s)/2, using properties 3 and 4 and the Gaussian moment generating function. The third is the exponential martingale; its expectation is 1, and it will be the density in Girsanov's theorem.
A stopping time is a random time τ with {τ≤t}∈Ft for all t: whether you have stopped by time t is decided by what you have seen by time t. Hitting times of closed sets by continuous adapted processes are stopping times; "the last time B is at 0 before time 1" is not.
Theorem 2.5Optional stopping for bounded stopping times
Let (Xn) be a discrete-time martingale and τ a stopping time with τ≤N. Then EXτ=EX0. For a submartingale, EXτ≥EX0.
Proof. Write Xτ=X0+∑k=0N−11{τ>k}(Xk+1−Xk) (the increments are counted while you are still playing). The event {τ>k}={τ≤k}c is in Fk, so by the tower property and taking out what is known,
The proof is a theorem about betting: 1{τ>k} is a strategy (play or not) decided with the information at time k, and a strategy applied to a fair game gives a fair game. The same proof shows that ∑kHk(Xk+1−Xk) is a martingale for every bounded adapted "betting strategy" H: the martingale transform, the discrete Itô integral. For continuous-time martingales with continuous paths and bounded stopping times, optional stopping follows by approximating τ from above by stopping times with values in a finite grid (statement; Karatzas and Shreve, section 1.3). For unbounded τ it can fail (Exercise 2.15); one usually applies it to τ∧n and lets n→∞ with a convergence theorem.
Theorem 2.6Doob's L2 maximal inequality
For a discrete-time martingale (Xk) with EXn2<∞,
E[k≤nmaxXk2]≤4E[Xn2].
The same holds for continuous-time martingales with continuous paths, with supt≤T in place of maxk≤n.
Proof. Let M=maxk≤n∣Xk∣ and, for λ>0, τ=min{k:∣Xk∣≥λ}. By Jensen's inequality (property 5), ∣Xk∣≤E[∣Xn∣∣Fk], and {τ=k}∈Fk, so
Multiply by 2, integrate in λ from 0 to ∞, and use EM2=∫0∞2λP(M≥λ)dλ and Fubini: EM2≤2E[∣Xn∣M]≤2(EXn2)1/2(EM2)1/2. Since EM2≤∑kEXk2<∞, divide. For continuous paths, apply the discrete inequality on finite subsets of [0,T] increasing to a dense set, and use monotone convergence.
Fix T>0. Let Lad2 be the space of processes f(t,ω), 0≤t≤T, that are adapted (and jointly measurable in (t,ω), more precisely progressively measurable) with E∫0Tf(t)2dt<∞. A simple process has the form
with each ej an Ftj-measurable random variable in L2. Its Itô integral is the obvious sum, with the integrand frozen at the left endpoint:
∫0TϕdB=j∑ej(Btj+1−Btj).
Theorem 2.7The Itô isometry
For simple ϕ, E∫0TϕdB=0 and
E[(∫0TϕdB)2]=E∫0Tϕ(t)2dt.
Proof. Let Δj=Btj+1−Btj, independent of Ftj, with mean 0 and variance tj+1−tj. Then E[ejΔj]=E[ejE[Δj∣Ftj]]=0. For the square, expand (∑jejΔj)2. Diagonal terms: E[ej2Δj2]=E[ej2E[Δj2∣Ftj]]=E[ej2](tj+1−tj). Cross terms with i<j: eiejΔi is Ftj-measurable, so E[eiejΔiΔj]=E[eiejΔiE[Δj∣Ftj]]=0. Summing, E(∫ϕdB)2=∑jE[ej2](tj+1−tj)=E∫0Tϕ2dt.
The left-endpoint rule is what makes the cross terms vanish: each bet ej is placed before the increment Δj it multiplies is revealed. So the Itô integral is a linear isometry from simple processes, with the norm of L2(Ω×[0,T]), into L2(Ω).
Extension. Simple processes are dense in Lad2 (statement; Øksendal, Lemma 3.1.5. For f adapted with continuous bounded paths it is elementary: ϕn=∑jf(tj)1(tj,tj+1] on finer and finer partitions converges to f in L2(Ω×[0,T]) by dominated convergence.) A linear isometry extends uniquely to the closure (4A.1 Banach Spaces and Bounded Operators), so for f∈Lad2
∫0TfdB=n→∞lim∫0TϕndBin L2(P),
for any simple ϕn→f in Lad2, and the isometry E(∫fdB)2=E∫f2dt and E∫fdB=0 persist.
Proposition 2.8The Itô integral is a continuous martingale
For f∈Lad2, the process It=∫0tfdB (that is, ∫0Tf1[0,t]dB) has a version with continuous paths, and it is a martingale with EIt2=E∫0tf2ds.
Proof. For simple ϕ, It is a finite sum of terms ej(Btj+1∧t−Btj∧t), continuous in t, and the martingale property follows from the computation in the proof of Theorem 2.7 (conditioning on Fs kills the increments after s). For general f, choose simple ϕn with E∫0T(ϕn−f)2≤8−n. Then I(n)−I(n+1) is a continuous martingale, and by Doob's inequality and the isometry,
By Borel–Cantelli the I(n) converge uniformly on [0,T] almost surely, to a continuous process which equals It almost surely for each t. Martingale properties pass to L2 limits.
Example 2.9∫BdB
Let Π be a partition of [0,t] and ϕ=∑iBti1(ti,ti+1], which converges to B in Lad2 as ∣Π∣→0. Using a(b−a)=21(b2−a2)−21(b−a)2,
Ordinary calculus would give 21Bt2. The correction −21t is the quadratic variation, and it is needed: the left side is a martingale with mean zero, and E21Bt2=2t. Evaluating at midpoints instead gives 21Bt2 (Exercise 2.17): that is the Stratonovich integral, which obeys the ordinary chain rule but is not a martingale.
First sum. It is the Itô integral of the simple process ∑if′(Bti)1(ti,ti+1], which converges to f′(Bs) in Lad2 as ∣Π∣→0 (by continuity of paths and dominated convergence, as f′ is bounded). By the isometry, the first sum converges in L2 to ∫0tf′(Bs)dBs.
Second sum. Write Δi2=δi+(Δi2−δi). The part with δi is a Riemann sum of the continuous function s↦f′′(Bs) and converges to ∫0tf′′(Bs)ds for every path. For the rest, let gi=f′′(Bti), bounded and Fti-measurable. The terms gi(Δi2−δi) have mean zero and are uncorrelated (for i<j, condition on Ftj: E[Δj2−δj∣Ftj]=0), so
So, along a sequence of partitions with mesh tending to zero, the right side converges in L1 to ∫0tf′(B)dB+21∫0tf′′(B)ds, while the left side does not depend on Π. This proves the formula almost surely for each fixed t; both sides are continuous in t (the stochastic integral by Proposition 2.8), so it holds for all t simultaneously, almost surely.
The formula holds for all f∈C2 (approximate f by functions in Cb3, and localise with stopping times to handle growth; Øksendal, section 4.1). Note the structure: f(Bt)−21∫0tf′′(Bs)ds is a martingale. The operator 21dx2d2 appearing here is the generator of Brownian motion, and this martingale property is the bridge from probability to PDE that 6D.3 Stochastic Differential Equations and Feynman–Kac exploits.
Itô processes and the general formula. An Itô process is
with adapted μ, σ (integrable and square-integrable in time). For several Brownian motions B1,…,Bm and X with values in Rn, dXi=μidt+σαidBα. The general Itô formula (statement; Øksendal, Theorem 4.2.1) says that for f(t,x) of class C1,2,
df(t,Xt)=∂tfdt+∂ifdXi+21∂ijfdXidXj,
where the products are computed by the rules dt⋅dt=dt⋅dBα=0 and dBαdBβ=δαβdt, so dXidXj=(σσT)ijdt. The multiplication table is the quadratic variation theorem in shorthand, extended to independent Brownian motions (whose cross variation vanishes). A useful special case is the product ruled(XY)=XdY+YdX+dXdY.
Example 2.11Geometric Brownian motion
Let St=S0exp(σBt+(μ−21σ2)t), so St=f(t,Bt) with f(t,x)=S0eσx+(μ−σ2/2)t. Then ∂tf=(μ−21σ2)f, ∂xf=σf, ∂xxf=σ2f, and Itô's formula gives
This is the model of a stock price with expected return μ and volatility σ used in 6D.6 Black–Scholes. The −21σ2 in the exponent is the Itô correction: the median of St grows at rate μ−21σ2, while its mean grows at rate μ (ESt=S0eμt, by the exponential martingale). With σ=0.2 and μ=0.05, the typical path grows at 3% a year while the average grows at 5%, the difference being made up by rare large outcomes.
Two more theorems complete the toolkit; we state them.
Theorem 2.12Lévy's characterisation (statement)
A continuous martingale Mt with M0=0 such that Mt2−t is also a martingale is a Brownian motion.
Theorem 2.13Girsanov's theorem (statement)
Let θ be a constant (or a bounded adapted process), and
ZT=exp(−θBT−21θ2T),dQ=ZTdP on FT.
Then Q is a probability measure, and under Q the process B~t=Bt+θt, 0≤t≤T, is a Brownian motion.
Under P, B~ is a Brownian motion with driftθ. Girsanov's theorem says a drift can be removed by re-weighting the paths, with the exponential martingale as weight. For the one-dimensional marginal this is a completion of the square (Exercise 2.19); for the whole path it follows from Lévy's characterisation. In finance this is the passage from the real-world measure, under which stocks drift at their expected return μ, to the risk-neutral measure, under which they drift at the interest rate r (6D.6 Black–Scholes). Robert Cameron and William Martin found the deterministic-drift case in 1944, and Igor Girsanov the general one in 1960.
Where this goesItô calculus in the rest of Course 6
6D.3 Stochastic Differential Equations and Feynman–Kac uses Itô's formula to solve stochastic differential equations and to prove the Feynman–Kac formula; 6D.6 Black–Scholes uses the product rule, Girsanov and the martingale property to price options; 6D.8 Stochastic Control and the HJB Equation uses Itô's formula for controlled processes to derive the Hamilton–Jacobi–Bellman equation. On a Riemannian manifold, Brownian motion is characterised by the martingale property of f(Xt)−21∫0tΔgf(Xs)ds (Exercise 2.21), which is how probabilists build it and how heat kernel estimates on manifolds (9B.7 The Heat Equation on a Manifold) acquire probabilistic proofs.
Jean Ville introduced martingales into probability in 1939, and Joseph Doob developed their theory, with the maximal inequality and the stopping theorems, in the 1940s and in his 1953 book. Kiyosi Itô defined the stochastic integral in 1944 and proved his formula in 1951. In 2000, a sealed envelope that the young mathematician Wolfgang Doeblin had deposited with the Paris Academy of Sciences in 1940, shortly before his death as a soldier, was opened; it contained a version of the change of variables formula for diffusions, which is why some authors (Shreve among them) speak of the Itô–Doeblin formula. Ruslan Stratonovich introduced his integral in the 1960s. Cameron and Martin (1944) and Girsanov (1960) proved the change of measure theorems.
RecallWhere we stand
Conditional expectation E[X∣G] is the G-measurable variable with the same integrals over G-sets: an L2 projection, with the tower, known-factor, independence and Jensen properties. Martingales are fair games; bounded stopping cannot change their expectation (optional stopping), and EmaxXk2≤4EXn2 (Doob). The Itô integral, built from left-endpoint sums, is an isometry E(∫fdB)2=E∫f2dt and a continuous martingale; ∫0tBdB=21(Bt2−t). Itô's formula df(B)=f′(B)dB+21f′′(B)dt follows from Taylor's theorem and (dB)2=dt, and in general df=∂tfdt+∂ifdXi+21∂ijfdXidXj. Geometric Brownian motion solves dS=μSdt+σSdB. Girsanov's theorem removes a drift by the density e−θBT−θ2T/2. 6D.3 Stochastic Differential Equations and Feynman–Kac solves stochastic differential equations and connects their expectations to parabolic PDE.
For s<t, compute E[Bt3∣Fs], and deduce that Bt3−3tBt is a martingale.
Solution
With Bt=Bs+Δ: E[(Bs+Δ)3∣Fs]=Bs3+3Bs2EΔ+3BsEΔ2+EΔ3=Bs3+3(t−s)Bs. So E[Bt3−3tBt∣Fs]=Bs3+3(t−s)Bs−3tBs=Bs3−3sBs.
Exercise 2.15Why doubling fails
In the doubling strategy on a fair coin, let Xn be the gambler's net gain after n tosses (with play stopped at the first win), and τ the time of the first win. (a) Show that (Xn) is a martingale and Xτ=1 almost surely, so EXτ=EX0. Which hypothesis of Theorem 2.5 fails? (b) If the gambler must stop after N tosses whatever happens, compute EXτ∧N directly.
Solution
(a) The bet at time k is Hk=2k if no win yet (decided at time k), so X is a martingale transform of a fair game, hence a martingale. At the first win at toss τ, the net is 2τ−1−(1+2+⋯+2τ−2)=1. τ is finite but unbounded. (b) Xτ∧N=1 with probability 1−2−N, and −(2N−1) with probability 2−N (all N tosses lost). So EXτ∧N=1−2−N−(1−2−N)=0, as optional stopping says.
Exercise 2.16The Laplace transform of a hitting time
For a>0 and λ>0, apply optional stopping to the martingale eθBt−θ2t/2 with θ=2λ at the bounded times τa∧n, and let n→∞ to show Ee−λτa=e−a2λ.
Solution
Eexp(θBτa∧n−λ(τa∧n))=1. Up to τa, B≤a, so the integrand is at most eθa; as n→∞ it tends to eθa−λτa on {τa<∞} (probability 1, 6D.1 Brownian Motion). By dominated convergence, eθaEe−λτa=1.
Exercise 2.17The midpoint rule
For a partition of [0,t] with midpoints mi=2ti+ti+1, show that ∑iBmi(Bti+1−Bti)→21Bt2 in L2. (Write Bmi=Bti+(Bmi−Bti) and use Example 2.9.)
Solution
The sum is ∑BtiΔi+∑(Bmi−Bti)Δi. The first part tends to 21(Bt2−t). Write Δi=(Bmi−Bti)+(Bti+1−Bmi); the second part is ∑(Bmi−Bti)2+∑(Bmi−Bti)(Bti+1−Bmi). The first of these is a quadratic variation over half-intervals, tending to 2t; the second has mean zero and variance ∑2δi⋅2δi→0. Total: 21Bt2.
Exercise 2.18Moments from Itô's formula
Use Itô's formula for f(x)=x4 (justified by localisation) and take expectations to show EBt4=3t2. Then show Var(∫0tBsdBs)=2t2 in two ways: from the isometry and from Example 2.9.
Solution
d(B4)=4B3dB+6B2dt; the stochastic integral has mean zero, so EBt4=6∫0tEBs2ds=6∫0tsds=3t2. Isometry: E∫0tBs2ds=2t2. Directly: Var(21(Bt2−t))=41Var(Bt2)=41(3t2−t2)=2t2.
Exercise 2.19Girsanov for one time
With ZT=e−θBT−θ2T/2, show that EP[ZT]=1 and that for bounded g, EP[ZTg(BT+θT)]=E[g(TN)] with N∼N(0,1): under Q, BT+θT∼N(0,T).
Solution
EP[ZTg(BT+θT)]=∫g(x+θT)e−θx−θ2T/22πTe−x2/(2T)dx, and −θx−2θ2T−2Tx2=−2T(x+θT)2. Substitute y=x+θT: ∫g(y)2πTe−y2/(2T)dy. With g=1, EZT=1.
Exercise 2.20The exit time from a ball, rigorously
For Brownian motion in Rn started at x with ∣x∣<R, use Itô's formula to show that ∣Bt∣2−nt is a martingale, apply optional stopping at τ∧k, and let k→∞ to prove Exτ=nR2−∣x∣2 (completing 6D.1 Brownian Motion).
Solution
d∣B∣2=∑i(2BidBi+dt)=2B⋅dB+ndt, so ∣Bt∣2−nt−∣x∣2 is a stochastic integral, a martingale. Optional stopping at the bounded time τ∧k: Ex∣Bτ∧k∣2−nEx(τ∧k)=∣x∣2. As k→∞, E(τ∧k)→Eτ (monotone convergence) and ∣Bτ∧k∣2→R2 boundedly (τ<∞ and ∣B∣≤R before τ). So R2−nExτ=∣x∣2.
Exercise 2.21Rehearsal: Brownian motion on a Riemannian manifold
In local coordinates on (M,g), let σ(x) be a matrix with σσT=(gij), and let Xt solve dXi=σαi(X)dBα−21gjk(X)Γjki(X)dt. (a) Use the general Itô formula to show that for smooth f,
So f(Xt)−21∫0tΔgf(Xs)ds is a (local) martingale: X is Brownian motion on M, whose transition density is the heat kernel of ∂t−21Δg (9B.7 The Heat Equation on a Manifold). (b) Why is the drift term −21gjkΓjki needed? (Compare with 6C.7 Harmonic Maps and Their Heat Flow, where Δgxk=−gijΓijk.)
Solution
(a) df=∂ifdXi+21∂ijfdXidXj, with dXidXj=σαiσαjdt=gijdt. So df=∂ifσαidBα−21∂ifgjkΓjkidt+21gij∂ijfdt, and the dt terms are 21gij(∂ijf−Γijk∂kf) after renaming indices. (b) Without it the generator would be 21gij∂ij, which is not coordinate-invariant. The drift makes the generator the invariant operator 21Δg; it is 21Δg of the coordinate functions, the tension field of the coordinate chart.
Free resources for this chapter
Chosen for what this chapter covers, and all free to read. Links checked Oct 20, 2026.