Random walk simulator
Set steps, repetitions, upward-move probability and an absolute |S| barrier.
First and mean walk paths
Barrier lines show +B and −B. The main result counts reaching either one.
Selected steps
| Step | First walk | Mean walk |
|---|---|---|
| Fill in the fields above — the result is computed on this page. | ||
How do I use this page?
- Set steps, number of walks and p.
- Choose a barrier and seed.
- Compare empirical mean and deviation with theory.
What this page does not do: The simulation is limited to 500,000 total steps. The empirical barrier rate depends on repetitions and seed.
Further reading
Theory — what is a random walk?
A simple random walk adds +1 with probability p or −1 with probability 1−p at each step. For p=0.5 the average final position is 0, but the spread of outcomes grows with the square root of the number of steps. The simulator lets you set the steps, repetitions, upward-move probability and an absolute stopping barrier |S|, so you can compare independent runs. This model does not predict lottery or market outcomes — it is an educational tool showing how random steps accumulate.
Frequently asked questions
Does a random walk predict prices or draws?
What does reaching the barrier mean?
See also
A/B test calculator
Compare two proportions in an A/B test. Calculate conversion rates, difference, uplift, z score, p value and c
A/B test planning — sample size, MDE and duration
Plan a two-proportion experiment, estimate detectable effect and traffic duration.
ACF and PACF autocorrelation calculator
Calculate ACF and PACF across time-series lags. Review the chart, reference bounds and coefficient table.