# Behind Random Numbers and The Lottery

November 28, 2017 3:00 AM

by
Elliot Frome

I was intrigued by a news story I saw this morning about the Arizona lottery apparently removing one of its random number generating (RNG) machines from operation because of duplicates.

I didn’t realize states used electronic random number generators for their Pick 3 games. I assumed they used those little ping pong ball dispensers and picked three numbers from 0 to 9 in order. That wasn’t the really intriguing part. Taking one out of operation due to duplicates is what I found interesting.

Computers don’t really malfunction all that often. Especially if you define malfunction as doing something it wasn’t programmed to do. Computers frequently get programmed with mistakes, but computers don’t have minds of their own. Generating a random number between 0 and 999 is a relatively simple computer command.

The random number generators used for slot machines and lotteries are more complex than the simple one found on the average personal computer, but the concepts are pretty similar. Most of these gambling approved RNGs have undergone extensive testing, which should remove a programming error from the equation. So, what would cause a computer to generate duplicate numbers? That’s hard to say. But, more to the point in this case is the definition of a duplicate.

Apparently, on Nov. 15, the machine drew the number 8-0-4. It then did so again on Nov. 21. What drew the attention of the Lottery Commission is that it also drew this same number on Oct. 9. I have to be honest, this “repetition” really didn’t ring any alarm bells in my head as I read it. But, it caused enough of a stir that the lottery took the machine off-line and allowed players to get refunds for losing tickets. Naturally, this prompted me to investigate the math behind this phenomenon.

I started with the Nov. 15-21 period. The odds that the number drawn on a particular day would repeat only once over the next five days is a not surprising 200.8 to 1. We are not talking about the 8-0-4 happening on the first day and repeating. We are talking about whatever numbers show up on Day 1 would repeat somewhere in the next five days. There are 1,000 numbers. Since the question was for exactly once in next five days, the 0.8 is for the times we get more than one, so 200 to 1 odds doesn’t seem so far-fetched.

But, the same number happened back on Oct. 9, so we are wondering about the probability a number would repeat two more times over the next 32 days. Arizona does not draw Pick 3 on Sundays. To calculate this, we start with the probability of hitting the number (1 in 1000) and raise it to the power of the number of times we want the number to hit (2).

Then we take the probability of not hitting the number (999 in 1000) and raise it to the power of the number of times it won’t hit (30) and multiply these two together. Last, we multiply that by the different number of combinations the two would repeat over 32 days (32 choose 2). The final result is 1 in almost 2078.

Alarm bells are still not going off in my head. Now, maybe the lottery commission is seeing something else that has them concerned. There is another set of repeating numbers that happened several months ago. But, we are talking about only 1000 possible numbers. They are going to repeat. They select about 312 numbers every year. It’s not going to take three years before you hit a duplicate!

The article I read said when the analysis is complete they will report the results to the public. I look forward to reading this report. Is it possible there is a problem? Sure. It probably is a good thing the lottery is being overly cautious. Better safe than sorry and check out the machine to make sure something hasn’t gone wrong causing it to generate the duplicates.

But, I’ll be a bit surprised if they find a problem based on the data they’ve released to the public so far. This could be a simple case of the math looking funny, but being quite normal. The odds of a roulette number repeating three times in a row is 1444 to 1 (double zero). This is marginally less frequent than our lottery number repeating as it did. Yet, this event happens nearly every day somewhere in Las Vegas with all the roulette wheels we have here.

Here’s a thought to ponder. A teacher has 30 students in his class. The probability of a duplicate birthday is about 70%. If you walked into 10 classrooms and found that seven of them had duplicates, you’d probably think how odd this was. Yet, it would be completely normal.

Time will tell if these lottery machines have malfunctioned or the lottery panicked over not fully understanding how the math works.

**Get signed up for a VIP account today to enjoy all we have to offer.**

*At Gaming Today we are dedicated to providing valuable up-to-date information on the casino industry and pari-mutuel race wagering. With news and features, plus expanded coverage in key areas – race and sports analysis, picks, tips, and handicapping.*