03 / Probability theory
Random paths.
A predictable shape.
A single fair walk is unpredictable. Across many independent walks, the final positions gather into a distribution we can calculate exactly.
The law of a fair walk
Independent steps · equal chancesEach path starts at zero. Every step is independently +1 or −1, with equal probability.
Count the up steps.
Let count the up steps in independent trials. There are down steps, so the final position is:
Choosing exactly up steps gives the exact probability of ending at :
This holds for . Only every other integer is reachable. Since these controls use even step counts, every endpoint is even.
Read the distribution as numbers
| Final position | Exact probability | Frequency |
|---|---|---|
| -24 | 5.960e-8 | — |
| -22 | 0.000001 | — |
| -20 | 0.000016 | — |
| -18 | 0.000121 | — |
| -16 | 0.000633 | — |
| -14 | 0.002533 | — |
| -12 | 0.008023 | — |
| -10 | 0.020629 | — |
| -8 | 0.043837 | — |
| -6 | 0.077933 | — |
| -4 | 0.116900 | — |
| -2 | 0.148782 | — |
| 0 | 0.161180 | — |
| 2 | 0.148782 | — |
| 4 | 0.116900 | — |
| 6 | 0.077933 | — |
| 8 | 0.043837 | — |
| 10 | 0.020629 | — |
| 12 | 0.008023 | — |
| 14 | 0.002533 | — |
| 16 | 0.000633 | — |
| 18 | 0.000121 | — |
| 20 | 0.000016 | — |
| 22 | 0.000001 | — |
| 24 | 5.960e-8 | — |
Zero mean is not zero risk.
Each step has mean zero and variance one. Independence makes the variances add:
The standard deviation grows with the square root of the number of steps. More steps spread the distribution out, even though its center stays at zero.
The central limit theorem explains the emerging bell shape after rescaling. The bars here show exact binomial probabilities, not a normal approximation.
Add several batches. The simulated bars tend toward the exact distribution, but individual batches can move farther away. Convergence does not mean steady improvement.
Simulation uses browser pseudorandom numbers and is capped at 10,000 paths per step count. This is a fair mathematical walk, not a model of roulette or a prediction of financial returns.