Statistics How To

Random Walk

Statistics Definitions >

A random walk is a sequence of discrete, fixed-length steps in random directions.

Random walks may be 1-dimensional, 2-dimensional, or n-dimensional for any n. A random walk can also be confined to a lattice.

random walk

A lattice.


The Simplest Random Walk: Walking in One Dimension

Random walks are simplest when they’re taken in one dimension. Imagine standing at the point 0 on a number line or balance beam, where you have two possible directions for movement– forwards or backwards. Flip a coin to choose your direction, heads is forward, tails is back. After every flip of the coin, you take just one step; then flip again.

You’ve just been taking a random walk.

You can journal your random walk as a series of numbers. Note this random walk series is different than a series of random numbers because each number in a series a modification of the previous number.

You are just as likely to go forward than backward, so if you take the average of your number sequence it will be just 0 (your origin). Your average distance from the origin, though, is related to the distance each step takes you from the origin, and since those are all positive numbers the average will also be positive. To find this we use the root mean square average; the number we get when we square all our distances, find the average of them, and then take the square root of that average. Your root mean square distance from the origin is given by √ n

History of Random Walks

Karl Pearson began a discussion of random walks in 1905, in a letter to Nature. He asked what the probability was that a man, walking in a random walk, reached a distance of r in x steps. A week later, his question was answered by Lord Rayleigh. This was the beginning of research into the unique properties of random walk; research that turned out very useful when random walks became used to model problems in science and social studies.

Random Walks in Two Dimensions

To imagine a random walk in two dimensions, imagine you had four possible directions you could move — right, left, forward or back. To choose the direction for each step, you flip a coin twice. The the first flip decides between right/left and forward/back, the next one decides which of the two directions you go.

The root mean square distance from the origin is still given by √ n, at least if each step is one unit long; if each step is k units long your rms distance is k √ n

Here’s something cool: it’s been shown that on a two dimensional lattice (like the one at the top of this article), your random walk has a probability of 1 of reaching any point as the number of steps approaches infinity. That includes the starting point. So if you walk forever, you’ll eventually get where you’re going to: at least, if your world is a two dimensional lattice and you’re going on a random walk.

Applications of Random Walks

Random walks are used to model many processes in Chemistry, Physics and Biology. For example, they can give us a good understanding of the statistical processes involved in genetic drift, and they describe an ideal chain in polymer physics. They are also important in finance, psychology, ecology and computer science.

References
The Simple Random Walk. Retrieved 9/10/2017 from: http://www.math.uah.edu/stat/bernoulli/Walk.html
Random Walks: The Mathematics in 1 Dimension. Retrieved 9/10/2017 from: http://www.mit.edu/~kardar/teaching/projects/chemotaxis%28AndreaSchmidt%29/random.htm

------------------------------------------------------------------------------

If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.

Comments are now closed for this post. Need help or want to post a correction? Please post a comment on our Facebook page and I'll do my best to help!
Random Walk was last modified: October 12th, 2017 by Stephanie Glen