Random walks

Falling over a fence

A drunk man has found his way to a fence. One step forward, and he will hit the fence and fall over. The man takes random steps towards or away from the fence. The probability of taking a step forward is 1/3, and for a step backward it is 2/3.

(a) What is the probability to escape the fence and stay up?

(b) What is the answer if the probability of a step backward is ?

(c) More generally, what is the answer if the drunk man starts steps from the fence?

The goal of this problem is to find an expression for in terms of and . Let's start with and condition on the first step: At first glance, it looks like we expressed in terms of which is even harder to compute, but that is not the end of the story.

Let's consider a path from 2 which ends up at 0. Since each step has length one, the path must pass through 1. What is the probability that a path starting at 2 ends up at 1? It doesn't take long to see that this is equal to by translation invariance. If we end up at 1, the probability of reaching 0 is again . And since these two events are independent, we deduce that . Plugging back in the expression for above, we find that so there are two viable solutions: and where . To figure out which one it is, it suffices to note that should be a continuous function of . Also when and when . The conclusion is that More generally The graph of P_1

Back to the original problem statement, plugging in and , we get

Gambler's ruin

You have dollars in your pocket, and your friend has in his. You agree to play the following game. At each step you flip a fair coin. If it comes up heads you friend gives you 1 dollar, and otherwise you give him 1. The process continues until one of you exhausts their resources, and the winner takes the lump sum of dollars. What is the probability of winning? What is the probability of winning if the coin comes up heads with probability ?

Let denote the probability of winning if you start with dollars in your pocket, and the opponent has . The winning and loosing final outcomes correspond to Similar to the solution of the fence problem, if we start with and condition on the first flip, we arrive at for . These equalities are sufficient to obtain a closed formula for . For simplicity, we will take in which case If we set , then using in the equality above, we get . Setting , we get and so on: . In particular , so . We showed that

Instead of running through the argument above with general and , we will present an alternative solution using the fence problem. Imagine we have only one absorbing the state at 0 identical to the previous problem. If we start at the probability of reaching 0 has already been computed above to be . The paths to 0 can be split in two groups -- those that pass through and those that always keep below . The probability of being in the second group is exactly , that is, we loose in the Gambler's ruin game. What about the first group? Reaching leads to a win which happens with probability by definition. If the random walk continues until we get to 0, that would happen with probability . To sum things up, we showed that which simplifies to This is a valid expression only when , that is , in which case If , we can switch places with the opponent (and the roles of and ). After some algebraic simplification, it turns out the same formula for still holds. The only case we haven't handled is . An alternative to resorting to the first solution, we can use that is a continuous function of . We can then get the same expression by applying L'Hospilal's rule. In conclusion, we have shown that

Returning home

A drunk man leaves his house for a walk. Staying on his own street, he takes random steps back and forth with equal probability. This continues until the first time he runs back into his own house, when the stroll ends. What is the chance he will make it back?

This may look like a difficult problem at first, but there is an easy solution using the fence problem. The idea is to condition on the first step. The remaining two probabilities have been computed to be 1 in the fence problem, so we conclude If we don't assume , then

Returning home in higher dimensions

What is the chance of returning home if the drunk man is traveling in the plane? The four possible steps are , all with equal probability. Can you generalize your result to higher dimensions?