Example

The plot shows clearly that the method of choosing one random number for the direction of the random walk fails for a large number of steps. If on the other hand we choose random numbers for x and y in the range of , then we get a result which is as close to the theoretical result as you can expect when dealing with Monte-Carlo methods.
Figure 1: Random walk simulation using two different methods to generate unit steps.


Back to main document.