Homework 11 – Simulation of a Wiener Process via Euler–Maruyama and Connection to the Counting Process Approximation
1. Introduction
In Homework 10 we constructed a counting process on the interval , where events occurred independently and uniformly with average rate . Using a fine discretization—dividing the time interval into many small subintervals—we showed that the total number of events converges in distribution to a Poisson random variable with parameter . The process itself, when viewed as a function of time, is a jump process with independent and stationary increments.
This homework extends that framework into the domain of continuous stochastic processes, specifically the Wiener process (Brownian motion). While the counting process in Homework 10 had Poisson-distributed increments, Brownian motion instead has Gaussian-distributed increments with variance proportional to time. Both processes share the key idea of building the evolution in time through independent increments over small subintervals.
The aim of this assignment is to use the Euler–Maruyama method, a standard numerical scheme for stochastic differential equations (SDEs), to construct approximate realizations of a Wiener process on . Because JavaScript does not provide a built-in Gaussian generator, the simulation must use the Box–Muller transform to produce increments that follow a distribution.
2. From Counting Processes to Brownian Motion
The simulation strategy developed in Homework 10 already introduced the idea of dividing time into very small steps and generating random events independently in each step.
In that context:
-
Each subinterval produced either 0 or 1 event with probability .
-
Summing those Bernoulli increments produced a counting process converging to a Poisson process.
The Wiener process shares the same constructive philosophy:
-
Divide the time interval into small subintervals of length .
-
Generate random increments in each subinterval.
-
Ensure the increments are independent.
-
Scale the increments to match the theoretical behavior of the model.
The crucial difference is the distribution of the increments.
For Brownian motion:
instead of a Poisson or Bernoulli increment.
Thus, while HW10 built a counting process, HW11 builds a diffusion process.
Both methods rely on the same computational idea to simulate random increments on a fine time grid and accumulate them.
3. The Wiener Process
A standard Wiener process is defined by the following properties:
-
.
-
Independent increments:
The increments over non-overlapping intervals are independent. -
Gaussian increments: Wt−Ws∼N(0,t−s).
Continuous sample paths: The trajectories are continuous almost surely.
These properties encode the behavior of a particle undergoing pure random motion, and they form the foundation of modern stochastic calculus.
4. Euler–Maruyama Simulation Scheme
To simulate a stochastic differential equation of the form
For a Wiener process, the simplest SDE is:
which has:
-
drift ,
-
diffusion
Thus, the update rule is simply:
5. Box–Muller Transform for Gaussian Noise
Because JavaScript's Math.random() generates uniform samples, we need an explicit method to obtain normal random variables. The Box–Muller transform converts two independent uniform variables into two independent standard normal variables:
6. JavaScript Implementation
6.1 Box–Muller Normal Generator
6.3 Empirical Verification of the Theory
To confirm that the simulation behaves correctly, we:
-
Generate many independent Wiener paths.
-
Collect the values at time .
-
Compute their empirical mean and variance.
-
Compare with the theoretical values
7. Conceptual Link to Homework 10
This homework is a direct conceptual continuation of Homework 10.
-
In HW10 we approximated a Poisson counting process by generating Bernoulli events on small time slices.
-
In HW11 we approximate a Wiener process by generating Gaussian increments on small time slices.
Both processes:
-
rely on independent increments,
-
are constructed by discretizing time,
-
converge in distribution as the number of time steps increases,
-
and illustrate how continuous stochastic processes can be built from simple local randomness.
In HW10 the increments were Bernoulli(λ/n), producing a jump process.
In HW11 the increments are Gaussian, producing a diffusion process.
Thus, the philosophy is the same, only the increment distribution changes.
8. Conclusion
Using the Euler–Maruyama method and the Box–Muller transform, we successfully simulated trajectories of a Wiener process. The empirical analysis confirms that the numerical approximation preserves the fundamental properties of Brownian motion: zero mean, variance proportional to time, independent increments, and continuous-like sample paths.
The methodology used in Homework 10 to approximate Poisson processes naturally extends to this homework, highlighting how stochastic processes—whether jump-based or diffusion-based—can be constructed via time discretization and random independent increments.
This completes the simulation framework for Wiener processes and prepares the ground for general stochastic differential equations.