Categories

# lottery ticket simulator

Depressing Lottery Simulator Lets You Play 1000 Times a Second, Shows All The Millions You Didn’t Win

#### Big Pile O’ Cash, But Not For Me

Thanks to one man, I don’t need to play the lottery. I already know that if I play twice a week every week for the next 10 years, I will win a staggering total of $93 by 2020. Or, put differently, I will make back eight percent of the$1,040 I’ll spend on the tickets.

I learned this from the time-wastingly fun yet cripplingly heartbreaking Mega Millions lottery simulator created by Friend of PopSci Rob Cockerham (whom you may remember from his Supertanker tour.) You can play your favorite numbers just once, for a year, or for 10 years and find out how little you win. And for the record, playing the Lost numbers does not yield better results.

Try it out for yourself; the lesson becomes pretty clear after a few simulated decades.

Thanks to one man, I don’t need to play the lottery. I already know that if I play twice a week every week for the next 10 years, I will win a staggering total of $93 by 2020. Or, put differently, I will make back eight percent of the$1,040 I'll spend on the tickets.

## 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<49!> <6! \times (49-6)!>= 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<1><13,983,816>=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<1><10>$ 0.1 10 0.027
$\frac<1><100>$ 0.01 100 0.274
$\frac<1><1,000>$ 0.001 1,000 2.740
$\frac<1><10,000>$ 0.0001 10,000 27.397
$\frac<1><100,000>$ 0.00001 100,000 273.972
$\frac<1><1,000,000>$ 0.000001 1,000,000 2,739.726
$\frac<1><10,000,000>$ 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<43> <49>\times \frac<42> <48>\times \frac<41> <47>\times \frac<40> <46>\times \frac<39> <45>\times \frac<38> <44>= 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<1><2.29>$Match 1 0 0.4130$\frac<1><2.42>$Match 2 0 0.1324$\frac<1><7.55>$Match 3 0 0.0177$\frac<1><56.66>$Match 4 0 0.0010$\frac<1><1,032>$Match 5 0 0.0000$\frac<1><54,200>$Match 6 0 0.0000$\frac<1><13,983,816>\$

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 ]]>