No Login Data Private Local Save

Brownian Motion Simulator - Online Random Walk Visual

15
0
0
0
2D Random Walk
Step: 0 MSD: - Max Spread: - Theory MSD: -
Simulation Parameters
Click Play to animate, or drag to rotate in 3D mode.
Frequently Asked Questions

Brownian motion describes the random movement of particles suspended in a fluid (liquid or gas), resulting from collisions with fast-moving molecules. Mathematically, it's modeled as a continuous-time stochastic process where increments are independent and normally distributed. It's also called a Wiener process in mathematics and forms the foundation of stochastic calculus used in physics, finance, and engineering.

MSD measures the average squared distance that a particle travels from its starting point over time. For standard Brownian motion in d dimensions without drift, the theoretical MSD equals MSD = d × σ² × t, where σ² is the variance per step and t is the number of steps. This linear relationship with time is a hallmark of normal diffusion. The simulator displays both the empirical MSD and the theoretical prediction for comparison.

Drift (μ) adds a systematic directional bias to each step, causing the path to trend in a particular direction over time — like a particle in an electric field or a stock with positive expected returns. Volatility (σ) controls the magnitude of random fluctuations at each step. Higher volatility produces more erratic, widely dispersed paths. In the step equation: Δx = μ × stepSize + σ × stepSize × N(0,1), drift dominates long-term direction while volatility determines short-term roughness.

Brownian motion models appear across numerous fields: Finance — stock price modeling (geometric Brownian motion in Black-Scholes); Physics — diffusion of particles, heat conduction; Biology — cell migration, protein movement in membranes; Engineering — signal noise analysis, sensor drift; Ecology — animal foraging patterns; Chemistry — reaction-diffusion systems. This simulator helps build intuition for these diverse applications.

In 1D, the particle moves along a single line (left or right), and the plot shows position over time. In 2D, the particle roams a plane, creating meandering trajectories reminiscent of pollen grains on water. In 3D, movement occurs in full spatial volume — you can rotate the view by dragging. A key difference: in 1D and 2D, a random walker always returns to the origin eventually (recurrence property), while in 3D and higher dimensions, the walker may never return — a famous result from probability theory.

The simulator uses the Box-Muller transform to generate normally distributed random increments at each step. For each dimension independently, a random value is drawn from N(μ×stepSize, σ²×stepSize²). All paths are pre-computed when parameters change, then revealed step-by-step during animation. This ensures smooth playback and allows instant jumping to the final state. The canvas uses device-pixel-ratio-aware rendering for crisp display on Retina and high-DPI screens.