Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceProbability & MeasureStochastic ModelsMarket MicrostructureGuide
Stochastic Models
Random Walk
Random Walk labSymmetric Random WalkRescaled Random WalkStandard deviationCentral Limit Theorem
Brownian Motion
Brownian labDefining the Wiener processIncrement explorerJoint distributions and covarianceBrownian transformations and invarianceQuadratic variationBrownian bridgeRunning maximum and minimumReflection principleFirst passage timesHitting probabilities
Geometric Brownian Motion
LabDefinition: ABM vs GBMEuler–MaruyamaMean reversionJumpsCorrelated motions
Itô Process
LabItô integralItô's lemmaMartingalesGirsanov
Monte Carlo
LabVariance reductionFeynman–Kac
Connected Guides
  • Random walks and Brownian motion
  • The law of large numbers and the central limit theorem
  • Probability spaces, σ-algebras and random variables

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Random Walk

Drop walkers through a Galton board: each step goes up with probability p and down otherwise. The pile-up follows the binomial law and, for many steps, a normal curve.

Parameters

0.50
0.050.95
100
10200
1.00
0.252
Random seed: 7

At p = 0.5 the walk has no drift and stays centred on 0. Any other p tilts it: the centre moves by h(2p − 1) per step, the seed of Brownian drift.

100
0100

Metrics at step 100

Mean (walkers)
0.43
Mean (theory)
0.00
Variance (walkers)
99.38
Variance (theory)
100.00

Theory: E[S] = n·h·(2p − 1), Var[S] = 4np(1 − p)h². Drift per step: 0.00

400 walkers after 100 steps
  • Walkers (share per position)
  • Binomial pmf
  • Normal approximation
Sample paths

One highlighted walk among twelve. Dashed: mean n·h·(2p − 1); funnel: mean ± 2σ.

About this tool

The random walk is the discrete starting point of stochastic models: add up independent ±1 coin-flip steps and watch the sum wander. This lab simulates seeded walks, rescales them by √n towards Brownian motion, measures how the spread grows with time and shows the central limit theorem turning sums of any steps into a normal distribution.

Frequently asked questions

What is a symmetric random walk?

A sum of independent steps that are +1 or −1 with equal probability. Its expected value stays 0, but its variance grows by 1 every step, so after n steps the typical distance from the start is √n.

Why does the spread grow like √t and not like t?

Independent steps partly cancel. Variances of independent steps add, so variance grows linearly in time and the standard deviation, its square root, grows like √t.

How does a random walk become Brownian motion?

Shrink the step size to 1/√n while taking n steps per unit of time. As n grows, the rescaled walk converges to Brownian motion (Donsker's principle); the Brownian Motion lab picks up from there.

What does the central limit theorem say?

The standardised sum of many independent steps with finite variance is approximately normal, whatever the distribution of a single step. That is why the endpoint of a long walk looks Gaussian.

Learn the theory

  • Random walks and Brownian motion — The coin-flip walk, variance that grows linearly in time, and its limit: Brownian motion.
  • The law of large numbers and the central limit theorem — Why averages settle down, how fast, and why the normal distribution appears: the two theorems behind Monte Carlo and the Brownian limit.
  • Probability spaces, σ-algebras and random variables — Sample space, σ-algebra, probability measure, measurable maps and the σ-algebra generated by a variable.