1D Random Walk

Let us consider a Bernoulli trial. In this, we will consider a bunch of particles at the origin. We will sample a random variable from [-1, +1] and then change the position of each particle. The feeling is that on an average, the particles will have a zero mean because the random variable drawn has zero mean. Let's see what the final distribution of the locations will be.

As can be seen, the distribution of the distances tends towards that of a bell-shaped curve. In fact this curve is the normal distribution. The fact that for large times, the distribution tends towards the normal distribution, is a consequence of the Central Limit Theorem. In this particular case, if the step sizes have a finite variance, then the eventual distribution tends towards the normal distribution. Let us now sample from a uniform distribution.

Let us now see how the mean and variance scales with time.

Let's also check whether we can sample the random step using some other distribution.

The above plot clearly elucidates a very important property of the Central Limit Theorem. The variance seems to grow linearly with time.