Friday, June 15, 2007

Streaks Happen: Winning and Losing Streaks Explained

Winning and losing streaks are a familiar aspect of gambling. But they are often misunderstood.


Streaks can lead gamblers astray. I sometimes wonder how much money has been lost because a player does not understand streaks.


For example, players who feel they are on a winning streak may bet accordingly. They believe that since they are on a winning streak, it will continue. So they bet as if they must keep on winning.


On the other hand, players who have been on a long losing streak may assume that they are overdue for a win. They may assume that since the roulette wheel has come up black five times in a row, next time it will certainly come up red. So they bet all their money on red. If the wheel comes up black again, they may think the wheel is rigged, or they are just cursed with bad luck.


You may already understand the problem with this approach. Consider a simple coin toss. If I throw a coin five times and it comes up heads each time, is the coin suddenly overdue for tails? Am I on a "heads winning streak" which I can expect to continue? Of course the answer to both questions is no.


Each toss of the coin is independent. No matter how many times the coin comes up heads, the probability of heads on the next toss remains 1/2. The coin does not in any sense remember how many times it has come up a particular way.


So why do streaks occur? Is there any pattern to streaks? If there is, can we take advantage of this pattern?


As you will see, streaks are not really mysterious. In fact, we can actually predict their existence using simple mathematics. We can also study their behavior using computer simulations.


Let's continue using the example of coin tossing. We know that the probability of heads in a single coin toss is 1/2. So is the probability of tails.


We also know that if we toss a coin ten times, there is no guarantee that we will get exactly five heads and five tails. But in the long term, we expect the result to get closer to 50% heads and 50% tails.


If we toss the coin many times and record the results, we will see examples of streaks of various length. Sometimes we will see three heads in a row, sometimes five tails in a row. On the surface, there may be no apparent pattern. But on closer study, a pattern does emerge. I'll provide an example later in this article.


First, to help understand this pattern, let's consider the case where we throw the coin 1024 times. This may seem like a strange number, but it's convenient because it's a power of 2, and this makes the example easy to work out.


In theory, we expect half the tosses to result in heads and half in tails. 1024/2 = 512 so we expect 512 heads and 512 tails.


If we assume exactly 512 heads and 512 tails, then we can have at most 256 streaks of length 1. To imagine this, think of a simpler case where the number of throws is only 16. Consider the sequence with the following pattern:


HHTTHHTTHHTTHHTT


This sequence has 16 throws, 8 heads and 8 tails. There are exactly 4 HH streaks and 44 TT streaks. There can't possibly be more than 4 of each kind of streak and still have exactly 8 heads and 8 tails.


This is just one possible outcome. In general we expect longer streaks to occur sometimes. However, we expect them to occur less often than shorter streaks.


For example, we would expect a HHH streak to occur only half as many times as a HH streak. To see this, compare the pattern HHHX with HHXX, where X is either H or T. For HHHX, X must be T to maintain the streak. If X is H, then the streak changes from HHH to HHHH. In other words there is only one way the HHH streak can happen in the sequence HHHX. But HHXX can occur two ways, as HHTH or HHTT.


So we would expect, allowing for longer streaks, that we should get HH streaks 128 times, HHH streaks 64 times, and so on.


Now we can construct a theoretical table for how often streaks of each length should occur.



Length Times
------ -----
1 128
2 64
3 32
4 16
5 8
6 4
7 2
8 or more 1



How does this theoretical result match with a real experiment? Since it's tiresome to throw a coin 1024 times, I wrote a short computer program to simulate this experiment. Instead of tossing a coin, I use a software random number generator.


The program simulates 1024 tosses and keeps track of how often each length streak occurs. Here's the result of one run for streaks of H.



Length Times
------ -----
1 126
2 66
3 32
4 19
5 7
6 3
7 0
8 2
9 0
10 1



The pattern fits well with our theory, although not exactly. Of course this is typical of experiments in probability. We could increase the number of throws in order to achieve results which come closer to the theoretical result.


My program has done nothing but simulate throwing a coin 1024 times, with equal probabilities each time of heads or tails. Yet, streaks occur. Moreover, they occur in a pattern, as our simple theory predicts.


I hope that this article provided some insights into streaks. I'll conclude with this thought. When it comes to independent events such as tossing a coin or throwing the dice, you can know that you have been on a streak, but you can't know if the streak will continue.

No comments: