15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of...

66
15. Games of Chance Robert Snapp [email protected] Department of Computer Science University of Vermont Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 1 / 66

Transcript of 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of...

Page 1: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

15. Games of Chance

Robert [email protected]

Department of Computer ScienceUniversity of Vermont

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 1 / 66

Page 2: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

1 A Little History

2 Coin TossingPascal’s TrianglBinomial Coefficients

3 The Game of Craps

4 Probability TheoryIndependenceGeometric SeriesExpected Reward

5 Lotteries

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 2 / 66

Page 3: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

The History of Games of ChanceGames of chance are rooted in divination.

1 In belomancy arrows in a quiver are labeled according to different militaryoptions. The first arrow chosen from the quiver, or the one that flew the farthest,indicated the selection. A biblical reference to belomancy occurs in the book ofEzekial 21:21, “He shakes his arrows.”

2 The Korean game of chance, Nyout, is used for divination on the 15th day of thefirst month of the year (Hargrave, 1930).

3 Labeled yarrow sticks are thrown at random, and read for prophesy according tothe Chinese I Ching.

4 Herodotus (The Histories) describes Scythian soothsayers, who spread bundlesof sticks on the ground, for divination.

5 Suetonius (Divus Julius, XXXII) asserts that Julius Ceasar uttered “Jacta aleaest,” or “The die is cast,” as he crossed the Rubicon in 49 B.C. on his returnRome.

6 Tarot cards, used since the middle ages in Europe for predicting fortunes.7 Fortune cookies!

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 3 / 66

Page 4: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

KleromancySheep knucklebones, or astragali, usually land in one of four different positions, which are assigned thevalues 1, 3, 4, and 6. In Ancient Greece five were thrown together, and the resulting sum was identified ona table of prophesies. From the oracular tables of Adada and Limyra:

You will have a difficult harvest season.

You have this righteous judgement from the gods.

Succeeding, friend, you will fulfill a golden oracle.

Having done something carelessly, you will blame theGods.

The affair holds a noble understanding.

You will have a parting from the companions nowaround you.

Phoibos [Apollo] speaks plainly, “Stay, friend.”

You will go on more easily if you wait a short time.”

Completing many contests, you will seize the crown.

There are not crops to be reaped that were not sown.

There is nor fruit to take from a withered shoot.

The strife-bearing gift fulfills the oracle.

It is necessary to labor, but the change will beadmirable.

The four final positions of astragali; From left to right, one,three, four, and six points. From Jean-Marie L’Hôte, Histoiredes Jeux de Société, Flammarion, Paris, 1994, p. 566.

C. Knutson, Early Games of Dice, MacGregor Historic Games, www.historicgames.com, 2004.W. R. Halliday, Greek Divination: A Study of its Methods and Principles, Macmillin, London, 1913. (www.ancientlibrary.com/divination)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 4 / 66

Page 5: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Astragali

Knucklebones were also used in games. Hellenistic terra cotta. Capoue, Italy. 330–300 BCE.British Museum, London. From Jean-Marie L’Hôte, Histoire des Jeux de Société , Flammarion,Paris, 1994, p. 19.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 5 / 66

Page 6: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

The Game of Jacks?

Two girls playing jacks with knucklebones in the lower-left corner of Pieter Bruegel’sKinderspiele.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 6 / 66

Page 7: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Cowrie Shell Dice: India, 19th century

(Colin Mackenzie & Irving Finkel, Asian Games: The Art of Contest, Asia Society, 2004,page 42.)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 7 / 66

Page 8: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Stick Dice: India, 19th century

(Colin Mackenzie & Irving Finkel, Asian Games: The Art of Contest, Asia Society, 2004,page 40.)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 8 / 66

Page 9: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Cubic Dice: India, 19th century

(Colin Mackenzie & Irving Finkel, Asian Games: The Art of Contest, Asia Society, 2004,page 38.)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 9 / 66

Page 10: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Many sided dice: China, Han dynasty, 206 BCE– 220 CE

(Colin Mackenzie & Irving Finkel, Asian Games: The Art of Contest, Asia Society, 2004,page 43.)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 10 / 66

Page 11: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Coin TossingA coin offers two outcomes: H or T. (One may think of a coin as a two-sided die.)

Let’s now consider a sequence of coin tosses. For example, if a coin is tossed threetimes, we might see HTT (indicating that the first toss lands heads, and thesubsequent two tosses land tails). Other possibilities are THT, TTT, etc. How manydifferent sequences of length three exist?

This question can be answered by the multiplication principle. Let n1 denote thenumber of different possible outcomes for the first toss; n2, for the second toss; andn3 for the third. Here,

n1 D n2 D n3 D 2: (Why?)

Thus by the multiplication principle, the number of different outcomes equals

N D n1 � n2 � n3 D 2 � 2 � 2 D 23D 8:

How many different outcomes exist for a sequence of four tosses? How about fivetosses? Six tosses? Etc.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 11 / 66

Page 12: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Coin Tossing (cont.)It is not difficult to list all of the eight possibile sequences:

TTTHTT, THT, TTHHHT, HTH, THHHHH.

Note that there is only one sequence that contain exactly zero heads (or three tails),three sequences that contain exactly one head, three sequences that contain exactlytwo heads, and only one that contains exactly three heads.

How do these numbers relate to the number of different anagrams that can beformed with each set of letters? How many anagrams can be formed from the lettersin the word TTT? How many for HTT? etc.

How many different possible sequences exist for four consecutive coin tosses? Howmany of these contain exactly 0 heads? How many contain 1 head? How many 2heads? 3 heads? 4 heads?

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 12 / 66

Page 13: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Binary TreesIn a binary tree each node has two distinct branches: a left branch, and a rightbranch. (Some nodes will lack one or both of these, e.g., the leaf nodes).Let the left branch correspond to H and the right branch correspond to T. The levelcorrespond to the location of that toss in the sequence. A binary tree of depth 3displays every possible outcome of three consecutive coin tosses.

H

H

H

T

T

T H T

H

H

T

T H T

HHH HHT HTH HTT THH THT TTH TTT

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 13 / 66

Page 14: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Coin Tossing (cont.)If the coin is fair, then roughly one half of a batch of tosses lands H, the remainingtosses being T. We can use probability to express and quantify the regularity inrandom events.

Thus, for a fair coin: P fH g D P fT g D 1=2.

What is the probability of getting exactly one heads in three coin tosses?

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 14 / 66

Page 15: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Binary tree for five coin tossesRoot Node

L e a f N o d e s

depth=0

depth=1

depth=2

depth=3depth=4depth=5

The number of leaf nodes is 32. The probability of each (for a fair coin) is 1/32.In general, a complete binary tree of depth n has 2n leaf nodes.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 15 / 66

Page 16: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Coin Tossing: AnalysisConsider a sequence of n tosses of a fair coin. For example,

HHT HT T T HT HH � � �T„ ƒ‚ …n symbols

This sequence corresponds to a particular leaf node of a binary tree of depth n.Since the coin is fair, and there are 2n different leaf nodes on this tree, this sequenceof n tosses occurs with probability 1=2n.Let k denote the number of Hs in the above sequence. How many T s occur?The number of sequences of n symbols that have k Hs and .n � k/ T s equals thenumber of anagrams of that can be created using these symbols:

kŠ .n � k/Š

Thus, the probability of obtaining k heads and n � k tails in a sequence of n tosses(of a fair coin) is

P.k; n/ DnŠ

kŠ .n � k/Š

�1

2

�n

:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 16 / 66

Page 17: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Coin Tossing: Analysis

P.k; n/ DnŠ

kŠ .n � k/Š

�1

2

�n

P.k; n/

0 50 100 150 2000.00

0.05

0.10

0.15

0.20

0.25n=10

n=20

n=40

n=100n=200

Number of Heads (k)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 17 / 66

Page 18: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Pascal’s Triangle

1

2

1 1

1 1

3 31 1

1 4 6 4 1

1051 10 5 1

2015 1561 6 1

35 352171 21 7 1

70 56 28 8 1562881

126 84 36 9 1126843691

252 210 120 45 10 121012045101

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 18 / 66

Page 19: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Pascal’s Triangle (cont.)

1

2

1 1

1 1

3 31 1

1 4 6 4 1

1051 10 5 1

2015 1561 6 1

35 352171 21 7 1

70 56 28 8 1562881

126 84 36 9 1126843691

252 210 120 45 10 121012045101

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 19 / 66

Page 20: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Binomial Coefficients

n

k

!D

kŠ .n � k/Š;

1

2

1 1

1 1

3 31 1

1 4 6 4 1

1051 10 5 1

2015 1561 6 1

35 352171 21 7 1

70 56 28 8 1562881

126 84 36 9 1126843691

252 210 120 45 10 121012045101

n = 0

n = 1

n = 2

n = 3

n = 4

n = 5

n = 6

n = 7

n = 8

n = 9

n = 10

k = 0

k = 1

k = 2

k = 3

k = 4

k = 5

k = 6

k = 7

k = 8

k = 9

k = 10

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 20 / 66

Page 21: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

The Game of Craps: Simple RulesAt least two players are required. The player who rolls the dice is called the shooter.The other player is called the fader.

Each player places an equal sum into the pot.

Then, the shooter throws two dice.1 If the the first roll (come-out) is a 7 or 11, then the shooter wins the pot. “A

natural.”2 If the first roll is a 2, 3, or 12, then the fader wins. “Craps.”3 If the first roll is a 4, 5, 6, 8, 9, or 10, then that roll becomes the point. The

shooter continues to roll the dice until either:1 the point appears (in which case, the shooter wins); or,2 a 7 appears (in which case, the fader wins).

In this game, does either player have the advantage? If so, by how much?

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 21 / 66

Page 22: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Pair of DiceBefore we analyze the game of craps, lets study the probabilities of the differentoutcomes obtainable by a pair of dice. Assume we have a blue die and a red one.The following table shows that there are 36 different outcomes:

If the dice are fair, each event occurs with probability1

36.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 22 / 66

Page 23: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Hexary TreeThese outcomes can also be illustrated using a hexary tree (a tree with degree 6).The first level represents the six different outcomes of the blue die, and the secondlevel, the six different outcomes of the red die.

Root Node

3 6 L e a f N o d e s

level=1

level=2

1

1

2

2

3

3

4

4

5

5

6

6 123456 123456 123456 123456 123456

Each leaf node corresponds to a different outcome.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 23 / 66

Page 24: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Probability TheoryThe modern theory of probability is based on three concepts:

1 The set of elementary events, �.2 The set of all “measurable” events: all subsets of �.3 A probability measure P , which assigns a value between 0 and 1 to each

subset.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 24 / 66

Page 25: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Digression: What is a set?Recall that a set is a collection of elements. Like many concepts that we consider,sets are abstract. They can be used to describe many different collections. Forexample, the following sets are easy to enumerate:

The set of days of the week isfMonday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sundayg.

The set of outcomes of a single coin toss is fHeads; Tailsg.The set of suits in a standard deck of playing cards is f�;~;};|g.The set of odd positive integers less than 10 is f1; 3; 5; 7; 9g.

We can also speak of sets that are harder to enumerate, like

The set of cell phones on planet Earth.The set of games that can be played by two people.The set of possible configurations of a 3 � 3 � 3 Rubik’s cube.The set of possible games of craps.The set of integers Z, or the set real numbers, R.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 25 / 66

Page 26: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Digression: MembershipWe will often want a simple way to state that a particular element is contained bysome set, for example, that 13 is an integer. A common notation is to use the symbol2 to designate membership.

Thus13 2 Z

and if � represents the set of elementary events for the outcome of a pair of dice,then

.6; 6/ 2 �

indicates that double-sixes is a possible outcome.Likewise, one can write

.7; 0/ … �

to indicate that .7; 0/ is not an element of the set �.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 26 / 66

Page 27: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

SubsetsA set A is said to be a subset of another set B if every element of A is also anelement of B .We use the notation

A � B or, B � A

to indicate that A is a subset of B .

For example,f1; 3; 5g � f1; 2; 3; 4; 5; 6g;

andf1; 2; 3g � f1; 2; 3g:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 27 / 66

Page 28: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Digression: CardinalityThe cardinality of a set is the number of members it contains. Thus,

the cardinality of of the set of elementary events for a single coin toss, i.e.,fHeads; Tailsg equals 2.The cardinality of the set of configurations of a standard 3 � 3 � 3 Rubik’s cubeis 43,252,003,274,489,856,000.The cardinality of the set of elementary events for a pair of labeled dice equals36.The cardniality of the set of elementary events for a sequence of 10 coin tossesequals 210 D 1024.

Absolute value notation j � � � j is often used to denote cardinality.

Thus, if � D fHeads; Tailsg then j�j D 2.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 28 / 66

Page 29: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Elementary EventsA mathematician would call each possible roll, or outcome, an elementary event. Theset of elementary events, � (pronounced “omega”), is a set that contains everypossible elementary event. (For any given outcome, one (and only one) element of �

occurs.

Thus, for a pair of dice, � has 36 elements:

� D f.1; 1/; .1; 2/; .1; 3/; .1; 4/; .1; 5/; .1; 6/.2; 1/; .2; 2/; .2; 3/; .2; 4/; .2; 5/; .2; 6/.3; 1/; .3; 2/; .3; 3/; .3; 4/; .3; 5/; .3; 6/.4; 1/; .4; 2/; .4; 3/; .4; 4/; .4; 5/; .4; 6/.5; 1/; .5; 2/; .5; 3/; .5; 4/; .5; 5/; .5; 6/.6; 1/; .6; 2/; .6; 3/; .6; 4/; .6; 5/; .6; 6/g

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 29 / 66

Page 30: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Probability DistributionsA probability distribution, P , assigns a probability to each elementary event, suchthat

Each probability is greater than or equal to zero.All of the probabilities add up to 1.

In our example, these probabilities all equal 1/36:

P f.1; 1/g D1

36; P f.1; 2/g D

1

36; : : : ; P f.6; 6/g D

1

36:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 30 / 66

Page 31: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Events and ProbabilitiesSometime we want to consider other events that aren’t explicitly contained in �. Forexample, the event that the numbers shown on the two dice add up to 7. Ameasurable event, or event (for short), is any subset of �.

For example, let’s let S7 denote the event that the sum of the two dice equals 7. Then,

S7 D f.1; 6/; .2; 5/; .3; 4/; .4; 3/; .5; 2/; .6; 1/g

We often use the notation � to indicate that one set is a subset of another. ThusS7 � � denotes that the set S7 is a subset of set �, i.e. that every element of S7 isalso an element of �.

The probability of an event is obtained by computing the sum of the probabilities of itselements. Thus,

P.S7/ D1

36C

1

36C

1

36C

1

36C

1

36C

1

36D

1

6:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 31 / 66

Page 32: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Events and Probabilities (cont.)As we assume the dice are fair, each elementary event has the same probability of1=36.

Thus, we can compute the probability of rolling a sum of seven, as

P.S7/ D jS7j �1

36D 6 �

1

36D

1

6:

Let B1 denote the event that the blue die shows a one, i.e.,

B1 D f.1; 1/; .1; 2/; .1; 3/; .1; 4/; .1; 5/; .1; 6/g:

and let R6 denote the probability that the red die shows a six:

R6 D f.1; 6/; .2; 6/; .3; 6/; .4; 6/; .5; 6/; .6; 6/g:

Likewise if D denotes the outcome “doubles”, i.e.,

D D f.1; 1/; .2; 2/; .3; 3/; .4; 4/; .5; 5/; .6; 6/g:

Note that,

P.D/ D jDj �1

36D

1

6:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 32 / 66

Page 33: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Two Special EventsThere are two special events:

The null event, ;, also known as the empty set.The universal event, �, i.e., the entire set of elementary events.

It is always true that,P.;/ D 0 and P.�/ D 1:

In other words, something always happens.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 33 / 66

Page 34: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

The Algebra of EventsAs events are described by subsets, it is possible to obtain new events by applying setoperations. Let, A and B denote two events (or subsets of �). The three most basic setoperations are

union: A [ B D the subset of elementary events that occur in either A or B .

intersection: A \ B D the subset of elementary events that occur in both A and B

complement: A D represents the subset of elementary events that are not in A.

Set notation is often used to construct events from combinations of other events. For example,let D denote the event that a pair of dice lands “doubles.” That is

D D f.1; 1/; .2; 2/; .3; 3/; .4; 4/; .5; 5/; .6; 6/g:

Since D is a subset of � (that is D � �) we can evaluate the probability that D occurs byadding up the probabilities of its elementary events:

P.D/ D P f.1; 1/g C P f.2; 2/g C P f.3; 3/g C P f.4; 4/g C P f.5; 5/g C P f.6; 6/g D1

6:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 34 / 66

Page 35: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

IndependenceAnother way to approach the pair-of-dice problem, is to look at each die separately:For the blue die,

P fB1g D P f.1; 1/gCP f.1; 2/gCP f.1; 3/gCP f.1; 4/gCP f.1; 5/gCP f.1; 6/g D1

6:

Likewise, for the red die,

P fR6g D P f.1; 6/gCP f.2; 6/gCP f.3; 6/gCP f.4; 6/gCP f.5; 6/gCP f.6; 6/g D1

6:

Note that,

P.B1 \R6/ D .P f.1; 6/g D1

36; and, P.B1/ � P.R6/ D

1

6�

1

6D

1

36:

Two events A and B are said to be independent if

P.A \ B/ D P.A/ � P.B/:

Events that are not causally related are usually independent.Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 35 / 66

Page 36: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Back to CrapsThe shooter wins if one of the following eight events occurs:

E4 D ffirst roll D 4 and the next 4 occurs before a 7g

E5 D ffirst roll D 5 and the next 5 occurs before a 7g

E6 D ffirst roll D 6 and the next 6 occurs before a 7g

E7 D ffirst roll D 7g

E8 D ffirst roll D 8 and the next 8 occurs before a 7g

E9 D ffirst roll D 9 and the next 9 occurs before a 7g

E10 D ffirst roll D 10 and the next 10 occurs before a 7g

E11 D ffirst roll D 11g

Since it is impossible for more than one of these to occur at the same time,

P fshooter winsg D P.E4/C P.E5/C � � � C P.E11/:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 36 / 66

Page 37: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Analysis of Craps (cont.)Events E7 and E11 correspond to a natural. Since these sets are finite, theprobability of each event is easy to evaluate:Since there are six ways to roll a 7,

P fE7g D6

36D

1

6:

Similarly, since there are only two ways to roll an 11,

P fE11g D2

36D

1

18:

Thus the probability of rolling a natural is

P fnaturalg D P fE7g C P fE11g D1

6C

1

18D

2

9:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 37 / 66

Page 38: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Evaluating Harder ProbabilitiesBecause each of the events E4, E5, E6, E8, E9, and E10 are infinite, it is a littleharder to evaluate their probabilities.It is useful to know how to sum a geometric series

s D 1C x C x2C x3

C x4C � � �:

A simple example of this occurs when x D 1=2:

s D 1C1

2C

1

4C

1

8C

1

16C � � � C

1

2kC � � � :

This case can be evaluated geometrically.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 38 / 66

Page 39: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Geometric SeriesWe will evaluate a general geometric series

s D 1C x C x2C x3

C x4C � � �:

using the principle of self similarity. Multiplying both sides by x and then adding 1,yields

1C x � sD 1C x � .1C x C x2C x3

C x4C � � � /

D 1C x C x2C x3

C x4C x5

C � � � D s:

Solving the equation1C x � s D s;

yields 1 D s � x � s D .1 � x/s, or

s D1

1 � x:

Thus,1C x C x2

C x3C x4

C � � � D1

1 � x:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 39 / 66

Page 40: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Evaluating Harder Probabilities (cont.)As an example, note that

1C1

2C

�1

2

�2

C

�1

2

�3

C

�1

2

�4

C � � � D1

1 � 12

D 2;

and,

1C 0C 02C 03

C 04C � � � D

1

1 � 0D 1:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 40 / 66

Page 41: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Analysis of Craps (cont.)Now we consider event E4. Let,

p4 D probability of rolling a four with two dice

D P f.1; 3/g C P f.2; 2/g C P f.3; 1/g D3

36;

q D probability of rolling a seven D1

6;

r D probability of rolling anything but a four or seven D 1 � p4 � q:

Since consecutive rolls define independent events,

P.E4/ D P ffirst roll D 4 and the next 4 occurs before a 7g

D P ffirst roll D 4g � P fnext 4 occurs before the first 7g

The first factor is justP ffirst roll D 4g D p4:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 41 / 66

Page 42: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Analysis of Craps (cont.)The second factor is

P f4 occurs before 7g D P fnext roll = 4g

C P fnext roll is neither 4 nor 7, and following roll = 4g

C P fnext two rolls are neither 4 nor 7, and following roll = 4g

C P fnext three rolls are neither 4 nor 7, and following roll = 4g

C � � �C

D p4 C rp4 C r2p4 C r3p4 C � � �

D p4

�1C r C r2

C r3C � � �

�A geometric series!

D p4

1

1 � r(Now recall that r D 1 � p4 � q.)

Dp4

p4 C qD

112

112C

16

D1

3

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 42 / 66

Page 43: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

A Heuristic ArgumentIn a certain way, it is quite reasonable that

P f4 occurs before a 7g Dp4

p4 C qD

1

3:

Consider the sequences of rolls that end with the first occurrence of 4 or 7.For every sequence that ends with its first 4, e.g.,

2; 8; 3; 9; 5; 5; 9; 4;

there exists a corresponding sequence that ends with its first 7,

2; 8; 3; 9; 5; 5; 9; 7:

However, there are twice as many ways to roll 7, than 4. Thus the probability of the firstsequence (ending in 4) is half as likely as the second (ending in 7). Thus

P f4 occurs before a 7g D1

2� P f7 occurs before a 4g

D1

2.1 � P f4 occurs before a 7g/

Thus,

P f4 occurs before a 7g D1

3:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 43 / 66

Page 44: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Probability that the shooter wins

P.E4/ D P.ffirst roll D 4 and the next 4 occurs before a 7g/

D P.f4g/ �P.f4g before f7g/ D1

12�

1

3D

1

36

P.E5/ D P.ffirst roll D 5 and the next 5 occurs before a 7g/

D P.f5g/ �P.f5g before f7g/ D4

36�

4

10D

2

45

P.E6/ D P.ffirst roll D 6 and the next 6 occurs before a 7g/

D P.ffirst roll D 6 and the next 6 occurs before a 7g/

D P.f6g/ �P.f6g before f7g/ D5

36�

5

11D

25

396

P.E7/ D P.ffirst roll D 7g/ D1

6

P.E8/ D P.ffirst roll D 8 and the next 8 occurs before a 7g/ D25

396

P.E9/ D P.ffirst roll D 9 and the next 9 occurs before a 7g/ D2

45

P.E10/ D P.ffirst roll D 10 and the next 10 occurs before a 7g/ D1

36

P.E11/ D P.ffirst roll D 11g/ D2

36D

1

18

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 44 / 66

Page 45: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Probability that the Shooter Wins

P.fshooter winsg/ D P.E7/C P.E11/C 2 .P.E4/C P.E5/C P.E6//

D1

6C

1

18C 2

�1

36C

2

45C

25

396

D244

495D 0:4929

Similarly,

P.fhouse winsg/ D 1 � P.fshooter winsg/

D 1 �244

495D

251

495D 0:5071

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 45 / 66

Page 46: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

ExpectationThe Expected Reward, E is defined as the product of the value of the reward timesthe probability of winning the reward:

E D Reward � P.Winning/:

If the shooter is playing a game of craps, and the pot contains $100, then theexpected reward (for the shooter) would be

Eshooter D $100 �244

495D $49:29:

Thus, if the game were fair, it would only cost the shooter $49.29 for the chance towin $100. Craps, like life however, is not fair, as it usually would cost the shooter$50.00 to play for a $100 pot. Note that

Efader D $100 �251

495D $50:71:

Thus, on average, the fader earns a profit of $0.71 per game.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 46 / 66

Page 47: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Gambling Odds: f to sGamblers often represent a probability as an odds ratio, expressed as “f to s”, where f and s are twopositive numbers. This sort of odds ratio is used when all money is exchanged after the outcome of theevent has been determined. For example, if Alice accepts a $200 bet from Bob at 3 to 1 odds that the nextcoin toss will land tails, then Alice wins $600 from Bob if the event T occurs. Otherwise, Alice loses $200 toBob. (Note that no money is exchanged before the coin toss.)The expected value of this bet (for Alice) is thus

E D $600P.T /� $200P.H/:

Note that a positive loss corresponds to a negative reward. If the coin turns out to be fair then Alice is saidto have the advantage, as E D $200.

A bet placed with an odds ratio f to s is said to be fair, if the probabilities of success ps , and of failure,pf , satisfy

ps Ds

f C s; and, pf D

f

f C s:

In this case the expected value of the bet is

E D Rsps CRf pf D fs

f C sC .�s/

f

f C sD 0:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 47 / 66

Page 48: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Gambling Odds: f to s

For example

The odds of rolling double-sixes with two dice is 35 to 1.The odds that a fair coin lands heads is 1 to 1.The odds that a PowerBall Lottery ticket matches the winning numbers is146,107,961 to 1.The odds of being dealt blackjack is 631 to 32.

If the odds of winning are f to s, then the probability of winning is

s

f C s:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 48 / 66

Page 49: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Gambling PayoutsA wager is said to be fair, if the net payout matches the odds ratio. For example, if theodds are “3 to 1” then the winner in a fair game should receive $3 for every dollar thathe or she bet.

Casinos generally offer wagers to their advantage. Thus, in roulette, were the oddsare 38 to 1, the payout might only be 30 to 1.

Gamblers actually define two different kinds of odds ratios. A payout

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 49 / 66

Page 50: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

LotteriesI went on Saturday last to make a visit in the city; and as I passed throughCheapside, I saw crowds of people turning down towards the Bank, andstruggling who should first get their money into the new erected lottery. Itgave me a great notion of the credit of our present government andadministration, to find people press as eagerly to pay money, as they wouldto receive it; and at the same time a due respect for that body of men whohave found out so pleasing an expedient for carrying on the commoncause, that they have turned a tax into a diversion. The cheerfulness ofspirit, and the hopes of success, which this project has occasioned in thisgreat city, lightens the burden of the war, and puts me in mind of somegames which they say were invented by wise men who were lovers of theircountry, to make their fellow citizens undergo the tediousness and fatiguesof a long siege. I think there is a kind of homage due to fortune, (if I maycall it so) and that I should be wanting to my self, if I did not lay in mypretences to her favour, and pay my complements to her by recommendinga ticket to her disposal.The Tatler, January 1709.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 50 / 66

Page 51: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Some HistoryCeasar Augustus issued a lottery to raise revenue for city repairs.Il Lotto de Firenze, Florence Italy, in 1530.The Virginia Colonization Company raised revenue by lottery in 1612 (KingJames I).The U.S. Continental Congress issued lottery tickets in November 1776, to raise$500,000 for the Revolutionary War.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 51 / 66

Page 52: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

PowerBall LotteryFor each play, pick five white numbers from 1 to 55, plus one number from 1 to42.A match of 5 white numbers plus PowerBall wins the Jackpot.A match of 5 white numbers w/o PowerBall wins $200,000.A match of 4 white numbers plus PowerBall wins $10,000.A match of 4 white numbers w/o PowerBall wins $100.A match of 3 white numbers plus PowerBall wins $100.A match of 3 white numbers w/o PowerBall wins $7.A match of 2 white numbers plus PowerBall wins $7.A match of 1 white numbers plus PowerBall wins $4.A match of 0 white numbers plus PowerBall wins $3.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 52 / 66

Page 53: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

CombinationsThe probability of winning the PowerBall lottery is related to the number of way ofselecting the five white numbers (from 1 to 55) and the PowerBall number (from 1 to42). This is called a combination.

Consider the simpler problem of selecting three (lottery numbers) from a set of fivef1; 2; 3; 4; 5g. How many different selections are there?

In this case we can easily list them:

123 124 125 134 135 145234 235 245345

Note that there are a total of ten combinations, and each digit appears in exactly sixof the above selections. (This also equals the number of different triangles that canbe connected between five distinct vertices.)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 53 / 66

Page 54: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Counting CombinationsThis number of combinations 10 turns out to equal the number of distinct anagrams of“AAABB” (i.e., strings with three As and two Bs), which we know how to evaluate as

3Š 2ŠD 10:

This “coincidence” occurs because there is a one-to-one correspondence betweeneach combination of three numbers, and each permutation of these five letters:

1 2 3 4 5123 $ A A A B B124 $ A A B A B125 $ A A B B A134 $ A B A A B135 $ A B A B A145 $ A B B A A234 $ B A A A B235 $ B A A B A245 $ B A B A A345 $ B B A A A

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 54 / 66

Page 55: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Counting Combinations (cont.)With a little thought, you should be able to convince yourself that this one-to-onecorrespondence can be used to count the number of ways of selecting k objects froma set of size n, where k and n are arbitrary numbers, such that 0 � k � n. Simplycount the number of anagrams of k As and .n � k/ Bs:

kŠ .n � k/Š:

This number is so useful that a special notation is used. The symbol�

nk

�represents

the number of ways of selecting k objects from a set of size n, and for short is called“n choose k”. Thus,

n

k

!D

kŠ .n � k/Š;

(This number is also called a binomial coefficient and appears in the k-th column ofthe n-th row in Pascal’s Triangle.)

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 55 / 66

Page 56: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Back to the PowerBallThus the number of ways of selecting 5 white numbers from the set f1; 2; : : : ; 55g, is

55

5

!D

55Š

5Š � 50ŠD 3478761:

Similarly, the number of ways of selecting 1 PowerBall number from the setf1; 2; : : : ; 42g, is

42

1

!D

42Š

1Š � 41ŠD 42:

For every way of selecting 5 white numbers, there are thus 42 ways of selecting thePowerBall number. Thus, but the multiplication principle, the number of differentlottery outcomes is

55

5

!�

42

1

!D 146107962:

For this problem, each outcome is an elementary event. Thus j�j D 146107962.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 56 / 66

Page 57: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Winning the Jackpot

In a given PowerBall Lottery, their are 5 winning white numbers and 50 losing whitenumbers. Similarly, there is 1 winning PowerBall number, and 41 losing PowerBallnumbers.

The number of elements in � that match all five winning numbers, and the winningPowerBall number is

5

5

!�

50

0

!�

1

1

!�

41

0

!D 1:

Since each is outcome is equally likely, the probability that a given ticket wins theJackpot is

p1 D P.Jackpot/ D1

146107962� 6:84425 � 10�9:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 57 / 66

Page 58: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Winning the Second Largest PrizeWhat is the probability of winning the second prize of $200,000?

The number of elementary events that match five of the winning white numbers, butnot the PowerBall is

5

5

!�

50

0

!�

1

0

!�

41

1

!D 41:

Thus,

p2 D P.Second Prize/ D41

146107962D 2:80614 � 10�7:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 58 / 66

Page 59: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Winning the Third Largest PrizeA ticket that matches 4 white numbers and the PowerBall wins a $10,000 prize.

The number of elementary events in � that are members of this event are 5

4

!�

50

1

!�

1

1

!�

41

0

!D 250:

Thus,

p3 D P.Third Prize/ D250

146107962D 1:71106 � 10�6:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 59 / 66

Page 60: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Winning the Fourth PrizeThere are two ways to win the fourth prize of $100. Either:

A. the ticket matches 4 white numbers without the PowerBall, orB . the ticket matches 3 white numbers with the PowerBall.

The number of ways that event A occurs is, 5

4

!�

50

1

!�

1

0

!�

41

1

!D 10250:

Similarly, the number of ways that event B occurs is, 5

3

!�

50

2

!�

1

1

!�

41

0

!D 12250:

Thus,

p4 D P.Fourth Prize/ D10250C 12250

146107962D 1:5400 � 10�4:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 60 / 66

Page 61: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Winning the Fifth PrizeThere are two ways to win the fifth prize of $7. Either

A. the ticket matches 3 white numbers and not the PowerBall, orB . it matches 2 white numbers and the PowerBall.

The number of ways that event A occurs is 5

3

!�

50

2

!�

1

0

!�

41

1

!D 502250:

The number of ways that event B occurs is 5

2

!�

50

3

!�

1

1

!�

41

0

!D 196000:

Since no elementary event falls into both categories,

p5 D P.Fifth Prize/ D502250C 196000

146107962D 0:004779:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 61 / 66

Page 62: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Winning the Sixth PrizeA ticket that matches 1 white number and the PowerBall wins a $4 prize.The number of elementary events in � of this type is

5

1

!�

50

4

!�

1

1

!�

41

0

!D 1151500:

Thus,

p6 D P.Sixth Prize/ D1151500

146107962D 0:00788116:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 62 / 66

Page 63: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Winning the Seventh PrizeA ticket that matches 0 white numbers and the PowerBall wins a $3 prize.The number of elementary events in � of this type is

5

0

!�

50

5

!�

1

1

!�

41

0

!D 2118760:

Thus,

p7 D P.Seventh Prize/ D2118760

146107962D 0:0145013:

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 63 / 66

Page 64: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

ExpectationConsider a lottery where there a multiple ways to win:

Reward R1 with probability p1;

Reward R2 with probability p2;

::::::

Reward Rn with probability pn;

The the expected reward is defined as

E D R1p1 CR2p2 C � � � CRnpn:

For the PowerBall, let’s assume a $5,000,000 jackpot, for R1. Then the expectedreward for a single PowerBall ticket equals,

E D .$5 � 106/ � .6:84425 � 10�9/C .$2 � 104/ � .2:90614 � 10�7/

C $104� .1:71106 � 10�6/C $102

� .1:5400 � 10�4/

C $7 � 0:004779C $4 � 0:0078811C $3 � 0:0145013

D $0:22: (Play responsibly!)Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 64 / 66

Page 65: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

Instant Wins and RafflesMany state lotteries also sponsor instant win lotteries. Often, one scratches off adecal to reveal if one has won a prize. Usually, one receives zilch. This is just like aticket raffle.

If each the probability of purchasing (or drawing) each ticket is equal, then, all of theprobabilities in the formula for the expected reward,

E D R1p1 CR2p2 C � � � CRnpn;

are equal. Thus,E D .R1 CR2 C � � � CRn/=n;

just the sum of all prizes divided by the number of tickets.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 65 / 66

Page 66: 15. Games of Chance - UVMrsnapp/teaching/cs32/lectures/cointosses.pdf · The History of Games of Chance Games of chance are rooted in divination. 1 In belomancy arrows in a quiver

For Further ReadingRichard A. Epstein, The Theory of Gambling and Statistical Logic, AcademicPress, San Diego, CA, 1995.John Scarne, Scarne On Dice, Stackpole Books, Harrisburgh, PA, 1974.William Feller, An Introduction to Probability Theory and Its Applications, Wiley,New York, 1957.

Robert R. Snapp © 2010, 2013 15. Games of Chance CS 32, Fall 2013 66 / 66