The drunkard's walk

In this game we have a gentleman who, after spending the evening drinking beer, finds himself in the street, leaning against a lamppost and is determined to return home. Unfortunately, however, his memory falters even more than his body and, undecided whether to go left or right he improvises the following strategy. He tosses a coin: if heads comes up he goes right, if tails comes up he goes left. Will he be able to get to his house?

How many coin flips?

In this game you can decide how many coin flips and therefore how many steps the drunk will take to return home.

How many coin flips?

The results

The graph shows how, as the coin tosses and steps proceed, the drunk does not move that far from the position of the lamppost from which he started. The two oblique dashed lines show the maximum distance he could have gone.

One would think that, following the result of a coin toss, the drunkard would get lost. On the contrary, from our simulation of his walk, we can observe that he never strays very far from the pole from which he started! This does not mean that he will find his way home, but simply that if we go looking for him, we will find him in a small area around the pole.

The simulation is carried out by asking a computer to generate a (pseudo) random result of a coin toss and to shift the drunk's position accordingly. How far away will he be, on average, after 10 coin tosses, that is, after 10 steps? What about after 100? And after n steps? The red lines show the boundary of the space in which the drunk can move after n random steps. For example, if after 10 coin flips the result is always heads, the drunk will be 10 steps from the pole on the right. Similarly, if after 10 tosses the coin result is always tails, the drunk will be 10 steps from the pole on the left. These outcomes are quite rare and occur with a very low probability. Specifically, the probability of finding the drunkard 10 steps away from the pole on the right is 0.5^10 = 0.001 = 1/1000.
This means that if we repeat this game 1000 times, only once will we find the drunkard 10 steps away on the right. Or, if there are 1000 drunks throwing coins to go home, only one of them will be 10 steps away on the right.
A rather rare occurrence!

What do we learn from the random walk of the drunk? This is an example of random variation. How can we translate this learning into practice?

Suppose you own a company that produces steel bars that should be 1 m long (this is the target length you are aiming for). Occasionally the process has errors and the bars produced are shorter or longer than 1 m. Some of these errors are due to the fact that the machine that produces the steel bars is not perfect and has random variations. Based on what we learned from the drunken walk, we do not want to adjust the production system when these random errors occur. But occasionally the production process may incur systematic errors. These are the errors that need to be identified to adjust the production line. What is the optimal way to adjust the process if errors are observed in the production line? Watch this video and perform the funnel experiment to learn more!

https://www.youtube.com/watch?v=RBy_OwyvZF8