# The probability of going through a bad patch

We’ve heard it: people that invest on the stock market or that gamble in lotteries, casinos, etc usually say “I’m going through a bad patch” (or bad spell). That is, they have been losing money for a while, but hey! better times are ahead and there’s no reason to quit. Are they sure? Are better times ahead? How close is “ahead” to today? Let’s work through a specific example to see how far is “ahead”. Suppose we play a fair game: we toss a coin and with probability 1/2 we get $1 (heads) and with probability 1/2 we lose $1 (tails). We play the game times and compute our capital up to time . If our initial capital is zero, then we expect that our capital fluctuate around zero as the coin-tossing game goes on. Sometimes we will be in the “winning area”, where our capital is positive > 0. However, we can also be in the “losing area” in which our capital is negative < 0. If we are going through a bad patch (being in the losing area) we expect that waiting long enough we will recover and come back to the winning area.

But this is incorrect. Let me show you why: let’s use some mathematics. Suppose that is the gain (+$1) or lose (-$1) in toss of the coin. Since our coin is fair, then is a random number which takes +1 or -1 with equal probability (1/2). Thus the capital up to time is the sum of those random numbers

is then the sum of equally distributed random numbers. In other contexts, is also know as a random walk. We can apply the law of large numbers and the central limit theorem to know something about . For example, the expected value of is

as expected, since it is a fair game. Thus we have equal probability of being winning or losing at time . However, fluctuates wildly around zero and in fact

Thus our capital at time is mostly in an interval of area around zero, as shown in the next graph.

The graphs shows 4 realizations of the game (colors) and the lines are the areas in which our capital is mostly expected. As we can see in the “red” game, we starting losing money, but after a while we recover and went back to the “winning area”. Now the question is: what is the probability that we are in the winning area? Specifically, what is the probability that we are in the winning area ( > 0) for a fraction of the total turns? The naive reasoning in the introduction will tell us that since is fluctuating around zero we expect that the probability will be peaked and 1/2 and thus half of the time we will be in a bad patch and half of the time we will be going through a good spell. Thus, if we are going through a bad patch, we have only to wait to come back to black numbers. However, this is not true. The probability can be worked out (although not trivially) to get

in the limit , which is known as the arc-sine law (since the cumulative distribution of is the arc-sin function). As the plot in the right shows the probability is peaked at 1 and 0 (actually, it diverges there!). Thus, for most of the realizations of the game we are most of the time in the winning area or in the losing area. This means that our naive reasoning above does not work: if you expect to recover from a bad patch, your chances are very small. This is obvious if we look at the colored figure above: the orange and black trajectories do not change from one winning/losing area to the other and, apart from the initial steps of the game, they remain in the winning/losing areas forever. The explanation for this behavior is that the first return time of to zero is oftenly large. Actually, its expected time is infinite, which means that once you get into the positive/negative area you remain (mostly) there.

Note however, that there is no paradox in what we have found and the fact that , since is symmetric around and thus if we play the game a large number of times, on average, we have the same chances of winning and losing. But not for an individual game in which mostly we will be in a bad or good patch forever.

What is the moral? Simple: if you get into a bad patch, leave the game. Because chances to recover from a bad patch are small.

Nice post Esteban.

The other extreme of your suggestion would be the Martingale strategy: Double your bet after every loss. Of course, that strategy too is flawed: http://en.wikipedia.org/wiki/Martingale_(betting_system)

Thanks Artur. I didn’t know about the martingale strategy! I found very interesting the discussion in the wikipedia about it. However, pockets or lines of credic are not so deep to afford such a strategy (at least not mine!)