← Gallery

Random Walk & Brownian Motion

From Simple Diffusion to Gaussian Emergence and Levy Flights

1D Walk
2D Walk
Many Walkers
Levy Flight

One-Dimensional Random Walk

A walker on a number line takes random steps left or right. Over time:

  • Mean displacement: Zero (no net drift without bias)
  • Root mean square displacement: √(n) where n = number of steps
  • Central Limit Theorem: Position becomes Gaussian distributed

With bias (drift), the walker has a preferred direction, modeling phenomena like diffusion with an external force.

0
Current Position
0
Total Steps
0.0
RMS Displacement
0.0
Theoretical √n

Two-Dimensional Random Walk

The walker moves on a 2D plane, taking random steps in any direction. This models:

  • Brownian motion: Pollen grains in water (Einstein, 1905)
  • Stock prices: Random walk hypothesis in finance
  • Animal foraging: Search patterns in ecology

The trail shows the walker's path. Mean squared displacement (MSD) grows linearly with time: MSD ∝ t

0, 0
Position (x, y)
0.0
Distance from Origin
0
Total Steps
0.0
Mean Squared Displacement

Ensemble of Random Walkers - Gaussian Emergence

Starting from a single point, 200 walkers spread out. Watch the distribution evolve:

  • Central Limit Theorem: Individual steps add up to Gaussian distribution
  • Diffusion equation: Probability density satisfies ∂P/∂t = D∇²P
  • Linear MSD growth: Signature of normal diffusion

The histogram shows the spatial distribution converging to a bell curve. This is how heat spreads!

0.0
Mean Position
0.0
Variance
0
Steps
0.00
Diffusion Coefficient

Levy Flight - Heavy-Tailed Jumps

Unlike Brownian motion, Levy flights have occasional large jumps following a power-law distribution:

  • Step size distribution: P(l) ∝ l^(-α) where α ≈ 1.5-2
  • Superdiffusion: MSD grows faster than linear (MSD ∝ t^β, β > 1)
  • Found in nature: Foraging patterns of albatrosses, human mobility, market fluctuations

Small steps are common, but rare large jumps dramatically change the walker's position. This is an optimal search strategy!

0, 0
Position
0.0
Distance from Origin
0
Steps
0.0
Max Jump Size