VnutZ Domain
Copyright © 1996 - 2024 [Matthew Vea] - All Rights Reserved

2007-10-31
Featured Article

Pattern Analysis of MegaMillions Lottery Numbers

[index] [688,900 page views]
Tagged As: Data Analysis, Lottery, and Math

For the most current and up-to-date results, this article has been superceded with a continuously updating website where the statistics are recalculated after each new drawing. A matching site has also been created for PowerBall. Please visit:

For information on how the analysis was conducted, please continue reading the original article below.


Everyone wants to get rich, especially if it only costs them $1. Fortunately, many local state governments host lotteries, allowing their constituents to donate cash into the budget in hopes of winning a multi-million dollar prize. In practice, most lottery drawings consist of a series of balls drawn randomly from a chamber which should guarantee a fair opportunity for everyone to win. Theories of rigged lotteries and fraud, however, run rampant across the Internet.1 The system is accused of not holding live drawings, publishing winning numbers prior to drawing them, permitting the tweaking of data archives to avoid payouts, intentionally modifying balls, or using balls with painted numbers whose natural weight affects their likelihood of appearance.

Rather than debunk any of these theories of lottery fraud or rigging, this article reveals the trends and patterns of winning lottery numbers for public scrutiny using basic data analysis. It uses the results of the MegaMillions lottery and consists of the following analyses:

  • distribution of winning numbers over time
  • behavioral stratification of numbers based on numerical position
  • relationship between mutually winning numbers
  • common differences between winning numbers
  • winning number frequency

While such scrutiny has the potential to yield useful results, such as identifying the existence or lack of "better numbers" to play, it is presented so as to appeal to those interested in number patterns.

MegaMillions History

Recently, MegaMillions drew the largest jackpot ever recorded at $370 million, exceeding the previous record held by PowerBall.2 The prizes were not always so large, nor did the participants span the United States. Beginning life in 1996, MegaMillions originally existed under a different nomer: "The Big Game." For two years this lottery was drawn weekly on Fridays until 1998, when a Tuesday drawing was added. Over the past eleven years, the number of participating states has doubled from only six to twelve. Although there are minor interstate variations regarding how jackpots are paid to winners, the basic game play remains the same.3

A single dollar in MegaMillions purchases a 1 in 175,711,536 chance of landing the jackpot. A player may opt for a "QuickPick" set of numbers generated automatically by a computer or they may choose to select their own numbers. Since 2005, MegaMillions allows players to choose five numbers between 1 and 56 plus a sixth number, the MegaBall, between 1 and 46. This, however, was not always the selection pool. When the "Big Game" was conceived, players were given a pool of numbers 1 through 50 to choose for their first five balls and numbers 1 through 25 for their sixth. Beginning in 1999, players were offered the numbers 1 through 50 for the five regular balls and 1 through 36 for the sixth. When the game became MegaMillions in 2002, players selected numbers between 1 and 52 for both the five regular balls and the MegaBall.4

Gathering Data

As a first step, it was necessary to obtain a collection of MegaMillions' lottery numbers. Fortunately, the New Jersey Lottery website has an archive of all winning numbers since September 6, 1996.5 As an added bonus, the archive of numbers exists in both HTML format for a pretty web presentation and as a delimited file which is conducive for importing into a database. For the purposes of this analysis, the winning lottery numbers were imported into Microsoft SQL Server Express for processing queries. Subsequent graphs were then created with Microsoft Excel to visualize the trends and behavior.6

The delimited file of winning lottery numbers contained the results for 1078 drawings and provides the following fields:

  • Year - formatted as YYYY
  • Month - formatted as MM
  • Day - formatted as DD
  • Day of Week - formatted as Tuesday and Friday
  • Ball 1, 2, 3, 4, 5 - as an integer
  • MegaBall - as an integer
  • Prize Payout - when present, formatted as a decimal value
  • Date - formatted as YYYYMMDD

Distribution of Winning Numbers Over Time

The first trend analyzed was whether or not the numbers occur with an even distribution. Balls 1, 2, 3, 4 and 5 were consolidated into a single list to analyze their overall frequency of occurrence. Each separate version of the lottery - two editions of BigGame and two editions of MegaMillions - were analyzed independently to identify any outlying activity. Subsequently, a similar grouping was performed to determine the distribution of the MegaBall number. The following charts detail the number of times each number was selected over the course of the the entire span of MegaMillion's drawings.

When the BigGame debuted, players were allowed to choose numbers between 1 and 50 with a MegaBall ranging from 1 to 25. Each number has been drawn at least eight times as compared with the most frequent winners that occurred twenty-seven times. Overall, the numbers have been drawn approximately seventeen times each. The most frequent number, 35, exceeds the mean by 2.76 deviations as compared with the least occurring number, 49, which lagged the mean by -2.46 deviations. The first version of the BigGame is the only drawing with a descending trend line that when combined with the deviations identify the distribution as slightly abnormal. The MegaBall number 17 appeared fifteen times while 23 occurred only once. The average MegaBall was drawn seven times.
The BigGame was changed on January 13, 1999 to increase the number of available MegaBalls from pool of 25 to 36. The primary drawing pool remained the same, ranging between 1 and 50. Each number has been drawn at least twenty-one times while the most frequently drawn number has appeared forty-six times. Overall, all numbers have been drawn roughly thirty-four times. Only one number, 4, exceeds two deviations from the mean at 2.11 deviations. 19 was -2.29 deviations from the mean, the only number to appear less than two deviations from average. The second version of the BigGame has the flattest trend line that when combined with the deviations identify the distribution as normal. The numbers 2 and 3 were drawn the most as MegaBalls at fifteen times apiece while 11 was drawn the fewest at four times. On average, each MegaBall appeared ten times.
On May 15, 2002 the MegaMillions drawing expanded the pool of numbers available to players to range from 1 through 52. Each number has been drawn at least twenty times while the most frequently drawn number has appeared forty-five times. Overall, all numbers have been drawn roughly thirty-one times. The two most drawn numbers, 32 and 10, are the only two numbers to deviate from the mean by a factor larger than two; 2.59 and 2.41 respectively. The least drawn number, 33, is only -2.04 deviations from the mean. Although the linear trend line rises modestly, the primary numbers have a relatively even distribution over time. The MegaBall ranges from 1 through 52. The number 34 was drawn the most on 14 occasions while 51 appeared only once. Overall, each MegaBall has appeared an average of six times.
Players have had the option of drawing numbers between 1 and 56 since June 22, 2005. Every number has been drawn at least ten times while the most frequently drawn number has appeared thirty times. Overall, each number has appeared an average of twenty times. Despite being drawn the most, both 7 and 53 are only 2.17 deviations from the mean. Even the least drawn number, 47, is -2.17 deviations from the mean. Overall, the primary numbers have a relatively even distribution over time. The MegaBall ranges from 1 through 46. 4 and 42 share the most drawn position with nine wins while many numbers round up the low end with only two wins. Overall, each MegaBall has appeared an average of five times.

Behavioral Stratification of Numbers Based on Numerical Position

After looking at the behavior of the numbers in aggregate, the occurrence of numbers respective to their position was analyzed. Unfortunately, the lottery does not store the numbers in the order they were drawn. Rather, the data file saves the winning lottery numbers in ascending order.7 As such, positional analysis focused on how the numbers are stratified within their given position.

It is important to recognize the four variations of the lottery's number pool has an impact on the ratio of occurrence for each number. As such, the data was broken into four sets titled (uncreatively) version 1, version 2, version 3 and version 4. Winning numbers per position were counted to determine the numbers that win most frequently within each set. Then, an aggregate winning percentage was assigned by combining the win ratio of each set multiplied by a time factor to obtain the overall likelihood of a number to win. The time factor represents the percentage share of drawings per version, which equates to 15.95%, 32.37%, 30.05% and 21.61%, respective to MegaMillions versions one (original) through four (current).

Each of the six graphs represent the top fifteen numbers per position:

  • Green bars represent the current version of MegaMillions where players choose from numbers 1 through 56 and a MegaBall number of 1 through 46.
  • Blue bars represent the weighted aggregation of a number's winning percentage from all MegaMillions drawing variations since 1996.
  • The red line represents a five variable polynomial trend line to the winning percentage of the current MegaMillions drawing pool.
Ignoring the version differences in number pooling across the lottery's lifetime, the first ball has ranged between 1 and 37 with an average winning number of 8. Looking at the current version of MegaMillions, the first ball shows a steeper trend curve with nearly twice the drawings on winning numbers as any other ball. MegaMillions winning numbers ranged from 1 through 37 with an average winning ball of 17 since 2002. The numbers 7, 5, 1, 2 and 3 represent 39.91% of the winning numbers on the first ball.
Ignoring the version differences in number pooling across the lottery's lifetime, the second ball has ranged between 2 and 46 with an average winning number of 17. Looking at the current version of MegaMillions, the second ball shows a shallower trend curve. MegaMillions winning numbers ranged from 2 through 43 with an average winning ball of 22 since 2002. The numbers 13, 12, 17, 25, 10, 18, 20, 14 and 21 represent 40.77% of the winning numbers on the second ball.
Ignoring the version differences in number pooling across the lottery's lifetime, the third ball has ranged between 5 and 54 with an average winning number of 29. Looking at the current version of MegaMillions, the third ball shows the shallowest trend curve. MegaMillions winning numbers ranged from 3 through 54 with an average winning ball of 26 since 2002. The numbers 20, 35, 31, 25, 37, 26, 32, 24, 23 and 38 represent 39.06% of the winning numbers on the third ball.
Ignoring the version differences in number pooling across the lottery's lifetime, the fourth ball has ranged between 5 and 55 with an average winning number of 35. Looking at the current version of MegaMillions, the fourth ball's trend curve begins to steepen. MegaMillions winning numbers ranged from 7 through 55 with an average winning ball of 35 since 2002. The numbers 51, 42, 46, 36, 48, 40, 38, 39 and 49 represent 40.77% of the winning numbers on the fourth ball.
Ignoring the version differences in number pooling across the lottery's lifetime, the fifth ball has ranged between 13 and 56 with an average winning number of 44. Looking at the current version of MegaMillions, the fifth ball's trend curve steepens sharply. MegaMillions winning numbers ranged from 26 through 56 with an average winning ball of 41 since 2002. The numbers 53, 54, 56, 52 and 55 represent 42.92% of the winning numbers on the fifth ball.
Ignoring the version differences in number pooling across the lottery's lifetime, the MegaBall has ranged between 1 and 52 with an average winning number of 20. Looking at the current version of MegaMillions, the MegaBall's trend curve is relatively flat. MegaBall winning numbers ranged from 1 through 46 with an average winning ball of 23 since 2002. The numbers on the graph represent 44.64% of the winning numbers on the MegaBall.

Relationship Between Mutually Winning Numbers

Additionally, an analysis was performed to determine which numbers "win together." After all, a player does not need to pick all six numbers in order to win money from MegaMillions. Therefore, all possible combinations of balls 1, 2, 3, 4 and 5 were formed to analyze the occurrence of ball relationships.

Doubles

There are ten combinations of ball pairs: [1 2], [1 3], [1 4], [1 5], [2 3], [2 4], [2 5], [3 4], [3 5], & [4 5]. Using the MegaMillions data, there are 10,780 possible pairs of which 1503 are unique over the lottery's lifetime. In the current version of MegaMillions, there are 2330 possible pairs of which 1202 are unique. Pairs of numbers occur quite frequently; 1426 pairs have occurred 10,703 times throughout the lottery's lifetime compared with 692 pairs that have appeared 1820 times in since the fourth version of MegaMillions began.

In the current version of MegaMillions, pairs of numbers win repeatedly quite often. In the lottery's lifetime, particular pairs have won regularly.

The graph shows that in the current version of MegaMillions, pairs of numbers win repeatedly quite often. Over the lottery's lifetime, particular pairs have won very regularly.

Triples

There are ten combinations of ball triples: [1 2 3], [1 2 4], [1 2 5], [1 3 4], [1 3 5], [1 4 5], [2 3 4], [2 3 5], [2 4 5], & [3 4 5]. There are 10,780 possible triples of which 8675 are unique over the lottery's lifetime. Within the past version of MegaMillions, there are 2330 possible triples of which 2245 are unique. 1789 sets of triplets have repeated 3894 times in the lifetime of the lottery. Five sets of triplets have occurred five times and two sets of triplets have occurred six times. In the past year, however, only twenty-three sets of three balls have repeated twice.

There have been many repeat winning combinations of three numbers in the lifetime of the lottery, although it is a less frequent phenomenon in the current version.

In the graph, there have been many repeat winning combinations of three numbers in the lifetime of the lottery, although it is a less frequent phenomenon in the current version.

Quadruples

There are five combinations of ball quadruples: [1 2 3 4], [1 2 3 5], [1 2 4 5], [1 3 4 5], & [2 3 4 5]. There are 5390 possible quadruplets of which 5328 are unique over the lottery's lifetime. Since June 22, 2005 there are 1165 unique combinations of possible quadruplets. Sixty-two sets of four numbers have repeated twice since MegaMillions began. There have been zero sets of quadruplets winning more than once in the current version of MegaMillions.

Quintuples

There is only one combination of ball quintuples: [1 2 3 4 5]. Only one set of five numbers has ever repeated twice in the history of MegaMillions: (11, 14, 18, 33, 48).

Common Differences Between Winning Numbers

A natural extension of analyzing number groups was to identify the trends by which numbers differ from one another. For example, while probability gives the numbers 20, 21, 22, 23 and 24 the same chance of appearing as any other combination, is it likely? The numbers for the most recent version of MegaMillions were scrutinized to determine if there is a common difference between each ball.

The graph depicts the difference between the 1st/2nd position, 2nd/3rd position, 3rd/4th position and 4th/5th position. Overall, each split differs by an average of nine (indicated by intersecting zero). 70% of the difference distribution lie between 1 and 20. While it is unlikely for the entire series to have peculiar (tight or very wide) differences, it is not necessarily an unusual situation. Since 2005, there have been twenty-six occasions where two subsequent numbers have differed by more than 30.

Winning Number Frequency

Analyzing the distribution of numbers over time only provided half the picture in terms of any given number's propensity towards winning. Another aspect to consider was the temporal frequency by which a number wins. For example, a number may have won on thirty occasions, but maybe they were all two years ago. To study this behavior, the time delta between each number's appearance was cataloged to establish statistics for all numbers and for each number across the lifetime of the fourth version of MegaMillions. Then, the analysis was repeated using only the most recent six months of data to identify the cross section of numbers that win frequently consistently and which numbers are just a current flash in the pan.

This graph depicts the numbers with the shortest, average time between appearance since version four of MegaMillions began in 2005. Simply having a low average, however, is not a good indicator that a number occurs frequently. The blue line depicts the ratio of wins that occurred with a time delta below average. Numbers with a ratio above 50% are indicative of winning often in "clumps" whereas numbers below 50% represent a wider spread of win frequency. It should be noted, however, that low frequency "clumping" also comes with a corresponding dearth of appearance.
The six month graph replicates the logic found above on the lifetime graph, only this time restricted to winning numbers over the past six months. The intersecting cross section of frequently winning numbers represent those that not only win over time but those that have demonstrated a recent propensity for appearing often. Over six months, there is a span of numbers that have both a low delta of days between appearance ''and'' a high ratio of occurrences on a more frequent basis than average. Equally, a handful of the recent numbers have low ratios, indicating their average is skewed by bursts of low delta wins offset by many frequent gaps of significant length.

Conclusions

Interesting as these trends may be, they will not assist in making the odds of winning the MegaMillions lottery any better if the system is truly fair and random. However, in the event there is some peculiar factor skewing the ball selection such that any of these trends continue, a player stands a mildly better chance of winning a partial prize through the selection of weighted numbers.


Footnotes

  1. "The Lottery is Rigged." Uncoverer. Accessed October 2007 from http://www.uncoveror.com/lottery.htm.
  2. Roland, Neil. "Mega Millions Lottery Jackpot Now Record $370 Million." Bloomberg. Accessed October 2007 from http://www.bloomberg.com/apps/news?pid=20601103&sid=afUgc0t0u3hg&refer=us.
  3. "How to Play: Play the game." MegaMillions.com_. Accessed October 2007 from http://megamillions.com/howtoplay/play_game.aspgame.asp.
  4. "About Us: Game History." MegaMillions.com_. Accessed October 2007 from http://megamillions.com/aboutus/game_history.asphistory.asp.
  5. New Jersey Lottery. Accessed September 2007 from http://www.state.nj.us/lottery/data/big.dat.
  6. Microsoft SQL Server Express. Accessed September 2007 from http://www.microsoft.com/sql/editions/express/default.mspx.
  7. Ultimately, order does not matter with lottery numbers.


More site content that might interest you:

... because own all the things!


Try your hand at fate and use the site's continuously updating statistical analysis of the MegaMillions and PowerBall lotteries to choose "smarter" number. Remember, you don't have to win the jackpot to win money from the lottery!


Tired of social media sites mining all your data? Try a private, auto-deleting message bulletin board.


paypal coinbase marcus