← Notes

Random walks are sqrt(N)

· Updated

tldr; The basic essence of this note is to demonstrate the importance of vision. Instead of blindly chasing everything that is shiny, a person with vision can walk in a straight line. This is important, a person walking in a straight line with N steps moves with O(n)O(n) But a person walking in a random walk, only can move on the order, O(n)O(\sqrt{n}).

I originally saw this assertion in, The Art of doing Science and Engineering by Richard Hamming.


Assuming there are independent random variables, Z1,Z2,Z3,...Z_1, Z_2, Z_3, ... such that each variable is either -1 or 1 with a 50% probability. Then create a length-N sequence such that S0=0S_0 = 0 and SN=j=1NZjS_N = \sum_{j=1}^{N} Z_j.

It follows that the expected value, E(SN)=j=1NE(Zj)=0E(S_N) = \sum_{j=1}^{N} E(Z_j) = 0

We’re going to need another property of sums to move on here,

SN2=(j=1NZj)(j=1NZj)=(Z1,Z2,Z3,...,ZN)(Z1,Z2,Z3,...,ZN)=(Z12,Z22,Z32,...,ZN2)+2Z1(Z2,Z3,...,ZN)+2Z2(Z3,...,ZN)+...=(i=1NZi2)+2(1i<jnNZiZj)\begin{align*} S_N^2 &= \bigg(\sum_{j=1}^{N} Z_j\bigg)\bigg(\sum_{j=1}^{N} Z_j\bigg) \\ &= (Z_1, Z_2, Z_3, ..., Z_N)(Z_1, Z_2, Z_3, ..., Z_N) \\ &= (Z_1^2, Z_2^2, Z_3^2, ..., Z_N^2) + 2Z_1(Z_2, Z_3, ..., Z_N) + 2Z_2(Z_3, ..., Z_N) + ... \\ &= \bigg(\sum_{i=1}^{N} Z_i^2\bigg) + 2\bigg(\sum_{1 \leq i \lt j \leq n}^{N} Z_iZ_j\bigg) \end{align*}

Then, we can find:

E(SN2)=(i=1NE(Zi2))+2(1i<jnNE(ZiZj))=N\begin{align*} E(S_N^2) &= \bigg(\sum_{i=1}^{N} E(Z_i^2)\bigg) + 2\bigg(\sum_{1 \leq i \lt j \leq n}^{N} E(Z_iZ_j)\bigg) \\ &= N \end{align*}

because E(ZiZj)E(Z_iZ_j) is 0, since the variables are independent and have a mean of 0. So it follows that the distance is roughly on the order of N\sqrt{N}.