Keno, Lotteries, and the Urn Problem

Author

Ed Pegg Jr
April 21, 2003

An Urn has 10 good balls, and 70 bad balls.  20 balls are drawn at random.  What are the odds that exactly 6 of them are good?

This can be solved via the hypergeometric distribution function, also known as the Urn problem.

Urn[good_, bad_, draws_,  need_] := (({{good}, {need}})) (({{bad}, {draws - need}}))/(({{good + bad}, {draws}}))

The parentheses indicate the binomial coefficient.  Now that the function is set up, it is easy to solve the original problem.

Urn[10, 70, 20, 6] // N

1/Urn[10, 70, 20, 6] // N

In the original question, the odds are roughly 86 to 1 against 6 good balls being drawn out of 20.  

In Keno, a player picks numbers from 1 to 80, twenty of these numbers are drawn, and the payout is based on the number of matches.  For example, a player might pick 7 numbers, and match 4 of them.  In a fair game, the player would be paid 15 times his original bet.

KenoOdds  =  
      Table[MatrixForm[
          Table[{g, k,  Round[1/N[Urn[g, 70, 20, k]]] - 1}, {k, 0, g}]], {g, 
          2, 10}]

It can analyze various Lotteries.  In a 36-ball, pick 6 lottery, for example, the odds are roughly 23 to 1 against matching three numbers. N[1/Urn[6,30,6,3]] gives 23.9876 to 1.

LotteryOdds  =  
      Table[MatrixForm[
          Table[{g + 6, k,  Round[1/N[Urn[6, g, 6, k]]] - 1}, {k, 3, 
              6}]], {g, 30, 48}]

What are the odds of getting 3 aces in a 5 card poker hand?  It's about 1 in every 576 hands.  The odds are 23 to 1 against a bridge player getting 3 aces in 13 cards.

Table[{g, Round[1/N[Urn[4, 48, g, 3]]] - 1}, {g, 5, 30}]

In Bingo, a player has 24 numbers in the range 1 to 75.  In the "X" game, the "H" game, and the "complete fill" game, a player must match 8, 12, and 24 numbers before anyone else.  Based on the number of cards involved in the game, one can calculate approximately how many darws a game will require.  (Odds of winning Bingo are determined by the number of opponents).

BingoOdds  :=  
      Map[MatrixForm[
            Table[{#, k, 
                Round[1/N[Urn[#, 75 - #, k, #]]] - 1}, {k, #, # + 
                  40}]] &, {8, 12, 24}]