Random walks are a computational model where a variable travels in discrete, random steps across an n-dimensional space. It is a useful tool in many simulations as a great deal of naturally occurring processes can be approximated with a random walk. I found the concept interesting once I started using it for a simulation of a viral infection spread and I wanted to visualize it, while wikipedia has a great article on random walks, I was curious about the distribution of “distances” that an N iteration random walk resulted in. I placed distances in quotes because there’s no defined unit for distance in this instance.

The histogram below shows the distribution of 10000 random walks that iterated over 1000 steps each in 2 dimensions starting at the origin (0,0). There was the possibility that during a step no movement occurred as each iteration allowed for the movement of the coordinate by -1,0, or 1 in either the x or y direction (but not both). Update: The distances were calculated using the standard 2D distance formula in cartesian coordinates through a python script ( ).

I added these last two graphs showing the coordinates of random walks, the first with 2400 steps and the second with 36000 steps. There is a line following the path and the density increases with multiple traversals over a single point.