Foundations to Frontier
Tests
A. Mathematical Foundations › A4 Probability Theory › Stochastic processes

Stochastic Differential Equations and Itô Calculus (Intro)

Differential equations with noise: dX = a(X) dt + b(X) dW. Because Brownian motion has quadratic variation t, the chain rule gains a term (Itô's lemma: df = f′dX + ½f″b² dt), integrals must be evaluated at the left endpoint, and their variance follows the Itô isometry. You will solve the Ornstein–Uhlenbeck and geometric Brownian motion SDEs, simulate with Euler–Maruyama and Milstein, discretize a gyro-bias Gauss–Markov model exactly, and see how SDEs underlie Kalman–Bucy filtering, stochastic control and diffusion models.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

A boat in choppy water

A boat motors toward a buoy. Without waves, its path follows a simple rule: “move toward the buoy at this speed.” That’s an ordinary differential equation. Now add waves that nudge it randomly every moment. The rule becomes “move toward the buoy, plus a random push.” That’s a stochastic differential equation (SDE).

You can’t predict the exact path any more, but you can predict how the uncertainty behaves. A boat that keeps steering back ends up wobbling around the buoy within a fixed range. One that doesn’t steer drifts further and further.

Solving SDEs step by step: Euler–Maruyama
over 206 paths at T = 3: mean -0.020, variance 0.096, median -0.040 · theory: stationary var σ²/2θ = 0.090; mean e^(−θT) = 0.002
Solid: Euler–Maruyama with n steps, X ← X + a(X)Δt + b(X)√Δt·Z. Dashed (GBM and BM): the exact solution driven by the same noise. Few steps means visible error, and for OU with θΔt ≥ 2 the scheme goes unstable. GBM's mean grows like e^(μT), but most paths end below it, because the median is e^((μ − σ²/2)T): that's the Itô correction.
Why engineers care

Gyro biases that wander but stay bounded, a drone buffeted by gusts, battery degradation, and the “noise in, image out” process of diffusion models are all SDEs. Kalman filters for continuous systems, stochastic optimal control and modern generative AI are built on them.

📝 Quick check (Level 0)
0/3 answered
  1. 1. An SDE is a differential equation plus…
  2. 2. A system that keeps steering back wobbles…
  3. 3. Can you predict an SDE's exact path?

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

What an SDE means

dXt=a(Xt,t) dt+b(Xt,t) dWtdX_t = a(X_t, t)\,dt + b(X_t, t)\,dW_t

is shorthand for the integral equation Xt=X0+∫0ta ds+∫0tb dWsX_t = X_0 + \int_0^ta\,ds + \int_0^tb\,dW_s. Here aa is the drift and bb is the diffusion coefficient. The last term is an Itô integral, defined as the limit of left-point sums ∑b(Xtk)(Wtk+1−Wtk)\sum b(X_{t_k})(W_{t_{k+1}} - W_{t_k}).

Euler–Maruyama

The simplest simulation is

Xk+1=Xk+a(Xk)Δt+b(Xk)Δt Zk,Zk∼N(0,1)X_{k+1} = X_k + a(X_k)\Delta t + b(X_k)\sqrt{\Delta t}\,Z_k, \quad Z_k\sim\mathcal N(0,1)

Notice the Δt\sqrt{\Delta t}: noise accumulates like a random walk.

Two workhorse SDEs

  • Ornstein–Uhlenbeck (OU): dX=−θX dt+σ dWdX = -\theta X\,dt + \sigma\,dW. It’s mean-reverting, with stationary distribution N(0,σ2/2θ)\mathcal N(0, \sigma^2/2\theta) and correlation time 1/θ1/\theta. It models velocity under drag and slowly wandering sensor biases (the “first-order Gauss–Markov” process).
  • Geometric Brownian motion (GBM): dX=μX dt+σX dWdX = \mu X\,dt + \sigma X\,dW. The noise is proportional to the level. It models prices, and growth with multiplicative uncertainty.
📝 Quick check (Level 1)
0/3 answered
  1. 1. In Euler–Maruyama the noise term is multiplied by…
  2. 2. OU's stationary variance is…
  3. 3. In GBM, the noise is…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.

Itô’s lemma: the stochastic chain rule

For dX=a dt+b dWdX = a\,dt + b\,dW and smooth f(x,t)f(x, t),

df=(ft+afx+12b2fxx)dt+bfx dWdf = \Big(f_t + af_x + \tfrac12b^2f_{xx}\Big)dt + bf_x\,dW

The extra 12b2fxx\frac12b^2f_{xx} comes from (dW)2=dt(dW)^2 = dt (quadratic variation, A4.4-4). Keep second-order Taylor terms in dWdW, and drop dt dWdt\,dW and (dt)2(dt)^2.

Examples:

  • d(W2)=2W dW+dtd(W^2) = 2W\,dW + dt, so ∫0TW dW=WT2−T2\int_0^TW\,dW = \frac{W_T^2 - T}2, not WT2/2W_T^2/2.
  • For GBM, dln⁡X=(μ−σ22)dt+σ dWd\ln X = (\mu - \frac{\sigma^2}2)dt + \sigma\,dW. So Xt=X0e(μ−σ2/2)t+σWtX_t = X_0e^{(\mu - \sigma^2/2)t + \sigma W_t}: the mean is X0eμtX_0e^{\mu t}, but the median is X0e(μ−σ2/2)tX_0e^{(\mu - \sigma^2/2)t}.
  • E[eWt]=et/2\mathbb E[e^{W_t}] = e^{t/2}.

Solving OU exactly

Apply Itô to eθtXte^{\theta t}X_t: d(eθtX)=eθtσ dWd(e^{\theta t}X) = e^{\theta t}\sigma\,dW. So

Xt=e−θtX0+σ∫0te−θ(t−s)dWs,Var⁡Xt=σ22θ(1−e−2θt)X_t = e^{-\theta t}X_0 + \sigma\int_0^te^{-\theta(t-s)}dW_s, \quad \operatorname{Var}X_t = \frac{\sigma^2}{2\theta}(1 - e^{-2\theta t})

This gives the exact discretization Xk+1=e−θΔXk+q ZX_{k+1} = e^{-\theta\Delta}X_k + q\,Z with q2=σ22θ(1−e−2θΔ)q^2 = \frac{\sigma^2}{2\theta}(1 - e^{-2\theta\Delta}). It’s valid for any step size, which Euler is not.

Itô vs Stratonovich

Evaluating the integrand at the midpoint gives the Stratonovich integral ∫W∘dW=WT2/2\int W\circ dW = W_T^2/2, which obeys ordinary calculus. Itô integrals don’t look ahead, so they’re martingales (A4.4-7), which is what filtering and finance need. Physical white-noise limits often come out Stratonovich (Wong–Zakai). Converting between the two adds or removes 12bb′ dt\frac12bb'\,dt.

🐍 Exercise 1: Euler–Maruyama, OU, GBM and Itô vs Stratonovich
Implement Euler–Maruyama. Check OU's decaying mean and stationary variance σ²/2θ, and GBM's mean e^(μt) vs median e^((μ − σ²/2)t). Compute ∫B dB with left-point and midpoint sums: (B² − T)/2 vs B²/2.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Itô's lemma adds the term…
  2. 2. ∫₀ᵀ W dW (Itô) =
  3. 3. GBM's median at time t is…

Level 3: Advanced

★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.

Why Itô’s lemma holds (sketch)

Take a partition of [0,t][0,t] and Taylor-expand f(Xk+1)−f(Xk)f(X_{k+1}) - f(X_k) to second order:

Δf=f′ΔX+12f′′(ΔX)2+o((ΔX)2),(ΔX)2=b2(ΔW)2+O(Δt3/2)\Delta f = f'\Delta X + \tfrac12f''(\Delta X)^2 + o((\Delta X)^2), \quad (\Delta X)^2 = b^2(\Delta W)^2 + O(\Delta t^{3/2})
  1. First-order terms. Summing f′ΔXf'\Delta X gives ∫f′a ds+∫f′b dW\int f'a\,ds + \int f'b\,dW.
  2. Second-order terms. ∑12f′′b2(ΔWk)2→∫12f′′b2 ds\sum\frac12f''b^2(\Delta W_k)^2\to\int\frac12f''b^2\,ds, exactly as the quadratic variation ∑(ΔW)2→t\sum(\Delta W)^2\to t (A4.4-4). In ordinary calculus this term would vanish.
  3. Remainders. Higher-order terms vanish in the limit. ∎

Itô isometry and martingale property

For adapted HH (it doesn’t peek into the future),

E[∫0THt dWt]=0,E[(∫0THt dWt)2]=E∫0THt2 dt\mathbb E\Big[\int_0^TH_t\,dW_t\Big] = 0, \qquad \mathbb E\Big[\Big(\int_0^TH_t\,dW_t\Big)^2\Big] = \mathbb E\int_0^TH_t^2\,dt

Proof for step functions: cross terms E[HjHkΔWjΔWk]\mathbb E[H_jH_k\Delta W_j\Delta W_k] with j<kj<k vanish, because ΔWk\Delta W_k is independent of everything before it. Diagonal terms give E[Hk2]Δt\mathbb E[H_k^2]\Delta t. Extend by density in L2L^2. ∎ For example, E(∫W dW)2=∫0Tt dt=T2/2\mathbb E(\int W\,dW)^2 = \int_0^Tt\,dt = T^2/2.

Convergence of numerical schemes

Euler–Maruyama has strong order 1/2: E∣XT−XTΔ∣=O(Δ1/2)\mathbb E\lvert X_T - X_T^{\Delta}\rvert = O(\Delta^{1/2}), and weak order 1. Milstein adds 12bb′((ΔW)2−Δ)\frac12bb'((\Delta W)^2 - \Delta) and reaches strong order 1 (Kloeden and Platen, 1992). Strong order matters for pathwise accuracy, as in filtering. Weak order matters for expectations, as in Monte Carlo pricing.

The Fokker–Planck equation

The density p(x,t)p(x, t) of XtX_t solves ∂tp=−∂x(ap)+12∂xx(b2p)\partial_tp = -\partial_x(ap) + \frac12\partial_{xx}(b^2p). For OU, the stationary solution is the N(0,σ2/2θ)\mathcal N(0, \sigma^2/2\theta) density. Langevin MCMC uses dX=∇log⁡π(X)dt+2 dWdX = \nabla\log\pi(X)dt + \sqrt2\,dW, whose stationary density is exactly π\pi.

Exercise 3.1: Derive the GBM solution

Itô with f=ln⁡xf = \ln x: f′=1/xf' = 1/x and f′′=−1/x2f'' = -1/x^2, so dln⁡X=1X(μX dt+σX dW)−12σ2X2X2dt=(μ−σ22)dt+σ dWd\ln X = \frac1X(\mu X\,dt + \sigma X\,dW) - \frac12\frac{\sigma^2X^2}{X^2}dt = (\mu - \frac{\sigma^2}2)dt + \sigma\,dW. Integrate and exponentiate.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Euler–Maruyama's strong order of convergence is…
  2. 2. E(∫₀ᵀ W dW)² =
  3. 3. Langevin dynamics dX = ∇log π dt + √2 dW has stationary density…

Level 4: Expert

★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.

Discretizing a gyro-bias model for a filter

INS/GNSS filters model gyro bias as an OU (first-order Gauss–Markov) process with a correlation time of around 300 s. When the filter runs slowly, or between sparse star-tracker fixes, the step Δt\Delta t can be comparable to or larger than the correlation time. Euler then gives xk+1=(1−θΔt)xk+…x_{k+1} = (1 - \theta\Delta t)x_k + \dots, which oscillates or diverges once θΔt≥2\theta\Delta t\ge2. The exact transition e−θΔte^{-\theta\Delta t} with process noise q2=σ22θ(1−e−2θΔt)q^2 = \frac{\sigma^2}{2\theta}(1 - e^{-2\theta\Delta t}) stays correct at any rate. For linear systems that’s the Van Loan matrix-exponential method used to build (Φ,Q)(\Phi, Q) in every Kalman filter (Van Loan, 1978; Maybeck, 1979).

🐍 Exercise 2 (research): exact Gauss–Markov discretization and strong order
Discretize a gyro-bias OU model (300 s correlation time) at Δt = 600 s, exactly and with Euler. Show that the exact scheme keeps the stationary variance while Euler blows it up. Then measure the strong convergence orders of Euler–Maruyama (≈ 1/2) and Milstein (≈ 1) on GBM with shared noise.

SDEs in AI, robotics and aerospace

  • Diffusion and score-based generative models. A forward SDE turns data into noise. Generation runs the reverse-time SDE dX=[a−b2∇log⁡pt]dt+b dWˉdX = [a - b^2\nabla\log p_t]dt + b\,d\bar W (Anderson, 1982), with the score learned by a network (Song et al., 2021). Its deterministic twin, the probability-flow ODE, gives fast samplers.
  • Kalman–Bucy and nonlinear filtering. Continuous-time state estimation treats dynamics and measurements as SDEs. The Zakai and Kushner–Stratonovich equations describe the exact posterior (Jazwinski, 1970).
  • Stochastic optimal control. The HJB equation for dX = f dt + g dW includes the Itô term 12tr⁡(gg⊤∇2V)\frac12\operatorname{tr}(gg^\top\nabla^2V). LQG, path-integral control and risk-sensitive control follow (Fleming and Rishel, 1975; Kappen, 2005).
  • Langevin MCMC and SGD. Stochastic-gradient Langevin dynamics adds Brownian noise to SGD to sample posteriors (Welling and Teh, 2011). Continuous SDE models of SGD explain learning-rate and batch-size effects (Li, Tai and E, 2017).
  • Orbit uncertainty and atmospheric drag. Density fluctuations are modelled as OU processes in orbit-determination filters. They are a dominant source of low-Earth-orbit prediction error.

References

  1. B. Øksendal (2003). Stochastic Differential Equations, 6th ed. Springer.
  2. K. Itô (1944). “Stochastic integral.” Proceedings of the Imperial Academy, Tokyo, 20.
  3. P. Kloeden, E. Platen (1992). Numerical Solution of Stochastic Differential Equations. Springer.
  4. D. Higham (2001). “An algorithmic introduction to numerical simulation of stochastic differential equations.” SIAM Review, 43(3).
  5. S. Särkkä, A. Solin (2019). Applied Stochastic Differential Equations. Cambridge University Press.
  6. C. Van Loan (1978). “Computing integrals involving the matrix exponential.” IEEE Transactions on Automatic Control, 23(3).
  7. P. Maybeck (1979). Stochastic Models, Estimation, and Control, Vol. 1. Academic Press.
  8. B. Anderson (1982). “Reverse-time diffusion equation models.” Stochastic Processes and their Applications, 12(3).
  9. Y. Song et al. (2021). “Score-based generative modeling through stochastic differential equations.” ICLR.
  10. M. Welling, Y. W. Teh (2011). “Bayesian learning via stochastic gradient Langevin dynamics.” ICML.
  11. A. Jazwinski (1970). Stochastic Processes and Filtering Theory. Academic Press.