Module contents
Lesson 23 of 31Core 115 min

Brownian motion

Brownian motion is central to stochastic calculus. Define it by independent Gaussian increments, construct it through random walks and the Lévy-Ciesielski series, and study invariance, path irregularity, quadratic variation, reflection, hitting times, martingales and Brownian bridges.

After this lesson you can

  • Verify the defining properties of Brownian motion and its scaling, time-inversion and symmetry invariances.
  • Simulate paths using increments, rescaled random walks and the Lévy-Ciesielski series, checking their law.
  • Prove that quadratic variation is t and deduce infinite total path variation.
  • Use reflection for the laws of the maximum and hitting time and check by simulation with discretization correction.
  • Apply optional stopping to Brownian martingales to obtain exit probabilities and times.

Before you start

A continuous path that never smooths out

In his 1827 observations, Robert Brown described the irregular movement of suspended particles. Bachelier studied a random model for prices in 1900; Einstein related diffusion to molecular motion in 1905. The modern mathematical object specifies a probability law over paths, not a particular empirical path.

Zoom in on a sample and refine its grid. Intermediate points are generated conditional on endpoints, so zooming retains previous observations. The image represents only finite resolution: the line between nodes does not prove the continuous process is smooth.

InteractiveZoom without erasing observations

One realization on [0, 1]. The colored segment marks the window shown below; as zoom increases, choose which dyadic interval to examine.

  • Overall path
  • Selected window

Both sums use the 64 original window increments, even when rescaling is enabled. For each uniform partition, the quadratic sum has expectation equal to duration and variance 2 · duration² / 64. Absolute variation has expectation √(2 · duration · 64 / π); values for a single sample fluctuate.

Rescaling shows (B(s + cu) − B(s)) / √c, with c equal to window duration. Its law is standard Brownian motion, although windows from this realization are not identical copies. Intermediate points come from Brownian bridges conditioned on endpoints; refining retains previous points. Up to 2¹⁴ intervals are generated on [0, 1] and drawn nodes joined by segments: this finite approximation alone does not establish irregularity at every scale.

0
6
Time interval[0.0000, 1.0000]
Increments in window64
Absolute variation Σ|ΔB|6.8427
Quadratic sum Σ(ΔB)²1.1322
Quadratic reference: duration1.0000
Seed2623
Refine with bridges and compare rescaled increments with the original path.

The law and its symmetries

A standard Brownian motion (Bt)t≥0(B_t)_{t\ge0} starts at B0=0B_0=0 almost surely, has almost surely continuous paths and independent increments such that Bt−Bs∼N(0,t−s)B_t-B_s\sim N(0,t-s) for 0≤s<t0\le s<t. With respect to its natural filtration, future increments are independent of the past. Continuity is a path property; the laws at individual times do not suffice to define the entire process law.

For times s,ts,t, EBt=0E B_t=0 and Cov⁡(Bs,Bt)=min⁡(s,t)\operatorname{Cov}(B_s,B_t)=\min(s,t). Independence of Gaussian increments allows construction of every finite-dimensional distribution: differences between ordered times are independent normals. Brownian motion is therefore a Gaussian process with that kernel.

Its transformations preserve the law: −Bt-B_t is Brownian; for c>0c>0, c−1/2Bctc^{-1/2}B_{ct} is too; and the process tB1/ttB_{1/t} for t>0t>0, extended by zero at t=0t=0, is another Brownian motion. These are equalities in distribution, not claims that two rescaled paths are equal pointwise. Continuity at zero of time inversion requires proof; see Mörters and Peres.

Constructing the process and taking the limit

A construction on a fixed grid sums normal increments with standard deviation Δt\sqrt{\Delta t}, not Δt\Delta t. To add the midpoint of [s,t][s,t] without changing its endpoints, we condition jointly normal variables:

B(s+t)/2∣(Bs=x,Bt=y)∼N ⁣(x+y2,t−s4).B_{(s+t)/2}\mid(B_s=x,B_t=y) \sim N\!\left(\frac{x+y}{2},\frac{t-s}{4}\right).

Midpoints of disjoint intervals are independent conditional on their endpoints. Repeated refinement produces consistent samples on all dyadic grids. In the Lévy-Ciesielski series the same idea is expressed with triangular functions: begin with Z0tZ_0t and add an independent tent of height 2−j/2−1Zj,k2^{-j/2-1}Z_{j,k} at level jj for each dyadic interval. Coefficients ZZ are independent standard normals. Almost sure uniform convergence of the series provides a continuous version; the Kolmogorov continuity criterion offers another route from moment bounds.

The Donsker invariance principle goes in the opposite direction: if ξi\xi_i are independent and identically distributed with mean zero and variance one, the linearly interpolated walk ∑i≤ntξi/n\sum_{i\le nt}\xi_i/\sqrt n converges in distribution in C[0,1]C[0,1] to Brownian motion. This is convergence of path laws, not equality between a particular sample and Brownian motion. Centering and normalization also matter for asymmetric increments. The result does not require Gaussian starting increments.

InteractiveFrom random walk to Brownian law

First of 400 paths: sum of n increments divided by √n and linearly interpolated on [0, 1].

  • Interpolated walk
  • Zero level

Cumulative distribution functions evaluated on a grid and joined by segments: for each x, the proportion of paths whose maximum is at most x.

  • Simulated walks
  • Brownian maximum

Increments are independent: ±1 with probability 1/2; uniform on [−√3, √3]; or 2 with probability 1/5 and −1/2 with probability 4/5. All three have mean 0 and variance 1. The fixed seed reproduces the sample; increasing n does not make each individual path Brownian.

The linearly interpolated maximum occurs at a node. Positive time sums the fraction of each segment strictly above zero; crossings are interpolated and an identically zero segment does not count. Finite grids have discrepancies and Monte Carlo variation.

For the standard Brownian limit on [0, 1], P(maximum≤x)=2Φ(x)−1 for x≥0; we calculate it by numerical quadrature. Positive time has CDF 2 arcsin(√x)/π for 0≤x≤1. The theorem guarantees convergence in distribution, not exact equality at finite n.

Law of each increment
6
Distribution
1
Steps per path64
Simulated paths400
Mean statistic0.717
Maximum ≤ 1: proportion0.748
Positive time ≤ 0.5: proportion0.515
Compare simulated laws of maxima and positive times as the number of steps increases.

Variation that survives refinement

For a deterministic partition π={0=t0<⋯<tn=T}\pi=\{0=t_0<\cdots<t_n=T\}, approximate quadratic variation is Qπ=∑i(Bti−Bti−1)2Q_\pi=\sum_i(B_{t_i}-B_{t_{i-1}})^2. By independence and Gaussian moments,

EQπ=T,Var⁡(Qπ)=2∑i(ti−ti−1)2≤2T∣π∣⟶0.E Q_\pi=T,\qquad \operatorname{Var}(Q_\pi)=2\sum_i(t_i-t_{i-1})^2 \le 2T|\pi|\longrightarrow0.

Thus Qπ→TQ_\pi\to T in L2L^2 as the mesh tends to zero. For dyadic partitions the sum of deviation probabilities is controlled by Chebyshev and Borel-Cantelli, so convergence is also almost sure along that sequence. We have not proved almost sure convergence for an arbitrary sequence of partitions.

Path irregularity is stronger than this statement. By continuity, the largest absolute dyadic increment tends to zero. Since Qπ≤(max⁡i∣ΔBi∣)∑i∣ΔBi∣Q_\pi\le(\max_i|\Delta B_i|)\sum_i|\Delta B_i| and Qπ→T>0Q_\pi\to T>0, total variation on any nontrivial interval is almost surely infinite. By contrast, a continuously differentiable function on a compact interval has zero quadratic variation.

The Paley-Wiener-Zygmund theorem further states that almost no Brownian path has a finite derivative anywhere; this does not follow from quadratic variation alone. The classical proof simultaneously controls difference quotients at many scales and uses independence and covering arguments. The theorem and its assumptions are developed in Mörters and Peres. The graph shows a finite grid, not a visual proof of the limit.

On every compact interval, paths are almost surely Hölder of every order α<1/2\alpha<1/2. To see this, Gaussian moments satisfy E∣Bt−Bs∣p=Cp∣t−s∣p/2E|B_t-B_s|^p=C_p|t-s|^{p/2}. Kolmogorov’s criterion gives any exponent below 1/2−1/p1/2-1/p; taking pp sufficiently large and then a countable intersection gives all α<1/2\alpha<1/2. This does not imply differentiability.

InteractiveTwo notions of variation

A Brownian sample on [0,1] is generated with 2048 independent increments N(0,1/ 2048); coarser grids reuse exactly those nodes. The smooth curve is sin(2πt). Straight segments between nodes are visual interpolation, not full continuous behavior.

  • Brownian sample

The sum of absolute values increases when a nested partition is refined. The sum of squares need not be monotone: for a Brownian path it approaches 1 on dyadic grids, whereas for the smooth function it tends to 0.

  • Brownian
  • Smooth
  • Selected level

Sum of absolute increments versus level k

Sum of squared increments versus level k

The horizontal dashed line marks Brownian expectation 1. For n equal increments, quadratic-sum variance is 2/n. A single path can fluctuate around its limit; the visualization reaches a finite level.

Displayed path
6
1
Number of increments64
Total variation on grid6.725
Quadratic sum on grid1.141
Brownian quadratic expectation1
Refine nested partitions of one sample and compare it with a smooth curve.

Reflection and first hitting

Let MT=sup⁡0≤s≤TBsM_T=\sup_{0\le s\le T}B_s and τa=inf⁡{t≥0:Bt=a}\tau_a=\inf\{t\ge0:B_t=a\}, for a>0a>0. The strong Markov property says that at a finite stopping time, subsequent increments shifted to the origin form a Brownian motion independent of information through that time. The strong version is essential: τa\tau_a depends on the path.

The reflection principle reflects the path after τa\tau_a. Symmetry of subsequent increments pairs paths that reach aa and end below aa with those ending above. Since P(BT=a)=0P(B_T=a)=0,

P(MT≥a)=P(τa≤T)=2P(BT≥a)=2[1−Φ ⁣(aT)].P(M_T\ge a)=P(\tau_a\le T)=2P(B_T\ge a) =2\left[1-\Phi\!\left(\frac{a}{\sqrt T}\right)\right].

The first-passage density is a e−a2/(2t)/2πt3a\,e^{-a^2/(2t)}/\sqrt{2\pi t^3} for t>0t>0. The probability of ever reaching the level is one, but the tail is heavy enough that Eτa=∞E\tau_a=\infty. Observing only grid nodes misses crossings between them and underestimates the probability of reaching the barrier.

InteractiveReflect after touching the barrier

The blue path is the first in the sample to cross the barrier at a node. The green curve reflects its linear interpolation once it reaches a. Its crossing time belongs to that interpolation, not the first continuous Brownian crossing.

  • Interpolated path
  • Reflection after interpolated crossing
  • Barrier a
node 32 of 32

In this interpolation crossing occurs at t ≈ 0.778; its original endpoint is 2.566 and reflected endpoint −0.566. Selecting this path because it crossed does not represent an unconditional sample.

For continuous Brownian motion, reflecting after the first actual crossing exchanges paths ending above a with those that crossed and end below it. Thus P(maximum up to 1 ≥ a) = 2[1 − Φ(a)]. The figure shows only a linear approximation and does not establish that continuous bijection.

We simulate 1200 independent paths on [0, 1] with normal increments of variance 1/128; a coarser grid uses the same nodes. Counting nodes alone misses crossings between them and underestimates continuous probability. Given endpoints x, y < a separated by h, bridge crossing probability is exp[−2(a−x)(a−y)/h]; if an endpoint reaches the barrier it is 1. We average conditional probability of at least one crossing, combining independent bridges between nodes. Standard errors express Monte Carlo variation, not a guaranteed bound. Φ is calculated with absolute error below 0.000000075.

Reference: notes on Brownian motion, reflection principle and bridges.

1.0
32
Cross at nodes27.8 %
With bridges31.8 %
Continuous theory31.7 %
Node standard error1.29 %
Bridge standard error1.31 %
Paths1200
Seed2623
Compare reflection on a finite grid with the continuous law and correction between nodes.

Martingales and exiting an interval

Brownian martingales include BtB_t, Bt2−tB_t^2-t and exp⁡(θBt−θ2t/2)\exp(\theta B_t-\theta^2t/2) for θ∈R\theta\in\mathbb R, with respect to the natural filtration. Independence and the moment-generating function of a normal increment give the conditional equality in each case.

For τ=inf⁡{t:Bt∉(−a,b)}\tau=\inf\{t:B_t\notin(-a,b)\} with a,b>0a,b>0, first stop at τ∧n\tau\wedge n. Continuity ensures that the stopped value remains in [−a,b][-a,b], allowing passage to the limit in Bτ∧nB_{\tau\wedge n}. Applying stopping to Bt2−tB_t^2-t gives E(τ∧n)=EBτ∧n2≤max⁡(a,b)2E(\tau\wedge n)=E B_{\tau\wedge n}^2\le\max(a,b)^2, so Eτ<∞E\tau<\infty and τ<∞\tau<\infty almost surely. Passing to the limit,

P(Bτ=b)=aa+b,Eτ=ab.P(B_\tau=b)=\frac{a}{a+b},\qquad E\tau=ab.

Optional stopping assumptions matter: applying EBτa=EB0EB_{\tau_a}=EB_0 without justification to first passage to a single level would give a contradiction precisely because suitable integrability is missing there.

Bridge, drift and higher dimensions

A standard Brownian bridge of duration TT can be written Ut=Bt−(t/T)BTU_t=B_t-(t/T)B_T: it is Gaussian, starts and ends at zero and has covariance min⁡(s,t)−st/T\min(s,t)-st/T. Its law matches Brownian motion conditioned to end at zero, interpreted through the conditional Gaussian distribution. For iid observations with continuous CDF, the centered and rescaled empirical process converges to a bridge evaluated at that CDF; this yields the Kolmogorov-Smirnov limiting law.

If Xt=μt+σBtX_t=\mu t+\sigma B_t, drift changes hitting probabilities and the simple symmetry of the previous formula no longer applies without modification. In dd dimensions, independent components form a vector Brownian motion. Recurrence means returning to every neighborhood of a point: in dimensions one and two this happens almost surely; in dimension three or higher the process is transient. In two dimensions a fixed point other than the starting point is polar, although every neighborhood is visited: recurrence does not mean hitting it. See Mörters and Peres. Geometric Brownian motion, exp⁡((μ−σ2/2)t+σBt)\exp((\mu-\sigma^2/2)t+\sigma B_t), anticipates pricing models and the Itô correction studied later.

In diffusion models, a continuous process adds noise and a reverse equation constructs samples; that reversal requires its own assumptions and drift term. Gaussian conditioning that produces the bridge also connects with Gaussian processes from the previous lesson.

Lab: three constructions

All simulations use explicit seeds. Covariance and variation comparisons are finite estimates: their discrepancy with theory does not demonstrate exact equality of samples.

[ ]Gaussian incrementsBrowser
import numpy as np
from scipy.stats import norm

rng=np.random.default_rng(2623)
T=1.; n=128; replicas=3000; dt=T/n
incrementos=rng.normal(0,np.sqrt(dt),size=(replicas,n))
trayectorias=np.column_stack((np.zeros(replicas),np.cumsum(incrementos,axis=1)))
indices=[n//4,n//2,n]
print("covarianza empírica en 1/4, 1/2, 1:",
      np.cov(trayectorias[:,indices],rowvar=False))
print("covarianza teórica:",
      np.minimum.outer(np.array(indices)/n,np.array(indices)/n))
q=np.sum(incrementos**2,axis=1)
print("media y varianza empíricas de Q, referencias:",q.mean(),q.var(),T,2*T*T/n)

The Lévy-Ciesielski construction uses dyadic tents. On the finest grid in this example each subsequent term would be zero at the nodes, so the truncated path has the exact Brownian joint distribution there.

[ ]Lévy-Ciesielski seriesBrowser
def levy_ciesielski(m, niveles, rng):
    n=2**niveles
    t=np.linspace(0,1,n+1)
    muestras=rng.normal(size=(m,1))*t[None,:]
    for j in range(niveles):
        escala=2**(-j/2-1)
        for k in range(2**j):
            u=2**j*t-k
            tienda=np.where((u>=0)&(u<=1),2*np.minimum(u,1-u),0.)
            muestras += rng.normal(size=(m,1))*escala*tienda[None,:]
    return t,muestras

t_lc,lc=levy_ciesielski(3000,6,rng)
print("covarianza serie en 1/4, 1/2, 1:",
      np.cov(lc[:,[16,32,64]],rowvar=False))
print("media y varianza de la suma cuadrática en 64 intervalos:",
      np.mean(np.sum(np.diff(lc,axis=1)**2,axis=1)),
      np.var(np.sum(np.diff(lc,axis=1)**2,axis=1)))

The third construction retains all previously generated values when inserting midpoints. Matrices contain one path per row; the normals for each interval and row are independent.

[ ]Refinement with bridgesBrowser
def refinar_muestras(valores,tiempos,rng):
    valores=np.asarray(valores,dtype=float); tiempos=np.asarray(tiempos,dtype=float)
    if valores.ndim!=2 or valores.shape[1]!=len(tiempos) or np.any(np.diff(tiempos)<=0):
        raise ValueError("malla creciente y trayectorias compatibles")
    medios=(valores[:,:-1]+valores[:,1:])/2
    medios += rng.normal(size=medios.shape)*np.sqrt(np.diff(tiempos)[None,:]/4)
    nuevos=np.empty((len(valores),2*len(tiempos)-1))
    nuevos[:,::2]=valores; nuevos[:,1::2]=medios
    tiempos_nuevos=np.empty(2*len(tiempos)-1)
    tiempos_nuevos[::2]=tiempos
    tiempos_nuevos[1::2]=(tiempos[:-1]+tiempos[1:])/2
    return nuevos,tiempos_nuevos

inicial=np.column_stack((np.zeros(3000),rng.normal(size=3000)))
tiempos=np.array([0.,1.]); puente=inicial.copy()
for _ in range(6):
    puente,tiempos=refinar_muestras(puente,tiempos,rng)
print("extremos conservados:",np.array_equal(puente[:,[0,-1]],inicial))
print("covarianza puente refinado en 1/4, 1/2, 1:",
      np.cov(puente[:,[16,32,64]],rowvar=False))

Crossings the grid cannot see

Conditional on endpoints x,y<ax,y<a of an interval of length Δ\Delta, the probability that the bridge reaches aa is

pcruce=exp⁡[−2(a−x)(a−y)Δ].p_{\rm cruce}=\exp\left[-\frac{2(a-x)(a-y)}{\Delta}\right].

If either endpoint reaches the barrier, crossing is certain. Bridges in distinct intervals are conditionally independent given the nodes: the probability of at least one crossing is one minus the product of no-crossing probabilities. Averaging this conditional probability exactly corrects grid bias for this Brownian motion and barrier; Monte Carlo error from finitely many paths remains. The formula comes from reflection of the bridge density and does not automatically transfer to every diffusion.

[ ]Barrier: nodes versus bridgesBrowser
a=1.; m=6000; pasos=32; dt=1/pasos
z=rng.normal(0,np.sqrt(dt),size=(m,pasos))
bm=np.column_stack((np.zeros(m),np.cumsum(z,axis=1)))
cruce_nodos=np.max(bm,axis=1)>=a
x=bm[:,:-1]; y=bm[:,1:]
prob=np.ones(m)
sin_nodo=~cruce_nodos
p=np.exp(-2*(a-x[sin_nodo])*(a-y[sin_nodo])/dt)
prob[sin_nodo]=-np.expm1(np.sum(np.log1p(-np.minimum(p,1)),axis=1))
teoria=2*norm.sf(a)
print("nodos, corrección de puente, teoría:",cruce_nodos.mean(),prob.mean(),teoria)
print("diferencia estimada frente a teoría, nodos y puente:",
      cruce_nodos.mean()-teoria,prob.mean()-teoria)
print("errores estándar Monte Carlo nodos y puente:",
      cruce_nodos.std(ddof=1)/np.sqrt(m),prob.std(ddof=1)/np.sqrt(m))

Exercises

ProofThe quadratic sum converges
Prove: Show that Qπ=Σ(ΔBᵢ)² converges in L² to T for deterministic partitions whose mesh tends to zero.
0
Each increment is centered normal, has variance Δtᵢ and is independent of the others.

Step 1 of 3. What are the expectation and variance of a squared increment?

ProofTwo martingales
Prove: Prove the martingale properties of Bₜ²−t and exp(θBₜ−θ²t/2) for real θ.
0
If s<t, write Bₜ=Bₛ+Z with Z independent of the past and N(0,t−s).

Step 1 of 3. What is the conditional expectation of Bₜ²−t given the past at s?

NumericFirst passage
For standard Brownian motion starting at zero, what is the probability of reaching level 1 before time 4? Give four decimal places.
NumericExit through the top
Brownian motion starts at zero and stops on exiting (−1,2). What is the probability it exits through the upper endpoint?
NumericMean exit time
For exit from (−1,2) in the previous exercise, what is the mean exit time?
QuizWhich transformation preserves the law
If B is standard Brownian motion, which of the following processes is again standard Brownian motion from zero?
CodeRefine a grid with bridges
Implement brownian_bridge_refine(path,times,rng): return path and times by inserting a midpoint in every interval. Preserve nodes and use the correct independent conditional normals. Reject non-increasing grids or nonfinite inputs.
import numpy as np

def brownian_bridge_refine(path, times, rng):
  pass
Shift+Enter to run
Key idea

Brownian continuity coexists with positive quadratic variation and extreme irregularity. Simulating nodes is useful, but crossings between nodes and stopping assumptions are part of the answer.

After attempting the numerical exercises, check their results with this cell.

[ ]Exercise checkBrowser
print("primer paso:",2*norm.sf(.5))
prob_superior=1/(1+2)
print("probabilidad de salida superior y tiempo medio:",prob_superior,1*2)