Lottery Simulator

### Background

Most people have a poor understanding of probability. One major difficulty is in appreciating how unlikely simple events become when several outcomes must all line up. This is one reason that lotteries are popular: people overestimate their chances of winning.

Consider a lottery in which your task is to match 6 numbers drawn from the range 1-49. How many possible drawings are there?

This formula calculates the number of possibile combinations:

$$C = \frac

where $n$ is the total number of numbers (in this case, 49) and $r$ is the number of numbers sampled (in this case 6). So, the number of combinations possible is

$$C=\frac = 13,983,816$$

So, there are 13,983,816 combinations possible. If you buy one ticket, your odds of matching all 6 lottery numbers with one ticket are $$\frac=0.000000072$$

It is difficult to appreciate how small this number is and how unlikely it is that an event with such a low probability will occur. The table below shows what happens as the odds of winning go from 1 in 10 to 1 in 10 million. The second column shows the probability of winning, the third column shows how often you will win, on average, in weeks, and the final column shows how often you will win, on average, in years.

Odds | Probability | Win once every (weeks) |
Win once every (years) |
---|---|---|---|

$\frac$ | 0.1 | 10 | 0.027 |

$\frac$ | 0.01 | 100 | 0.274 |

$\frac$ | 0.001 | 1,000 | 2.740 |

$\frac$ | 0.0001 | 10,000 | 27.397 |

$\frac$ | 0.00001 | 100,000 | 273.972 |

$\frac$ | 0.000001 | 1,000,000 | 2,739.726 |

$\frac$ | 0.0000001 | 10,000,000 | 27,397.260 |

On average, you will match all 6 numbers once every 14 million times you play the lottery. If you play once a week, it will take approximately 38,000 years.

Here are another couple of ways of thinking about the odds. First, What is the probability that you won’t match any numbers at all? The answer is to calculate the probability that your 6 numbers didn’t match the first winning number, then multiply that by the probability that your 6 numbers didn’t match the second winning number, and so on: $$p(match\; 0)=\frac \times \frac \times \frac \times \frac \times \frac \times \frac = 0.436$$

This is another way of saying you’d expect to match 0 numbers 43.6% of the time. The good news is that it also means that you’ll match at least 1 or more numbers approximately 56.4% of the time ($1-0.436=0.564$). The bad news is that you’ll match only 1 number 41% of the time, and will match only 2 numbers 13% of the time. So, 98.14% of the time, you’ll match 0, 1, or 2 numbers.

### Simulation

In this simulation, you try to match 6 numbers between 1 and 49. The point is to show how unlikely it is that you’ll win. The simulation assumes there is 1 drawing per week, tickets cost $3, and that you purchase 1 ticket for each drawing. 1 The payouts are shown above, and come from a recent set of payouts for a real lottery. 2

Summary | |
---|---|

Number of Drawings | |

Number of Years | |

Winnings/Losses |

#1 | #2 | #3 | #4 | #5 | #6 |
---|---|---|---|---|---|

Your Ticket | |||||

Winning Numbers |

Result | How Many? | Observed Proportion |
Expected Proportion |
Approximate Probability |
---|---|---|---|---|

Match 0 | 0 | 0.4360 | $\frac$ | |

Match 1 | 0 | 0.4130 | $\frac$ | |

Match 2 | 0 | 0.1324 | $\frac$ | |

Match 3 | 0 | 0.0177 | $\frac$ | |

Match 4 | 0 | 0.0010 | $\frac$ | |

Match 5 | 0 | 0.0000 | $\frac$ | |

Match 6 | 0 | 0.0000 | $\frac$ |

If you don’t have time to run the simulation, you can see the results after 100,000 drawings. Note that at a rate of 1 drawing per week, 100,000 drawings would take just over 1,923 years.

Note 1: For simplicity, it is assumed there are exactly 52 drawings per year every year.

Note 2: The actual amount won for matching 4, 5, or 6 depends on the number of other people who also matched. Most lotteries set aside a certain percentage of the prize pool for each of these, but the more people who match, the lower the amount each person wins. For example, for the lottery outcome I used as the basis of this simulation, 177 people matched 5 out of 6, so the prize pool was divided amongst those 177 people. Similarly, 8,102 matched 4 out of 6, so the prize pool was divided amongst those 8,102 people. No one matched all 6.

Lottery Simulator Background Most people have a poor understanding of probability. One major difficulty is in appreciating how unlikely simple events become when several outcomes must all line ]]>