The Mathematics of



The Lottery


Black Jack


Slot Machines

Problems and Exercises

Solutions to Exercises

Gambling Systems



Just to define: Probability or Odds????

Probability is defined as the chance of an event divided by the total number of outcomes - such as heads on a fair coin 1/2

Rolling a 2 on a fair die 1/6

Pulling an ace out of a deck of 52 cards 4/52

Odds is the chance of winning compared to the chance of losing - such as heads on a fair coin 1:1

Rolling a two on a fair die 1:5

Pulling an ace out of a deck of 52 cards 4:48


Lotteries are similar to slot machines since they are random events that do not rely on pass events. The balls, however, are dependent upon one being selected and leaving a smaller set to choose from. The Kentucky Lottery has 6 numbers to be chosen from 42 numbers. The first ball selected has 1 out of 42 possible while the second is 2 out of 41. Therefore, the jackpot is (6/42)(5/41)(4/40)(3/39)(2/38)(1/37)=1/5245786. The back of a Lotto Kentucky, however, approximates a match as 1 in 5246000. The Powerball, on the other hand, is calculated as a match of 5 numbers out of 49 and one powerball out of 42 possible. Therefore, the chances are (5x4x3x2x1x1)/(49x48x47x46x45x42)=1 in 80089128.The back of both lottery incorrectly states that the probability is 1 in 80089128 or 1 in 5245786 when actually this is the probability of winning. Furthermore, the odds were calculated on the back of the ticket as 1 in 34.7 chances of winning a cash prize. (On the back of both scan-tron sheets is a web address )



Lotto Kentucky

Match probability Win

6 numbers 1/5245786 jackpot

5 numbers 1/850668 $1,000 cash

4 numbers 1/ 111930 $50 cash

The Probability for 6 numbers was calculated by (6/42)(5/41)(4/40)(3/39)(2/38)(1/37)=1/5245786.The process is the total numbers you have out of the total of possible choices such as you have 6 numbers out of 42 correct and 5 out of 41 until n=1 out of 42-6 in this case.


Match in pick 5 Match in Powerball Probability Win

5 1 1/ 80089128 Grand Prize

5 0 1/ 1906884 $100,000

4 1 1/8898792 $5,000

4 0 1/211876 $100

3 1 1/773808 $100

3 0 1/18424 $7

2 1 1/49392 $7

1 1 1/2058 $4

0 1 1/42 $3

The Probability was calculated as above except when having the powerball; the probability is multiplied by 42. For example, pick 1 and a powerball is 1/(49x42)=1/2058. In a more difficult example, pick 3 and the powerball is calculated by (3/49)(2/48)(1/47)(1/42)= 1/773808.



Rules of Play

All you need to know your first time playing is about the pass line and taking odds. By playing both of these the overall house advantage will be only 0.57% for a table with typical rules (full double odds) which is far better than most other forms of casino gambling.

Below are the rules and procedure of the pass line bet:

1.Place bet.

2.Roll dice.

3.If roll is 7 or 11 you win even money (end of game).

4.If roll is 2, 3, or 12 you lose (end of game).

5.If roll is 4, 5, 6, 8, 9, or 10 call the roll the "point." A white disk will we placed on the table to reflect what the point is. In the diagram at the top of the page the point is 4.

6.Roll the dice again.

7.If the roll from step 6 is the point you win even money (end of game).

8.If the roll from step 6 is a 7 you lose (end of game).

9.If the roll from step 6 is anything other than the point and a 7 then repeat step 6.

The pass line only has a house advantage of 7/495 =~ 1.41%. (To see how house advantage is calculated, see roulette section) However once a point has been established you may make another bet in which the house advantage is exactly 0. This additional bet is called the "odds" and the maximum is restricted to some multiple of the pass line bet. The odds bet is an additional wager that the point will be thrown before a 7. After a point is established it wins when the pass line bet wins and loses when the pass line bet loses. However unlike the pass line bet it pays more than even money. If the point is a 6 or 8 the odds pay 6:5, if the point is a 5 or 9 the odds pay 3:2, and if the point is a 4 or 10 the odds pay 2:1.

The multiple you may bet on the odds is usually twice the pass line bet. However if someone bets $2 on the pass line, then $4 of the odds with a point of 6 or 8, and then wins he would be due $4.80. To avoid this messy change most casinos have "full double odds" which means that if the point is 6 or 8 you may bet 2.5 times the pass line bet on the odds. So if you bet $2 on the pass line you may bet $5 on the odds if the point is a 6 or 8, which can win an even $6.

Now that you understand the theory of the game you need to know the etiquette. At the beginning of a round place your pass line bet on the pass line. This runs along the entire table so nobody has to reach to put money on it. Remember to wait until a new round begins, while you can place this bet after a point is established it would be foolish to. If after placing your pass line bet a point is established then you place you odds bet next to your pass line bet but just outside the pass line itself. When you win or lose the dealers will be busy either collecting chips or paying people off. They will go around the table, paying people off or taking their bets one at a time. If you win they will place your winnings next to your wagers. After they pay you off you may do what you wish with the money, but do not touch your bets until they pay you off.

Other things to know is that when you throw the dice they are supposed to rebound off the opposite side of the table, although this is not a hard and fast rule. You are not allowed to put drinks where the chips are but instead on a lower shelf. Try to know what you are doing, the craps dealers work hard and fast and don't have much time to explain the rules to beginners. If you act like a beginner the dealers or other players will often encourage you to place other bets on the table. Remember that most of the other bets are sucker bets and politely decline suggestions to bet on anything other than the pass line and the odds.

Craps Odds and Probability

There are 36 possibilities on a throw of two fair dice. Below are listed the combinations, with the chances of getting each of the numbers.

# combinations probability

2 (1,1) 1/36

3 (1,2) (2,1) 2/36

4 (1,3) (2,2) (3,1) 3/36

5 (1,4) (2,3) (3,2) (4,1) 4/36

6 (1,5) (2,4) (3,3) (4,2) (5,1) 5/36

7 (1,6) (2,5) (3,4) (4,3) (5,2) (6,1) 6/36

8 (2,6) (3,5) (4,4) (5,3) (6,2) 5/36

9 (3,6) (4,5) (5,4) (6,3) 4/36

10 (4,6) (5,5) (6,4) 3/36

11 (5,6) (6,5) 2/36

12 (6,6) 1/36

So, on the first roll, the probabilities are as follows:

7 or 11 (even money) 6/36 + 2/36 = 8/36

2,3, or 12 (crap out) 1/36 + 2/36 + 1/36 = 4/36

4,5,6,8,9, or 10 (establish point, roll again) 3/36 + 4/36 + 5/36 + 5/36 + 4/36 + 3/36 = 24/36

On the second roll, the probabilities are as follows:

Probability of losing on second roll

Roll a 7 6/36

Probability of winning on the second roll, if the point is…..-

4 or 10 3/36 5 or 9 4/36 6 or 8 5/36

Probability of having to roll again on the second roll, if the point is………….

4 or 10 27/36 5 or 9 26/36 6 or 8 25/36


So, to calculate the probability of losing in one or two rolls

Probability of losing on one + probability of losing on two (roll again x lose)

4/36 + (24/36)(6/36) = 8/36




Basics of Blackjack:

1. Cards between 2 and 10 are worth their face value.

2. An ace is worth either one or eleven.

3. Face cards are worth 10 points.

4. The object of the game is to reach 21 without going bust or beat the dealer who must stand at

17 or higher but he too can bust.

5. The player and dealer receive two cards such that one is face up and both can opt to hit, take

another card in hopes of getting 21 or beating the opponent.

6. If the player or dealer opts not to take a hit then they stand.

7. If the player has two of a kind then he can split his hand into two hands.


Many systems have been devised to beat the odds but card counting is illegal and a person can be thrown out if caught. A strategy by Edwin Thorp is presented at .He presents a table of when to hit, stand, or split a hand but as all strategies it is not a sure bet to win every time.



Bust Percentages Table

You Have Chances of Busting

12 31%

13 38% .

14 46% .

15 54% .

16 61% .

17 69% .

18 77% .

19 85% .

20 92%

The chances of busting were calculated by taking the remaining possible choices of going bust divided by 52. For example, if you have 20 then the only cards possible without going bust is the ace since it can be worth one or 52-4aces leaves 48 ways to go bust out of 52 is 92%. In the case of 19, the remaining ways of not going bust is either an ace or a two (8 cards) so 52-8 leaves 44 ways to bust out of 52, (48/52)x100%=85%.

Combinations with 52 cards

Total with two cards Possible Combinations from 52 cards

21 64 .

20 136 .

19 80 .

18 86 .

17 96 .

16 86 .

15 96 .

14 102 .

13 118

The only possible way of getting 21 is an ace and a face card or a ten. Therefore, there are 4x4+4x4+4x4+4x4=64. Nineteen, however, can be achieved by having an ace and 8 (4x4), a ten and nine (4x4), a jack and 9 (4x4), a queen and 9 (4x4), or a king and 9 (4x4) which adds up to 80. The total possible combinations with two cards is 52x51=2652. Therefore, the odds for 21 is 64: (2652-64) or 64: 2588.


Rules of Play

Roulette is a brainless game that doesn't pay well.

A roulette wheel is divided into 38 pockets. Thirty six of them are numbered and colored red or black. There are eighteen of each color. The remaining two pockets are green and numbered 0 and 00. You can bet inside bets on any of the numbers or split your bet between two or more numbers. You can bet just the even or odd numbers, just red or black or the first, second or third set of the 36 numbers. These are called outside bets.

The bet that you make determines the payoff. For example, a bet on a whole number (straight bet), the odds are one in thirty eight and the payoff is 35 to 1. Similarly, a bet made of four numbers (a square bet), the payoff is eight to one.

Since the payoffs on roulette are calculated as if there are 36 numbers on the wheel, when in fact there are 38 numbers, this gives the house the largest advantage of any game. To calculate the house advantage, subtract the probability based on 38 numbers from the probability based on 36 numbers (the advantage) and divide by the probability based on 36.

For example, if you place a straight bet (pick one number)

1/36 - 1/38 = .0526 or an advantage of 5.26%


The good thing about Roulette is that it is easy to understand. Every bet, except one, has a house edge of 5.26%. The only bet that is worse than all the others is the combination of 0,00,1,2, and 3. This pays 6 to 1 and has a house advantage of 7.89%.


Slot Machines


Unfortunately I can not tell you the odds behind the slot machine because it is determined by a replaceable microchip. Modern slot machines determine random numbers between 1 to over 4 million. Therefore, each play is random and can not be determined by previous events. The slot machine works by the coin being registered by an optical sensor and the random number chosen at that instant determines the outcome. The microchip uses the random number to assign a particular outcome with a lookup table. The design of the lookup table determines the payoff in the long run by stopping the reels on exactly that outcome. ( More information is available from


In the book Lady Luck, the slot machine is known as the "One-Armed Bandit". Atypical slot machine has three dials, each with 20 symbols (cherries, oranges, lemons, plums, bells, and bars). The symbols, however ,are not equally likely on each dial. The permutations possible is 20 x 20x 20=8000. The Jackpot is three bars but reel one has one, reel two has three bars and reel three has one bar. Thus, the average number of occurrences of a bar out of 8000 is 1x3x1=3.


Payoff on Typical Slot Machine

Paying Permutation Payoff Average Number of occurrences Average Total Paid

. per 8000 Trials Out per 8000 Trials

Bar Bar Bar 62 3 186

Bell Bell Bell 18 9 162

Bell Bell Bar 18 3 54

Plum Plum Plum 14 25 350

Plum Plum Bar 14 5 70

Orange Orange Orange 10 126 1260

Orange Orange Bar 10 18 180

Cherry Cherry Lemon 5 196 980

Cherry Cherry Bell 5 147 735

Cherry Cherry (not Bell or Lemon) 3 637 1911

Average number of winning plays in 8000 trials = 1169 Total Paid out = 5888

Average non-winning plays = 6831


Dials on Typical Slot Machine

Dial 1 Dial 2 Dial 3


Cherries 7 7 0

Oranges 3 6 7

Lemons 3 0 4

Plums 5 5 1

Bells 1 3 3

Bars 1 3 1

Total 20 20 20

Probability of a win on any one play is (1169/8000)= 0.146 Probability of a run of two wins is (1169/8000)x(1169/8000)=0.021 Note: each play is independent of the other plays



1. Roulette: Show why the house advantage is 7.89% on a bet of 0, 00, 1, 2 ,3 when the payout is 6 to 1.


2. Craps: Calculate the odds of winning on exactly the second roll.

3. Problems about Slot Machines

A. From the table under slot machines, what is the probability of a run of four wins?


B. If two days ago someone won with 2 bells and a bar, what is the probability of winning today?


C. Calculate the average occurrence of getting three cherries?

D. Calculate the average occurrence of getting an orange, bell, and a bar in this order?

4. Problems about Lotteries:

A. What is the odds of getting 4 numbers matched correctly from 49 possible?

B. What is the odds of matching four numbers out of 49and a powerball out of 42?


C. What is the odds of matching three numbers out of 49 and two powerballs out of 42?


D. Which ticket has accurately calculated the odds of winning the jackpot?

E. How much would you spend on purchasing all of the combinations possible for Lotto Ky when each combination is purchased for one dollar?


5. Problems in Blackjack

A. Show how to calculate the chances of going bust if you have 18.

B. Show how to calculate the possible combinations of getting 17 with two cards.

C. If the total combinations for 15 is 96. What is the odds for 15?


Another Gambling Quiz can be located at


1. Roulette: You have to calculate the payout compared to what the payout should be - if they are paying 6 to 1, that means if you put down a dollar and win, they give you 7. The probability of one of 0, 00,1,2,3 coming up is 5/36

so the solution is 1/7 - 5/36 = .0789

. 1/7


2. Craps: To calculate the probability of winning on exactly the second roll, you must calculate the probability of getting each point twice in a row and then sum those probabilities

(3/36)(3/36) + (4/36)(4/36) + (5/36)(5/36) + (5/36)(5/36) + (4/36)(4/36) +(3/36)(3/36) = 75/1296 = 5.79 %


3. Answers to Slot Machine Problems

A. 0.146^4=1/2193

B. 0.146, is a random event

C. 7x7x0=0

D. 3x3x1=9

4. Answers to Lottery Problems:

A. (49x48x47x46)/(4x3x2x1)= 1 in 211876

B. (211876)x42 = 1 in 8898792

C. (49x48x47x42x41)/(3x2x1x2x1)= 1 in 15863064

D. the Powerball

E. $5,245,786 [(6x5x4x3x2x1)/ (42x41x40x39x38x37)=1/ 5245786]


5. Answers to Problems in Blackjack

A. The cards that would not make me go bust are 3, 2, or ace so that leaves me with 40 cards to bust me.


B. The possible combinations are (10,7), (J,7), (Q,7), (K,7), (9,8), and (A,6). In each of these cases, we have 4 choices for say a ten and four choices for a 7 so there are 4x4=16 possible combinations for (10,7). This is also true for the other cases so 16x6cases gives 96 possible combinations for 17. This also checks with the chart found above from Lady Luck.

C. 96:(2652-96) or 96: 2556


The Truth About Betting Systems

One of the biggest myths about gambling is that games of luck can be beat by methods of varying bet size to manipulate the odds. Depending on how the system works in the long run you will either sacrifice a few large losses for many small wins or many small losses for a few big wins. In the long run you can't help but lose at games of pure luck. Regardless of what form of betting system you use the ratio of money lost to money bet will always approach the same constant the more you play, this is known in mathematics as the 'Law of Large Numbers.' Betting systems are just mathematical voodoo that will never survive the test of time. If you don't believe me here is what the Encyclopedia Britannica says under the subject of gambling:

"A common gamblers' fallacy called 'the doctrine of the maturity of the chances' (or 'Monte Carlo fallacy') falsely assumes that each play in a game of chance is not independent of the others and that a series of outcomes of one sort should be balanced in the short run by other possibilities. A number of 'systems' have been invented by gamblers based largely on this fallacy; casino operators are happy to encourage the use of such systems and to exploit any gambler's neglect of the strict rules of probability and independent plays."

Probability and Measure (second edition) by Patrick Billingsley provides a specific proof that betting systems do not win in the long run. On page 94 he states, "There are schemes that go beyond selection systems and tell the gambler not only whether to bet but how much. Gamblers frequently contrive or adopt such schemes in the confident expectation that they can, by pure force of arithmetic, counter the most adverse workings of chance." He then goes on with the proof that I will omit because anyone who would believe this fallacy probably wouldn't understand its disproof. At the end he concludes on page 95, "Thus no betting system can convert a subfair game into a profitable enterprise."

Following are the three most common fallacies that most gambling systems seem to be based on. The first fallacy is that if an event has not happened for a long time it becomes more likely to happen on the next trial. Generally people following a strategy based on this fallacy will bet more according to the number of trials they have just lost in a row. In the short run you stand a good chance of modest wins but at the expense of occasional large losses that more than offset the winnings. The second fallacy is that what has been happening is more likely to keep happening. A strategy based on this notion will increase the bet size according to the number of past wins in a row. This strategy can yield occasional large wins but at the expense of many smaller losing sessions. Again the losses will more than offset the wins in the long run. In games of luck like roulette and craps the ball or the dice have no memory. If the ball has landed in red 100 times in a row on a fair roulette wheel the probability is 9/19, as it always is, that it will be land in red on the next spin. The third fallacy is that you can beat the odds with systems that count on the what is to be expected in the long term to happen in the short term. For example in roulette the ratio of black numbers to red ones will approach 1 as the number of trials increase. You can devise systems that win when red and black happen in roughly equal proportions, however you can have substantial losses when they don't. While everything averages out in the long run, in the short run anything can happen.

To prove that all gambling systems lose in the long run I wrote a computer program in C++ to play one billion roulette trials under three different betting systems. Three players participated in the same trials. Player 1 bet 1 unit every time, in other words he was not using a betting system. Player 2 started a series of trials with a bet of $1 and increased his wager by $1 after every winning bet. A lost bet would constitute the end of a series and the next bet would be $1. Player 3 also started a series of bets with a bet of $1 but used a doubling strategy in that after a losing bet of $x he would bet $2x. A winning bet would constitute the end of a series and the next bet would be $1. To make it realistic I put a maximum bet on player 3 of $200.

Below are the results of the experiment:

Player 1

Total amount wagered = $1,000,000,000

Average wager = $1.00

Total loss = $52,667,912

Expected loss = $52,631,579

Ratio of loss to money wagered = .052668

Player 2

Total amount wagered = $1,899,943,349

Average wager = $1.90

Total loss = $100,056,549

Expected loss = $99,997,018

Ratio of loss to money wagered = .052663

Player 3

Total amount wagered = $5,744,751,450

Average wager = $5.74

Total loss = $302,679,372

Expected loss = $302,355,340

Ratio of loss to money wagered = .052688

As you can see the ratio of money lost to money wagered is always close to the normal house advantage of 1/19 =~ .052632 . In conclusion varying of bet size depending on recent past wins or losses makes no difference in outcome in the long run than always betting the same.

Remember, there is no easy way to win consistently!


Books used as resources

Silverstone, Sidney M. A Player's Guide to Casino Games , 1981

Weaver, Warren Lady Luck, Theory of Probability 1963

Wykes, Alan The Complete Illustrated Guide to Gambling, 1964

Web Pages used as resources