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\) 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
Multiplication by \(\sqrt{\Delta t}\) keeps the mean at 0 and changes the variance correctly:
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}\).
Output
Run the code to see the result.
Understand the code
| Code | Meaning |
|---|---|
rng.normal(0, 1, size=n) | Generates \(n\) independent standard normal values. |
np.sqrt(dt) * Z | Converts standard normals into Brownian increments for the chosen interval. |
ddof=1 | Uses the usual sample variance and sample standard deviation. |
Essential conditions
- \(\Delta t\) must be positive.
- Use a new independent \(Z\) for each non-overlapping time interval and each independent path.
- Use the same increments only when intentionally comparing numerical solutions driven by the same Brownian path.
- A random seed supports reproducibility; it does not remove randomness from the model.
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.