Many states have set up Lottery games that award a substantial prize, often in the tens or even hundreds of millions of dollars to some lucky winner or group of winners. Such games often go by the name of Lotto or Super Lotto or even Mega Millions. In a typical game, either five or six rubber balls will be randomly selected by a machine from a set of 47, 49, or a similar valued number of balls. The number of balls is chosen so that the chance of a random player matching all of the numbers is anywhere from 1 in about 14 million (for a 6/49) game to something on the order of 1 in one hundred million or greater, for certain Mega games or Powerball games.
In a simple Lotto type game, the order in which the numbers are drawn from the machine does not matter, so if a ticket holder has the numbers 1,2,3,4 and 5, and if the order in which the machine selects these numbers is 5,2,4,3, and 1; then the ticket is still a winner. However in a mega game, in order to win the main prize, the player must match the first five numbers drawn in any order, but then must also match the last number drawn exactly. For the game which is currently offered in California under the name Super Lotto, the first five numbers drawn are from a set of 47 white rubber balls, which are selected by one machine, and the mega number is chosen as just one ball from a set of 27 purple balls, which is selected by a second machine. The Mega Millions game is similar, but it uses a set of 56 balls for the first five drawn, and another set of 46 for the final ball, known as the mega number.