← Stochastic Differential Equations

04

Simulating ΔW = √Δt Z

A computer generates a Brownian increment by scaling a standard normal random number by the square root of the time-step length.

Start with a standard normal number

\[Z\sim N(0,1).\]

\(Z\) is dimensionless, has mean 0 and variance 1. Python generates a fresh independent value with rng.normal(0, 1).

Scale it to the required time interval

\[\Delta W=\sqrt{\Delta t}Z.\]

Multiplication by \(\sqrt{\Delta t}\) keeps the mean at 0 and changes the variance correctly:

\[\operatorname{Var}(\Delta W)=(\sqrt{\Delta t})^2\operatorname{Var}(Z)=\Delta t.\]

Using \(\Delta t Z\) would give variance \((\Delta t)^2\), which is the wrong scaling.

A numerical example

If \(\Delta t=0.04\) and the generated value is \(Z=-1.2\), then \(\Delta W=\sqrt{0.04}(-1.2)=0.2(-1.2)=-0.24\). A negative increment is normal and represents downward random fluctuation over that interval.

Interactive Python laboratory

Generate increments for three time steps and verify that their empirical variance follows \(\Delta t\) while their standard deviation follows \(\sqrt{\Delta t}\).

Interactive PythonSimulating Brownian increments

Output

Run the code to see the result.

Understand the code

CodeMeaning
rng.normal(0, 1, size=n)Generates \(n\) independent standard normal values.
np.sqrt(dt) * ZConverts standard normals into Brownian increments for the chosen interval.
ddof=1Uses the usual sample variance and sample standard deviation.

Essential conditions

What this lesson adds

You can now generate Brownian increments in Python, derive their mean and variance, explain the square-root scaling, and verify the formula numerically. The next lesson inserts these increments into Euler–Maruyama updates.