Lab 1920 - Keno


Keno is a game of chance popular in restaraunts in larger casinos, such as in Las Vegas. The player typically sits down to order a meal, and while she waits, she picks up a keno card from a dispenser at the table. The keno card has 80 squares on it, typically arranged like this:

1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40

41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80

The player will mark her lucky numbers on the keno card, perhaps one number, or six numbers, or even more. Once she has marked the card, the keno runner stops by the table and picks up the card and the amount of the bet. What the player is betting is that her numbers will be those chosen randomly by the computer for this particular keno game. The keno runner leaves, the patron orders lunch, and waits.

Within a few minutes, the game is played as a computer chooses 20 of the 80 numbers. From every table in the restaraunt, patrons can see an electronic display board that looks like the keno card. As numbers are picked randomly by the computer, they show up on the keno display. In our example, lets say she picked four numbers and marked them on her keno card: 11, 15, 47 and 76. When the game numbers were chosen, she noticed that 11, 47 and 76 were among the 20 selected by the computer. Checking the keno payout chart at her table, she hit 3 of 4 spots. For her $5 bet, she will get a payoff of $20 resulting in a $15 profit.


Gambling is supposed to be entertainment, yet some people are convinced they can win money consistently at keno. Which keno bets have the highest mathematical percentage payoff for a hypothetical $5 bet? Is it choosing 1 spot and hoping for a hit? That would pay $15 for a $10 profit, but it would only happen 1 in 4 games. If you started with $20 and played 4 games, your number may well have hit once (20/80 probability on each game) and you would have invested the $20 in four $5 bets. That one hit would net $15 for you $20 bet. That's a 75% payout, which isn't very good by casino standards.

What about choosing two spots? Hit them both and your $5 returns $60. Is that a better deal? You assignment is to find the best number of spots to choose in terms of payout. For simplicity, assume the bet is always $5, though in actual play several wager amounts are available. I am also limiting the number of "picks" to eleven numbers, since this allows casinos to be compared. Nearly all casinos have payout tables on a $5 bet through a maximum of 11 numbers. I have collected keno payout cards from several casinos, such as Bally's, the Bellagio and the Casa Blanca in Las Vegas. For legal reasons, I will identify two of the three of them as Casino A and Casino B. Neither your analysis, even if done right, nor my solution should be used to conclude anything about the casinos mentioned. Here is the start of an actual keno payout chart for a $5 wager from Casino A.

spots   hit     payout
1       1       15
2       2       60
3       2       5
3       3       215
4       2       5
4       3       20
4       4       575
5       3       10
5       4       100
5       5       2500
6       3       5
6       4       20
6       5       450
6       6       7500

The complete chart, formatted for student use in plain text, is here.

Class Notes

Unlike many of my lab assignments, you are responsible for the complete design of this project. Think about what objects model the actual sequence of the game. You have to choose the data structures. You have to choose the algorithms. You have to decide how to input and represent the keno payout chart. Here's a hint: at Casino A, four spots chosen hitting 2, 3 or 4 pays $5, $20, and $575 respectively, while at Casino B those same hits result in payouts of $5, $15 and $625 for the same $5 bet. Design your solution such that it's easy to generalize your solution to answer the question not "which bet" but "which casino" is best for playing keno. If you are researching this, look under "Monte Carlo simulation." Your results will be based on many trials, not on mathematical analysis of the casino data.


The basic lab answers the question "How many spots should I choose for the best payout?" Since you are using Casino A data, your answer is specific to that casino. But what about Casino B? Is it the same number of spots there for the best payout? Also, answer the question: which casino has the highest payout for keno? To do this, you should make the assumption that the number of spots chosen, 1 through 11, occurs with equal probability. You'll need the Casino B payout chart, again stopping at eleven picks to allow comparison.

Copyright © 2010 by Asylum Computer Services LLC Return to CS Labs