81
1 Introduction to Introduction to Discrete Discrete Probability Probability Rosen, section 5.1 Rosen, section 5.1 CS/APMA 202 CS/APMA 202 Aaron Bloomfield Aaron Bloomfield

1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

Embed Size (px)

Citation preview

Page 1: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

11

Introduction to Discrete Introduction to Discrete ProbabilityProbability

Rosen, section 5.1Rosen, section 5.1

CS/APMA 202CS/APMA 202

Aaron BloomfieldAaron Bloomfield

Page 2: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

22

TerminologyTerminology

ExperimentExperiment A repeatable procedure that yields one of a A repeatable procedure that yields one of a

given set of outcomesgiven set of outcomes Rolling a die, for exampleRolling a die, for example

Sample spaceSample space The range of outcomes possibleThe range of outcomes possible For a die, that would be values 1 to 6For a die, that would be values 1 to 6

EventEvent One of the sample outcomes that occurredOne of the sample outcomes that occurred If you rolled a 4 on the die, the event is the 4If you rolled a 4 on the die, the event is the 4

Page 3: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

33

Probability definitionProbability definition

The probability of an event occurring is:The probability of an event occurring is:

Where E is the set of desired events Where E is the set of desired events (outcomes)(outcomes)

Where S is the set of all possible events Where S is the set of all possible events (outcomes)(outcomes)

Note that 0 ≤ |E| ≤ |S|Note that 0 ≤ |E| ≤ |S|Thus, the probability will always between 0 and 1Thus, the probability will always between 0 and 1An event that will never happen has probability 0An event that will never happen has probability 0An event that will always happen has probability 1An event that will always happen has probability 1

S

EEp )(

Page 4: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

44

Dice probabilityDice probability

What is the probability of getting “snake-eyes” What is the probability of getting “snake-eyes” (two 1’s) on two six-sided dice?(two 1’s) on two six-sided dice? Probability of getting a 1 on a 6-sided die is 1/6Probability of getting a 1 on a 6-sided die is 1/6 Via product rule, probability of getting two 1’s is the Via product rule, probability of getting two 1’s is the

probability of getting a 1 AND the probability of getting probability of getting a 1 AND the probability of getting a second 1a second 1

Thus, it’s 1/6 * 1/6 = 1/36Thus, it’s 1/6 * 1/6 = 1/36

What is the probability of getting a 7 by rolling What is the probability of getting a 7 by rolling two dice?two dice? There are six combinations that can yield 7: (1,6), There are six combinations that can yield 7: (1,6),

(2,5), (3,4), (4,3), (5,2), (6,1)(2,5), (3,4), (4,3), (5,2), (6,1) Thus, |E| = 6, |S| = 36, P(E) = 6/36 = 1/6Thus, |E| = 6, |S| = 36, P(E) = 6/36 = 1/6

Page 5: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

55

PokerPoker

Page 6: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

66

The game of pokerThe game of poker

You are given 5 cards (this is 5-card stud poker)You are given 5 cards (this is 5-card stud poker)The goal is to obtain the best hand you canThe goal is to obtain the best hand you canThe possible poker hands are (in increasing order):The possible poker hands are (in increasing order):

No pairNo pair One pair (two cards of the same face)One pair (two cards of the same face) Two pair (two sets of two cards of the same face)Two pair (two sets of two cards of the same face) Three of a kind (three cards of the same face)Three of a kind (three cards of the same face) Straight (all five cards sequentially – ace is either high or low)Straight (all five cards sequentially – ace is either high or low) Flush (all five cards of the same suit)Flush (all five cards of the same suit) Full house (a three of a kind of one face and a pair of another Full house (a three of a kind of one face and a pair of another

face)face) Four of a kind (four cards of the same face)Four of a kind (four cards of the same face) Straight flush (both a straight and a flush)Straight flush (both a straight and a flush) Royal flush (a straight flush that is 10, J, K, Q, A)Royal flush (a straight flush that is 10, J, K, Q, A)

Page 7: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

77

Poker probability: royal flushPoker probability: royal flush

What is the chance ofWhat is the chance ofgetting a royal flush?getting a royal flush? That’s the cards 10, J, Q, K, That’s the cards 10, J, Q, K,

and A of the same suitand A of the same suit

There are only 4 possible There are only 4 possible royal flushesroyal flushes

Possibilities for 5 cards: C(52,5) = 2,598,960Possibilities for 5 cards: C(52,5) = 2,598,960

Probability = 4/2,598,960 = 0.0000015Probability = 4/2,598,960 = 0.0000015 Or about 1 in 650,000Or about 1 in 650,000

Page 8: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

88

Poker probability: four of a kindPoker probability: four of a kind

What is the chance of getting 4 of a kind when What is the chance of getting 4 of a kind when dealt 5 cards?dealt 5 cards? Possibilities for 5 cards: C(52,5) = 2,598,960Possibilities for 5 cards: C(52,5) = 2,598,960

Possible hands that have four of a kind:Possible hands that have four of a kind: There are 13 possible four of a kind handsThere are 13 possible four of a kind hands The fifth card can be any of the remaining 48 cardsThe fifth card can be any of the remaining 48 cards Thus, total possibilities is 13*48 = 624Thus, total possibilities is 13*48 = 624

Probability = 624/2,598,960 = 0.00024Probability = 624/2,598,960 = 0.00024 Or 1 in 4165Or 1 in 4165

Page 9: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

99

Poker probability: flushPoker probability: flush

What is the chance of getting a flush?What is the chance of getting a flush? That’s all 5 cards of the same suitThat’s all 5 cards of the same suit

We must do ALL of the following:We must do ALL of the following: Pick the suit for the flush: C(4,1)Pick the suit for the flush: C(4,1) Pick the 5 cards in that suit: C(13,5)Pick the 5 cards in that suit: C(13,5)

As we must do all of these, we multiply the As we must do all of these, we multiply the values out (via the product rule)values out (via the product rule)

This yields This yields

Possibilities for 5 cards: C(52,5) = 2,598,960Possibilities for 5 cards: C(52,5) = 2,598,960Probability = 5148/2,598,960 = 0.00198Probability = 5148/2,598,960 = 0.00198 Or about 1 in 505Or about 1 in 505

51481

4

5

13

Page 10: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1010

Poker probability: full housePoker probability: full house

What is the chance of getting a full house?What is the chance of getting a full house? That’s three cards of one face and two of another faceThat’s three cards of one face and two of another face

We must do ALL of the following:We must do ALL of the following: Pick the face for the three of a kind: C(13,1)Pick the face for the three of a kind: C(13,1) Pick the 3 of the 4 cards to be used: C(4,3)Pick the 3 of the 4 cards to be used: C(4,3) Pick the face for the pair: C(12,1)Pick the face for the pair: C(12,1) Pick the 2 of the 4 cards of the pair: C(4,2)Pick the 2 of the 4 cards of the pair: C(4,2)

As we must do all of these, we multiply the values out As we must do all of these, we multiply the values out (via the product rule)(via the product rule)

This yields This yields

Possibilities for 5 cards: C(52,5) = 2,598,960Possibilities for 5 cards: C(52,5) = 2,598,960Probability = 3744/2,598,960 = 0.00144Probability = 3744/2,598,960 = 0.00144

Or about 1 in 694Or about 1 in 694

37442

4

1

12

3

4

1

13

Page 11: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1111

Inclusion-exclusion principleInclusion-exclusion principle

The possible poker hands are (in increasing order):The possible poker hands are (in increasing order):

NothingNothing One pairOne pair cannot include two pair, three of a kind, cannot include two pair, three of a kind,

four of a kind, or full housefour of a kind, or full house Two pairTwo pair cannot include three of a kind, four of a cannot include three of a kind, four of a

kind, or kind, or full housefull house

Three of a kindThree of a kind cannot include four of a kind or full housecannot include four of a kind or full house StraightStraight cannot include straight flush or royal flushcannot include straight flush or royal flush FlushFlush cannot include straight flush or royal flushcannot include straight flush or royal flush Full houseFull house Four of a kindFour of a kind Straight flushStraight flush cannot include royal flushcannot include royal flush Royal flushRoyal flush

Page 12: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1212

Poker probability: three of a kindPoker probability: three of a kind

What is the chance of getting a three of a kind?What is the chance of getting a three of a kind? That’s three cards of one faceThat’s three cards of one face Can’t include a full house or four of a kindCan’t include a full house or four of a kind

We must do ALL of the following:We must do ALL of the following: Pick the face for the three of a kind: C(13,1)Pick the face for the three of a kind: C(13,1) Pick the 3 of the 4 cards to be used: C(4,3)Pick the 3 of the 4 cards to be used: C(4,3) Pick the two other cards’ face values: C(12,2)Pick the two other cards’ face values: C(12,2)

We can’t pick two cards of the same face!We can’t pick two cards of the same face! Pick the suits for the two other cards: C(4,1)*C(4,1)Pick the suits for the two other cards: C(4,1)*C(4,1)

As we must do all of these, we multiply the values out (via the As we must do all of these, we multiply the values out (via the product rule)product rule)

This yields This yields

Possibilities for 5 cards: C(52,5) = 2,598,960Possibilities for 5 cards: C(52,5) = 2,598,960Probability = 54,912/2,598,960 = 0.0211Probability = 54,912/2,598,960 = 0.0211

Or about 1 in 47Or about 1 in 47

549121

4

1

4

2

12

3

4

1

13

Page 13: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1313

Poker hand oddsPoker hand odds

The possible poker hands are (in increasing The possible poker hands are (in increasing order):order): NothingNothing 1,302,5401,302,540 0.50120.5012 One pairOne pair 1,098,2401,098,240 0.42260.4226 Two pairTwo pair 123,552123,552 0.04750.0475 Three of a kindThree of a kind 54,91254,912 0.02110.0211 StraightStraight 10,20010,200 0.003920.00392 FlushFlush 5,1405,140 0.001970.00197 Full houseFull house 3,7443,744 0.001440.00144 Four of a kindFour of a kind 624624 0.0002400.000240 Straight flushStraight flush 3636 0.00001390.0000139 Royal flushRoyal flush 44 0.000001540.00000154

Page 14: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1414

A solution to commenting your A solution to commenting your codecode

The commentator: The commentator: http://www.cenqua.com/commentatohttp://www.cenqua.com/commentator/r/

Page 15: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1616

Back to theory againBack to theory again

Page 16: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1717

More on probabilitiesMore on probabilities

Let Let EE be an event in a sample space be an event in a sample space SS. The . The probability of the complement of probability of the complement of EE is: is:

The book calls this Theorem 1The book calls this Theorem 1

Recall the probability for getting a royal flush is Recall the probability for getting a royal flush is 0.00000150.0000015 The probability of The probability of notnot getting a royal flush is getting a royal flush is

1-0.0000015 or 0.99999851-0.0000015 or 0.9999985

Recall the probability for getting a four of a kind Recall the probability for getting a four of a kind is 0.00024is 0.00024 The probability of The probability of notnot getting a four of a kind is getting a four of a kind is

1-0.00024 or 0.999761-0.00024 or 0.99976

)(1 EpEp

Page 17: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1818

Probability of the union of two Probability of the union of two eventsevents

Let Let EE11 and and EE22 be events in sample space be events in sample space SS

Then Then pp((EE11 U U EE22) = ) = pp((EE11) + ) + pp((EE22) – ) – pp((EE11 ∩ ∩ EE22))

Consider a Venn diagram dart-boardConsider a Venn diagram dart-board

Page 18: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

1919

Probability of the union of two Probability of the union of two eventsevents

S

E1 E2

p(E1 U E2)

Page 19: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2020

Probability of the union of two Probability of the union of two eventsevents

If you choose a number between 1 and If you choose a number between 1 and 100, what is the probability that it is 100, what is the probability that it is divisible by 2 or 5 or both?divisible by 2 or 5 or both?Let Let nn be the number chosen be the number chosen pp(2|(2|nn) = 50/100 (all the even numbers)) = 50/100 (all the even numbers) pp(5|(5|nn) = 20/100) = 20/100 pp(2|(2|nn) and ) and pp(5|(5|nn) = ) = pp(10|(10|nn) = 10/100) = 10/100 pp(2|(2|nn) or ) or pp(5|(5|nn) = ) = pp(2|(2|nn) + ) + pp(5|(5|nn) - ) - pp(10|(10|nn))

= 50/100 + 20/100 – = 50/100 + 20/100 – 10/10010/100

= 3/5= 3/5

Page 20: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2121

When is gambling worth it?When is gambling worth it?

This is a This is a statisticalstatistical analysis, not a moral/ethical discussion analysis, not a moral/ethical discussion

What if you gamble $1, and have a ½ probability to win $10?What if you gamble $1, and have a ½ probability to win $10? If you play 100 times, you will win (on average) 50 of those timesIf you play 100 times, you will win (on average) 50 of those times

Each play costs $1, each win yields $10Each play costs $1, each win yields $10For $100 spent, you win (on average) $500For $100 spent, you win (on average) $500

Average win is $5 (or $10 * ½) per play for every $1 spentAverage win is $5 (or $10 * ½) per play for every $1 spent

What if you gamble $1 and have a 1/100 probability to win $10?What if you gamble $1 and have a 1/100 probability to win $10? If you play 100 times, you will win (on average) 1 of those timesIf you play 100 times, you will win (on average) 1 of those times

Each play costs $1, each win yields $10Each play costs $1, each win yields $10For $100 spent, you win (on average) $10For $100 spent, you win (on average) $10

Average win is $0.10 (or $10 * 1/100) for every $1 spentAverage win is $0.10 (or $10 * 1/100) for every $1 spent

One way to determine if gambling is worth it:One way to determine if gambling is worth it: probability of winning * payout probability of winning * payout ≥≥ amount spent amount spent Or p(winning) * payout Or p(winning) * payout ≥ ≥ investmentinvestment Of course, this is a Of course, this is a statistical statistical measuremeasure

Page 21: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2222

When is lotto worth it?When is lotto worth it?

Many lotto games you have to choose 6 Many lotto games you have to choose 6 numbers from 1 to 48numbers from 1 to 48 Total possible choices is C(48,6) = 12,271,512Total possible choices is C(48,6) = 12,271,512 Total possible winning numbers is C(6,6) = 1Total possible winning numbers is C(6,6) = 1 Probability of winning is 0.0000000814Probability of winning is 0.0000000814

Or 1 in 12.3 millionOr 1 in 12.3 million

If you invest $1 per ticket, it is only statistically If you invest $1 per ticket, it is only statistically worth it if the payout is > $12.3 millionworth it if the payout is > $12.3 million As, on the “average” you will only make money that As, on the “average” you will only make money that

wayway Of course, “average” will require trillions of lotto Of course, “average” will require trillions of lotto

plays…plays…

Page 22: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2323

This may be a bit disturbing…This may be a bit disturbing…

Lots of piercings…Lots of piercings…

Page 23: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2424

BlackjackBlackjack

Page 24: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2525

BlackjackBlackjack

You are initially dealt two You are initially dealt two cardscards

10, J, Q and K all count as 1010, J, Q and K all count as 10 Ace is EITHER 1 or 11 Ace is EITHER 1 or 11

(player’s choice)(player’s choice)

You can opt to receive more You can opt to receive more cards (a “hit”)cards (a “hit”)You want to get as close to You want to get as close to 21 as you can21 as you can

If you go over, you lose (a If you go over, you lose (a “bust”)“bust”)

You play against the houseYou play against the house If the house has a higher If the house has a higher

score than you, then you losescore than you, then you lose

Page 25: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2626

Blackjack tableBlackjack table

Page 26: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2727

Blackjack probabilitiesBlackjack probabilities

Getting 21 on the first two cards is called a blackjackGetting 21 on the first two cards is called a blackjack Or a “natural 21”Or a “natural 21”

Assume there is onlyAssume there is only 1 deck of cards 1 deck of cardsPossible blackjack blackjack hands:Possible blackjack blackjack hands:

First card is an A, second card is a 10, J, Q, or KFirst card is an A, second card is a 10, J, Q, or K4/52 for Ace, 16/51 for the ten card4/52 for Ace, 16/51 for the ten card= (4*16)/(52*51) = 0.0241 (or about 1 in 41)= (4*16)/(52*51) = 0.0241 (or about 1 in 41)

First card is a 10, J, Q, or K; second card is an AFirst card is a 10, J, Q, or K; second card is an A16/52 for the ten card, 4/51 for Ace16/52 for the ten card, 4/51 for Ace= (16*4)/(52*51) = 0.0241 (or about 1 in 41)= (16*4)/(52*51) = 0.0241 (or about 1 in 41)

Total chance of getting a blackjack is the sum of the two:Total chance of getting a blackjack is the sum of the two: pp = 0.0483, or about 1 in 21 = 0.0483, or about 1 in 21 How appropriate!How appropriate! More specifically, it’s 1 in 20.72More specifically, it’s 1 in 20.72

Page 27: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2828

Blackjack probabilitiesBlackjack probabilities

Another way to get 20.72Another way to get 20.72

There are C(52,2) = 1,326 possible initial There are C(52,2) = 1,326 possible initial blackjack handsblackjack hands

Possible blackjack blackjack hands:Possible blackjack blackjack hands: Pick your Ace: C(4,1)Pick your Ace: C(4,1) Pick your 10 card: C(16,1)Pick your 10 card: C(16,1) Total possibilities is the product of the two Total possibilities is the product of the two

(64)(64)

Probability is 64/1,326 = 20.72Probability is 64/1,326 = 20.72

Page 28: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

2929

Blackjack probabilitiesBlackjack probabilities

Getting 21 on the first two cards is called a blackjackGetting 21 on the first two cards is called a blackjackAssume there is Assume there is an infinite deck of cardsan infinite deck of cards

So many that the probably of getting a given card is not affected by any So many that the probably of getting a given card is not affected by any cards on the tablecards on the table

Possible blackjack blackjack hands:Possible blackjack blackjack hands: First card is an A, second card is a 10, J, Q, or KFirst card is an A, second card is a 10, J, Q, or K

4/52 for Ace, 16/52 for second part4/52 for Ace, 16/52 for second part= (4*16)/(52*52) = 0.0236 (or about 1 in 42)= (4*16)/(52*52) = 0.0236 (or about 1 in 42)

First card is a 10, J, Q, or K; second card is an AFirst card is a 10, J, Q, or K; second card is an A16/52 for first part, 4/52 for Ace16/52 for first part, 4/52 for Ace= (16*4)/(52*52) = 0.0236 (or about 1 in 42)= (16*4)/(52*52) = 0.0236 (or about 1 in 42)

Total chance of getting a blackjack is the sum:Total chance of getting a blackjack is the sum: pp = 0.0473, or about 1 in 21 = 0.0473, or about 1 in 21 More specifically, it’s 1 in 21.13 (vs. 20.72)More specifically, it’s 1 in 21.13 (vs. 20.72)

In reality, most casinos use “shoes” of 6-8 decks for this reasonIn reality, most casinos use “shoes” of 6-8 decks for this reason It slightly lowers the player’s chances of getting a blackjackIt slightly lowers the player’s chances of getting a blackjack And prevents people from counting the cards…And prevents people from counting the cards…

Page 29: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3030

So always use a single deck, right?So always use a single deck, right?

Most people think that a single-deck blackjack table is Most people think that a single-deck blackjack table is better, as the player’s odds increasebetter, as the player’s odds increase

And you can try to count the cardsAnd you can try to count the cards

But it’s usually not the case!But it’s usually not the case!Normal rules have a 3:2 payout for a blackjackNormal rules have a 3:2 payout for a blackjack

If you bet $100, you get your $100 back plus 3/2 * $100, or $150 If you bet $100, you get your $100 back plus 3/2 * $100, or $150 additionaladditional

Most single-deck tables have a 6:5 payoutMost single-deck tables have a 6:5 payout You get your $100 back plus 6/5 * $100 or $120 additionalYou get your $100 back plus 6/5 * $100 or $120 additional This lowered benefit of being able to count the cards This lowered benefit of being able to count the cards

OUTWEIGHS OUTWEIGHS the benefit of the single deck!the benefit of the single deck!And thus the benefit of counting the cardsAnd thus the benefit of counting the cards

You cannot win money on a 6:5 blackjack table that uses 1 deckYou cannot win money on a 6:5 blackjack table that uses 1 deck Remember, the house always winsRemember, the house always wins

Page 30: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3131

Blackjack probabilities: Blackjack probabilities: when to holdwhen to hold

House usually holds on a 17House usually holds on a 17 What is the chance of a bust if you draw on a 17? 16? 15?What is the chance of a bust if you draw on a 17? 16? 15?

Assume all cards have equal probabilityAssume all cards have equal probability

Bust on a draw on a 18Bust on a draw on a 18 4 or above will bust: that’s 10 (of 13) cards that will bust4 or above will bust: that’s 10 (of 13) cards that will bust 10/13 = 0.769 probability to bust10/13 = 0.769 probability to bust

Bust on a draw on a 17Bust on a draw on a 17 5 or above will bust: 9/13 = 0.692 probability to bust5 or above will bust: 9/13 = 0.692 probability to bust

Bust on a draw on a 16Bust on a draw on a 16 6 or above will bust: 8/13 = 0.615 probability to bust6 or above will bust: 8/13 = 0.615 probability to bust

Bust on a draw on a 15Bust on a draw on a 15 7 or above will bust: 7/13 = 0.538 probability to bust7 or above will bust: 7/13 = 0.538 probability to bust

Bust on a draw on a 14Bust on a draw on a 14 8 or above will bust: 6/13 = 0.462 probability to bust8 or above will bust: 6/13 = 0.462 probability to bust

Page 31: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3232

Buying (blackjack) insuranceBuying (blackjack) insurance

If the dealer’s visible card is an Ace, the player can buy If the dealer’s visible card is an Ace, the player can buy insurance against the dealer having a blackjackinsurance against the dealer having a blackjack

There are then two bets going: the original bet and the insurance There are then two bets going: the original bet and the insurance betbet

If the dealer has blackjack, you lose your original bet, but your If the dealer has blackjack, you lose your original bet, but your insurance bet pays 2-to-1insurance bet pays 2-to-1

So you get twice what you paid in insurance backSo you get twice what you paid in insurance back

Note that if the player also has a blackjack, it’s a “push”Note that if the player also has a blackjack, it’s a “push”

If the dealer does not have blackjack, you lose your insurance If the dealer does not have blackjack, you lose your insurance bet, but your original bet proceeds normalbet, but your original bet proceeds normal

Is this insurance worth it?Is this insurance worth it?

Page 32: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3333

Buying (blackjack) insuranceBuying (blackjack) insurance

If the dealer shows an Ace, there is a 4/13 = 0.308 probability that If the dealer shows an Ace, there is a 4/13 = 0.308 probability that they have a blackjackthey have a blackjack

Assuming an infinite deck of cardsAssuming an infinite deck of cards Any one of the “10” cards will cause a blackjackAny one of the “10” cards will cause a blackjack

If you bought insurance 1,000 times, it would be used 308 (on If you bought insurance 1,000 times, it would be used 308 (on average) of those timesaverage) of those times

Let’s say you paid $1 each time for the insuranceLet’s say you paid $1 each time for the insuranceThe payout on each is 2-to-1, thus you get $2 back when you use The payout on each is 2-to-1, thus you get $2 back when you use your insuranceyour insurance

Thus, you get 2*308 = $616 back for your $1,000 spentThus, you get 2*308 = $616 back for your $1,000 spentOr, using the formula p(winning) * payout Or, using the formula p(winning) * payout ≥ ≥ investmentinvestment

0.308 * $2 0.308 * $2 ≥≥ $1 $1 0.616 0.616 ≥≥ $1 $1 Thus, it’s not worth itThus, it’s not worth it

Buying insurance is considered a very poor option for the playerBuying insurance is considered a very poor option for the player Hence, almost every casino offers itHence, almost every casino offers it

Page 33: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3434

Blackjack Blackjack strategystrategy

These tables tell These tables tell you the best move you the best move to do on each handto do on each hand

The odds are still The odds are still (slightly) in the (slightly) in the house’s favorhouse’s favor

The house always The house always wins…wins…

Page 34: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3535

Why counting cards doesn’t work Why counting cards doesn’t work well…well…

If you make two or three mistakes an hour, If you make two or three mistakes an hour, you lose any advantageyou lose any advantage And, in fact, cause a disadvantage!And, in fact, cause a disadvantage!

You lose lots of money learning to count You lose lots of money learning to count cardscards

Then, once you can do so, you are Then, once you can do so, you are banned from the casinosbanned from the casinos

Page 35: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3636

This wheel is This wheel is spun if:spun if: You get a natural You get a natural

blackjackblackjack You place $1 on You place $1 on

the “spin the the “spin the wheel” squarewheel” square

You lose the You lose the dollar either waydollar either way

You win the You win the amount shown amount shown on the wheelon the wheel

As seen inAs seen ina casinoa casino

Page 36: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3737

Is it worth it to place $1 on the Is it worth it to place $1 on the square?square?

The amounts on the wheel are:The amounts on the wheel are: 30, 1000, 11, 20, 16, 40, 15, 10, 50, 12, 25, 1430, 1000, 11, 20, 16, 40, 15, 10, 50, 12, 25, 14 Average is $103.58Average is $103.58

Chance of a natural blackjack:Chance of a natural blackjack: pp = 0.0473, or 1 in 21.13 = 0.0473, or 1 in 21.13

So use the formula: So use the formula: p(winning) * payout p(winning) * payout ≥ ≥ investmentinvestment 0.0473 * $103.58 0.0473 * $103.58 ≥≥ $1 $1 $4.90 $4.90 ≥≥ $1 $1 But the house always wins! So what happened?But the house always wins! So what happened?

Page 37: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3838

Note that not all Note that not all amounts have an amounts have an equal chance of equal chance of winningwinning There are 2 There are 2

spots to win $15spots to win $15 There is ONE There is ONE

spot to win spot to win $1,000$1,000

Etc.Etc.

As seen inAs seen ina casinoa casino

Page 38: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

3939

Back to the drawing boardBack to the drawing board

If you weight each “spot” by the amount it If you weight each “spot” by the amount it can win, you get $1609 for 30 “spots”can win, you get $1609 for 30 “spots” That’s an average of $53.63 per spotThat’s an average of $53.63 per spot

So use the formula: So use the formula: p(winning) * payout p(winning) * payout ≥ ≥ investmentinvestment 0.0473 * $53.63 0.0473 * $53.63 ≥≥ $1 $1 $2.54 $2.54 ≥≥ $1 $1 Still not there yet…Still not there yet…

63.53$30

3*40$2*16$3*20$3*11$1*1000$3*30$

Page 39: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4040

My theoryMy theory

I think the wheel is weighted so the $1,000 side of the I think the wheel is weighted so the $1,000 side of the wheel is heavy and thus won’t be chosenwheel is heavy and thus won’t be chosen

As the “chooser” is at the topAs the “chooser” is at the top But I never saw it spin, so I can’t say for sureBut I never saw it spin, so I can’t say for sure

Take the $1,000 out of the 30 spot discussion of the last Take the $1,000 out of the 30 spot discussion of the last slideslide

That leaves $609 for 29 spotsThat leaves $609 for 29 spots Or $21.00 per spotOr $21.00 per spot

So use the formula: So use the formula: p(winning) * payout p(winning) * payout ≥ ≥ investmentinvestment 0.0473 * $21 0.0473 * $21 ≥≥ $1 $1 $0.9933 $0.9933 ≥≥ $1 $1

And I’m probably still missing something here…And I’m probably still missing something here…Remember that the house always wins!Remember that the house always wins!

Page 40: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

41

Quick surveyQuick survey

I felt I understood Blackjack I felt I understood Blackjack probability…probability…

a)a) Very wellVery well

b)b) With some review, I’ll be goodWith some review, I’ll be good

c)c) Not reallyNot really

d)d) Not at allNot at all

Page 41: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

42

Quick surveyQuick survey

If I was going to spend money If I was going to spend money gambling, would I choose gambling, would I choose Blackjack?Blackjack?

a)a) Definitely – a way to make moneyDefinitely – a way to make money

b)b) PerhapsPerhaps

c)c) Probably notProbably not

d)d) Definitely not – it’s a way to lose Definitely not – it’s a way to lose moneymoney

Page 42: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4343

Today’s dose of Today’s dose of demotivatorsdemotivators

Page 43: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4444

RouletteRoulette

Page 44: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4545

RouletteRoulette

A wheel with 38 spots is spunA wheel with 38 spots is spun Spots are numbered 1-36, 0, and 00Spots are numbered 1-36, 0, and 00 European casinos don’t have the 00European casinos don’t have the 00

A ball drops into one of the 38 spotsA ball drops into one of the 38 spotsA bet is placed as A bet is placed as to which spot or to which spot or spots the ball will spots the ball will fall intofall into Money is then paid Money is then paid

out if the ball lands out if the ball lands in the spot(s) you in the spot(s) you bet uponbet upon

Page 45: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4646

The Roulette tableThe Roulette table

Page 46: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4747

The Roulette tableThe Roulette table

Bets can be Bets can be placed on:placed on: A single numberA single number Two numbersTwo numbers Four numbersFour numbers All even numbersAll even numbers All odd numbersAll odd numbers The first 18 numsThe first 18 nums Red numbersRed numbers

Probability:Probability:

1/381/38

2/382/38

4/384/38

18/3818/38

18/3818/38

18/3818/38

18/3818/38

Page 47: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4848

The Roulette tableThe Roulette table

Bets can be Bets can be placed on:placed on: A single numberA single number Two numbersTwo numbers Four numbersFour numbers All even numbersAll even numbers All odd numbersAll odd numbers The first 18 numsThe first 18 nums Red numbersRed numbers

Probability:Probability:

1/381/38

2/382/38

4/384/38

18/3818/38

18/3818/38

18/3818/38

18/3818/38

Payout:Payout:

3636xx

1818xx

99xx

22xx

22xx

22xx

22xx

Page 48: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

4949

RouletteRoulette

It has been proven that proven that no It has been proven that proven that no advantageous strategies exist advantageous strategies exist Including:Including: Learning the wheel’s biasesLearning the wheel’s biases

Casino’s regularly balance their Roulette wheelsCasino’s regularly balance their Roulette wheels Martingale betting strategyMartingale betting strategy

Where you double your bet each time (thus making up for all Where you double your bet each time (thus making up for all previous losses)previous losses)It still won’t work!It still won’t work!You can’t double your money foreverYou can’t double your money forever

It could easily take 50 times to achieve finally winIt could easily take 50 times to achieve finally win If you start with $1, then you must put in $1*2If you start with $1, then you must put in $1*25050 = =

$1,125,899,906,842,624 to win this way!$1,125,899,906,842,624 to win this way! That’s 1That’s 1 quadrillion quadrillion

See http://en.wikipedia.org/wiki/Martingale_(roulette_system) See http://en.wikipedia.org/wiki/Martingale_(roulette_system) for more infofor more info

Page 49: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

50

Quick surveyQuick survey

I felt I understood Roulette I felt I understood Roulette probability…probability…

a)a) Very wellVery well

b)b) With some review, I’ll be goodWith some review, I’ll be good

c)c) Not reallyNot really

d)d) Not at allNot at all

Page 50: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

51

Quick surveyQuick survey

If I was going to spend money If I was going to spend money gambling, would I choose Roulette?gambling, would I choose Roulette?

a)a) Definitely – a way to make moneyDefinitely – a way to make money

b)b) PerhapsPerhaps

c)c) Probably notProbably not

d)d) Definitely not – it’s a way to lose Definitely not – it’s a way to lose moneymoney

Page 51: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

5252

Monty Hall ParadoxMonty Hall Paradox

Page 52: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

5353

What’s behind door number three?What’s behind door number three?

The Monty Hall problem paradoxThe Monty Hall problem paradox Consider a game show where a prize (a car) is behind one of Consider a game show where a prize (a car) is behind one of

three doorsthree doors The other two doors do not have prizes (goats instead)The other two doors do not have prizes (goats instead) After picking one of the doors, the host (Monty Hall) opens a After picking one of the doors, the host (Monty Hall) opens a

different door to show you that the door he opened is not the different door to show you that the door he opened is not the prizeprize

Do you change your decision?Do you change your decision?

Your initial probability to win (i.e. pick the right door) is Your initial probability to win (i.e. pick the right door) is 1/31/3What is your chance of winning if you change your What is your chance of winning if you change your choice after Monty opens a wrong door?choice after Monty opens a wrong door?After Monty opens a wrong door, if you change your After Monty opens a wrong door, if you change your choice, your chance of choice, your chance of winningwinning is 2/3 is 2/3

Thus, your chance of winning Thus, your chance of winning doublesdoubles if you change if you change Huh?Huh?

Page 53: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

5555

Dealing cardsDealing cards

Consider a dealt hand of cardsConsider a dealt hand of cards Assume they have not been seen yetAssume they have not been seen yet What is the chance of drawing a flush?What is the chance of drawing a flush? Does that chance change if I speak words after the Does that chance change if I speak words after the

experiment has completed?experiment has completed? Does that chance change if I tell you more info about Does that chance change if I tell you more info about

what’s in the deck?what’s in the deck?

No!No! Words spoken after an experiment has Words spoken after an experiment has completedcompleted do do

not change the chance of an event happening by that not change the chance of an event happening by that experimentexperiment

No matter what is saidNo matter what is said

Page 54: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

5656

What’s behind door number one What’s behind door number one hundred?hundred?

Consider 100 doorsConsider 100 doors You choose oneYou choose one Monty opens 98 wrong doorsMonty opens 98 wrong doors Do you switch?Do you switch?

Your initial chance of being right is 1/100Your initial chance of being right is 1/100Right before your switch, your chance of being right is still 1/100Right before your switch, your chance of being right is still 1/100

Just because you know more info about the other doors doesn’t change Just because you know more info about the other doors doesn’t change your chancesyour chances

You didn’t know this info beforehand!You didn’t know this info beforehand!

Your final chance of being right is 99/100 if you switchYour final chance of being right is 99/100 if you switch You have two choices: your original door and the new doorYou have two choices: your original door and the new door The original door still has 1/100 chance of being rightThe original door still has 1/100 chance of being right Thus, the new door has 99/100 chance of being rightThus, the new door has 99/100 chance of being right The 98 doors that were opened were not chosen at random!The 98 doors that were opened were not chosen at random!

Monty Hall knows which door the car is behindMonty Hall knows which door the car is behind

Reference: http://en.wikipedia.org/wiki/Monty_Hall_problemReference: http://en.wikipedia.org/wiki/Monty_Hall_problem

Page 55: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

5757

A bit more theoryA bit more theory

Page 56: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

5858

An aside: probability of multiple An aside: probability of multiple eventsevents

Assume you have a 5/6 chance for an event to Assume you have a 5/6 chance for an event to happenhappen Rolling a 1-5 on a die, for exampleRolling a 1-5 on a die, for example

What’s the chance of that event happening twice What’s the chance of that event happening twice in a row?in a row?Cases:Cases: Event happening neither time: Event happening neither time: 1/6 * 1/6 = 1/361/6 * 1/6 = 1/36 Event happening first time: Event happening first time: 1/6 * 5/6 = 1/6 * 5/6 =

5/365/36 Event happening second time: Event happening second time: 5/6 * 1/6 = 5/365/6 * 1/6 = 5/36 Event happening both times: Event happening both times: 5/6 * 5/6 = 25/365/6 * 5/6 = 25/36

For an event to happen twice, the probabilityFor an event to happen twice, the probability is is the the productproduct of the individual probabilities of the individual probabilities

Page 57: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

5959

An aside: probability of multiple An aside: probability of multiple eventsevents

Assume you have a 5/6 chance for an event to happenAssume you have a 5/6 chance for an event to happen Rolling a 1-5 on a die, for exampleRolling a 1-5 on a die, for example

What’s the chance of that event happening What’s the chance of that event happening at least at least onceonce??Cases:Cases:

Event happening neither time: Event happening neither time: 1/6 * 1/6 = 1/361/6 * 1/6 = 1/36 Event happening first time: Event happening first time: 1/6 * 5/6 = 5/361/6 * 5/6 = 5/36 Event happening second time: Event happening second time: 5/6 * 1/6 = 5/365/6 * 1/6 = 5/36 Event happening both times: Event happening both times: 5/6 * 5/6 = 25/365/6 * 5/6 = 25/36

It’s 35/36!It’s 35/36!For an event to happen at least once, it’s For an event to happen at least once, it’s 1 minus the 1 minus the probability of it never happeningprobability of it never happeningOr 1 minus the compliment of it never happeningOr 1 minus the compliment of it never happening

Page 58: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6060

Probability vs. oddsProbability vs. odds

Consider an event that has a 1 in 3 chance of happeningConsider an event that has a 1 in 3 chance of happeningProbability is 0.333Probability is 0.333Which is a 1 in 3 chanceWhich is a 1 in 3 chanceOr 2:1 oddsOr 2:1 odds

Meaning if you play it 3 (2+1) times, you will lose 2 times for Meaning if you play it 3 (2+1) times, you will lose 2 times for every 1 time you winevery 1 time you win

This, if you have This, if you have xx::yy odds, you probability is odds, you probability is yy/(/(xx++yy)) The The yy is usually 1, and the is usually 1, and the xx is scaled appropriately is scaled appropriately For example 2.2:1For example 2.2:1

That probability is 1/(1+2.2) = 1/3.2 = 0.313That probability is 1/(1+2.2) = 1/3.2 = 0.313

1:1 odds means that you will lose as many times as you 1:1 odds means that you will lose as many times as you winwin

I think I presented this wrong last time…I think I presented this wrong last time…

Page 59: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6161

More demotivatorsMore demotivators

Page 60: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6262

Texas Hold’emTexas Hold’em

Reference:Reference:

http://teamfu.freeshell.org/http://teamfu.freeshell.org/poker_odds.htmlpoker_odds.html

Page 61: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6363

Texas Hold’emTexas Hold’em

The most popular poker variant todayThe most popular poker variant todayEvery player starts with two face down cardsEvery player starts with two face down cards Called “hole” or “pocket” cardsCalled “hole” or “pocket” cards Hence the term “ace in the hole”Hence the term “ace in the hole”

Five cards are placed in the center of the tableFive cards are placed in the center of the table These are common cards, shared by every playerThese are common cards, shared by every player Initially they are placed face downInitially they are placed face down The first 3 cards are then turned face up, then the The first 3 cards are then turned face up, then the

fourth card, then the fifth cardfourth card, then the fifth card You can bet between the card turnsYou can bet between the card turns

You try to make the best 5-card hand of the You try to make the best 5-card hand of the seven cards available to youseven cards available to you Your two hole cards and the 5 common cardsYour two hole cards and the 5 common cards

Page 62: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6464

Texas Hold’emTexas Hold’em

Hand progressionHand progression Note that anybody can fold at any timeNote that anybody can fold at any time Cards are dealt: 2 “hole” cards per playerCards are dealt: 2 “hole” cards per player 5 community cards are dealt face down (how this is done varies)5 community cards are dealt face down (how this is done varies) Bets are placed based on your pocket cardsBets are placed based on your pocket cards The first three community cards are turned over (or dealt)The first three community cards are turned over (or dealt)

Called the “flop”Called the “flop” Bets are placedBets are placed The next community card is turned over (or dealt)The next community card is turned over (or dealt)

Called the “turn”Called the “turn” Bets are placedBets are placed The last community card is turned over (or dealt)The last community card is turned over (or dealt)

Called the “river”Called the “river” Bets are placedBets are placed Hands are then shown to determine who wins the potHands are then shown to determine who wins the pot

Page 63: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6565

Texas Hold’em terminologyTexas Hold’em terminology

Pocket: your two face-down Pocket: your two face-down cardscardsPocket pair: when you have Pocket pair: when you have a pair in your pocketa pair in your pocketFlop: when the initial 3 Flop: when the initial 3 community cards are showncommunity cards are shownTurn: when the 4Turn: when the 4thth community card is showncommunity card is shownRiver: when the 5River: when the 5thth community community card is showncard is shownNuts (or nut hand): the best possible hand that you can hope for with Nuts (or nut hand): the best possible hand that you can hope for with the cards you have and the not-yet-shown cardsthe cards you have and the not-yet-shown cardsOuts: the number of cards you need to achieve your nut handOuts: the number of cards you need to achieve your nut handPot: the money in the center that is being bet uponPot: the money in the center that is being bet uponFold: when you stop betting on the current handFold: when you stop betting on the current handCall: when you match the current betCall: when you match the current bet

Page 64: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6666

Odds of a Texas Hold’em handOdds of a Texas Hold’em hand

Pick any poker handPick any poker hand We’ll choose a royal flushWe’ll choose a royal flush There are 4/2,598,960 possibilitiesThere are 4/2,598,960 possibilities

Chance of getting that in a Texas Hold’em game:Chance of getting that in a Texas Hold’em game: Choose your royal flush: C(4,1)Choose your royal flush: C(4,1) Choose the remaining two cards: C(47,2)Choose the remaining two cards: C(47,2)

Result is 4324 possibilitiesResult is 4324 possibilities Or 1 in 601Or 1 in 601 Or probability of 0.0017Or probability of 0.0017 Well, not really, but close enough for this slide set…Well, not really, but close enough for this slide set… This is much more common than 1 in 649,740 for stud poker!This is much more common than 1 in 649,740 for stud poker!

But nobody does Texas Hold’em probability that way, But nobody does Texas Hold’em probability that way, though…though…

Page 65: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6767

An example of a hand usingAn example of a hand usingTexas Hold’em terminologyTexas Hold’em terminology

Your pocket hand is J♥, 4♥Your pocket hand is J♥, 4♥The flop shows 2♥, 7♥, K♣The flop shows 2♥, 7♥, K♣There are two cards still to be revealed (the turn There are two cards still to be revealed (the turn and the river)and the river)Your nut hand is going to be a flushYour nut hand is going to be a flush As that’s the best hand you can (realistically) hope for As that’s the best hand you can (realistically) hope for

with the cards you havewith the cards you have

There are 9 cards that will allow you to achieve There are 9 cards that will allow you to achieve your flushyour flush Any other heartAny other heart Thus, you have 9 outsThus, you have 9 outs

Page 66: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6868

Continuing with that exampleContinuing with that example

There are 47 unknown cardsThere are 47 unknown cards The two unturned cards, the other player’s cards, and the rest of the The two unturned cards, the other player’s cards, and the rest of the

deckdeckThere are 9 outs (the other 9 hearts)There are 9 outs (the other 9 hearts)What’s the chance you will get your flush?What’s the chance you will get your flush?

Rephrased: what’s the chance that you will get an out on at least one of Rephrased: what’s the chance that you will get an out on at least one of the remaining cards?the remaining cards?

For an event to happen at least once, it’s For an event to happen at least once, it’s 1 minus the probability of it 1 minus the probability of it never happeningnever happening

Chances:Chances:Out on neither turn nor riverOut on neither turn nor river 38/47 * 37/46 38/47 * 37/46 = 0.65= 0.65Out on turn onlyOut on turn only 9/47 * 38/46 9/47 * 38/46 = 0.16= 0.16Out on river onlyOut on river only 38/47 * 9/46 38/47 * 9/46 = 0.16= 0.16Out on both turn and riverOut on both turn and river 9/47 * 8/46 9/47 * 8/46 = 0.03= 0.03

All the chances add up to 1, as expectedAll the chances add up to 1, as expected Chance of getting at least 1 out is 1 minus the chance of not getting any Chance of getting at least 1 out is 1 minus the chance of not getting any

outsoutsOr 1-0.65 = 0.35Or 1-0.65 = 0.35Or 1 in 2.9Or 1 in 2.9Or 1.9:1Or 1.9:1

Page 67: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

6969

Continuing with that exampleContinuing with that example

What if you miss your out on the turnWhat if you miss your out on the turnThen what is the chance you will hit the out on the river?Then what is the chance you will hit the out on the river?There are 46 unknown cardsThere are 46 unknown cards

The two unturned cards, the other player’s cards, and the rest of The two unturned cards, the other player’s cards, and the rest of the deckthe deck

There are still 9 outs (the other 9 hearts)There are still 9 outs (the other 9 hearts)What’s the chance you will get your flush?What’s the chance you will get your flush?

9/46 = 0.209/46 = 0.20 Or 1 in 5.1Or 1 in 5.1 Or 4.1:1Or 4.1:1 The odds have significantly decreased!The odds have significantly decreased!

These odds are called the These odds are called the hand oddshand odds I.e. the chance that you will get your nut handI.e. the chance that you will get your nut hand

Page 68: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7070

Hand odds vs. pot oddsHand odds vs. pot odds

So far we’ve seen the odds of getting a given handSo far we’ve seen the odds of getting a given handAssume that you are playing with only one other personAssume that you are playing with only one other personIf you win the pot, you get a payout of two times what you investedIf you win the pot, you get a payout of two times what you invested

As you each put in half the potAs you each put in half the pot This is called the This is called the pot oddspot odds

Well, almost – we’ll see more about pot odds in a bitWell, almost – we’ll see more about pot odds in a bit

After the flop, assume that the pot has $20, the bet is $10, and thus After the flop, assume that the pot has $20, the bet is $10, and thus the call is $10the call is $10

Payout (if you match the bet and then win) is $40Payout (if you match the bet and then win) is $40 Your investment is $10Your investment is $10 Your pot odds are 30:10 (Your pot odds are 30:10 (notnot 40:10, as your call is 40:10, as your call is not not considered as considered as

part of the odds)part of the odds)Or 3:1Or 3:1

When is it worth it to continue?When is it worth it to continue? What if you have 3:1 hand odds (0.25 probability)?What if you have 3:1 hand odds (0.25 probability)? What if you have 2:1 hand odds (0.33 probability)?What if you have 2:1 hand odds (0.33 probability)? What if you have 1:1 hand odds (0.50 probability)?What if you have 1:1 hand odds (0.50 probability)?

Note that we did not consider the probabilities before the flopNote that we did not consider the probabilities before the flop

Page 69: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7171

Hand odds vs. pot oddsHand odds vs. pot odds

Pot payout is $40, investment is $10Pot payout is $40, investment is $10Use the formula: p(winning) * payout Use the formula: p(winning) * payout ≥ ≥ investmentinvestmentWhen is it worth it to continue?When is it worth it to continue?

We are assuming that your nut hand will winWe are assuming that your nut hand will winA safe assumption for a flush, but not a tautology!A safe assumption for a flush, but not a tautology!

What if you have 3:1 hand odds (0.25 probability)?What if you have 3:1 hand odds (0.25 probability)?0.25 * $40 0.25 * $40 ≥ ≥ $10$10$10 $10 == $10$10If you pursue this hand, you will make as much as you loseIf you pursue this hand, you will make as much as you lose

What if you have 2:1 hand odds (0.33 probability)?What if you have 2:1 hand odds (0.33 probability)?0.33 * $40 0.33 * $40 ≥ ≥ $10$10$13.33 > $10$13.33 > $10Definitely worth it to continue!Definitely worth it to continue!

What if you have 1:1 hand odds (0.50 probability)?What if you have 1:1 hand odds (0.50 probability)?0.5 * $40 0.5 * $40 ≥ ≥ $10$10$20 >$20 > $10$10Definitely worth it to continue!Definitely worth it to continue!

Page 70: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7272

Pot oddsPot odds

Pot odds is the ratio of the amount in the pot to the Pot odds is the ratio of the amount in the pot to the amount you have to callamount you have to callIn other words, we don’t consider any previously In other words, we don’t consider any previously invested moneyinvested money

Only the current amount in the pot and the current amount of the Only the current amount in the pot and the current amount of the callcall

The reason is that you are considering each bet as it is placed, The reason is that you are considering each bet as it is placed, not considering all of your (past and present) bets togethernot considering all of your (past and present) bets together

If you considered all the amounts invested, you must then If you considered all the amounts invested, you must then consider the probabilities at each point that you invested moneyconsider the probabilities at each point that you invested money

Instead, we just take a look at each investment individuallyInstead, we just take a look at each investment individually Technically, these are mathematically equal, but the latter is Technically, these are mathematically equal, but the latter is

much easier (and thus more realistic to do in a game)much easier (and thus more realistic to do in a game)

In the last example, the pot odds were 3:1In the last example, the pot odds were 3:1 As there was $30 in the pot, and the call was $10As there was $30 in the pot, and the call was $10

Even though you invested some money previouslyEven though you invested some money previously

Page 71: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7373

Another take on pot oddsAnother take on pot odds

Assume the pot is $100, and the call is $10Assume the pot is $100, and the call is $10 Thus, the pot odds are 100:10 or 10:1Thus, the pot odds are 100:10 or 10:1 You invest $10, and get $110 if you winYou invest $10, and get $110 if you win Thus, you have to win 1 out of 11 times to break evenThus, you have to win 1 out of 11 times to break even Or have odds of 10:1Or have odds of 10:1 If you have better odds, you’ll make money in the long If you have better odds, you’ll make money in the long

runrun If you have worse odds, you’ll lose money in the long If you have worse odds, you’ll lose money in the long

runrun

Page 72: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7474

Hand odds vs. pot oddsHand odds vs. pot odds

Pot is now $20Pot is now $20, investment is $10, investment is $10 Pot odds are thus 2:1Pot odds are thus 2:1

Use the formula: p(winning) * payout Use the formula: p(winning) * payout ≥ ≥ investmentinvestmentWhen is it worth it to continue?When is it worth it to continue?

What if you have 3:1 hand odds (0.25 probability)?What if you have 3:1 hand odds (0.25 probability)?0.25 * $30 0.25 * $30 ≥ ≥ $10$10$7.50 $7.50 << $10$10

What if you have 2:1 hand odds (0.33 probability)?What if you have 2:1 hand odds (0.33 probability)?0.33 * $30 0.33 * $30 ≥ ≥ $10$10$10 $10 = = $10$10If you pursue this hand, you will make as much as you loseIf you pursue this hand, you will make as much as you lose

What if you have 1:1 hand odds (0.50 probability)?What if you have 1:1 hand odds (0.50 probability)?0.5 * $30 0.5 * $30 ≥ ≥ $10$10$15 >$15 > $10$10

The only time it is worth it to continue is when the pot odds outweigh The only time it is worth it to continue is when the pot odds outweigh the hand oddsthe hand odds

Meaning the first part of the pot odds is Meaning the first part of the pot odds is greater greater than the first part of the than the first part of the hand oddshand odds

If you do not follow this rule, you If you do not follow this rule, you willwill lose money in the long run lose money in the long run

Page 73: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7575

Computing hand odds vs. pot oddsComputing hand odds vs. pot odds

Consider the following hand progression:Consider the following hand progression:Your hand: almost a flush (4 out of 5 cards of Your hand: almost a flush (4 out of 5 cards of one suit)one suit) Called a “flush draw”Called a “flush draw”

Perhaps because one more draw can make it a flushPerhaps because one more draw can make it a flush

On the flop: $5 pot, $10 bet and a $10 callOn the flop: $5 pot, $10 bet and a $10 call Your call: match the bet or fold?Your call: match the bet or fold? Pot odds: 1.5:1Pot odds: 1.5:1 Hand odds: 1.9:1 (or 0.35)Hand odds: 1.9:1 (or 0.35) The pot odds The pot odds do notdo not outweigh the hand odds, so do outweigh the hand odds, so do

not continuenot continue

Page 74: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7676

Computing hand odds vs. pot oddsComputing hand odds vs. pot odds

Consider the following hand progression:Consider the following hand progression:Your hand: almost a flush (4 out of 5 cards of Your hand: almost a flush (4 out of 5 cards of one suit)one suit) Called a flush drawCalled a flush draw

On the flop: On the flop: now a $30 potnow a $30 pot, $10 bet and a $10 , $10 bet and a $10 callcall Your call: match the bet or fold?Your call: match the bet or fold? Pot odds: 4:1Pot odds: 4:1 Hand odds: 1.9:1 (or 0.35)Hand odds: 1.9:1 (or 0.35) The pot odds The pot odds do do outweigh the hand odds, so do outweigh the hand odds, so do

continuecontinue

Page 75: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

77

Quick surveyQuick survey

I felt I understood Texas Hold’em I felt I understood Texas Hold’em probability…probability…

a)a) Very wellVery well

b)b) With some review, I’ll be goodWith some review, I’ll be good

c)c) Not reallyNot really

d)d) Not at allNot at all

Page 76: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

78

Quick surveyQuick survey

If I was going to spend money If I was going to spend money gambling, would I choose Texas gambling, would I choose Texas Hold’em?Hold’em?

a)a) Definitely – a way to make moneyDefinitely – a way to make money

b)b) PerhapsPerhaps

c)c) Probably notProbably not

d)d) Definitely not – it’s a way to lose Definitely not – it’s a way to lose moneymoney

Page 77: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

7979

For next semester…For next semester…

Other games I should go over?Other games I should go over?

Page 78: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

80

Quick surveyQuick survey

I felt I understood the material in this I felt I understood the material in this slide set…slide set…

a)a) Very wellVery well

b)b) With some review, I’ll be goodWith some review, I’ll be good

c)c) Not reallyNot really

d)d) Not at allNot at all

Page 79: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

81

Quick surveyQuick survey

The pace of the lecture for this The pace of the lecture for this slide set was…slide set was…

a)a) FastFast

b)b) About rightAbout right

c)c) A little slowA little slow

d)d) Too slowToo slow

Page 80: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

82

Quick surveyQuick survey

How interesting was the material in How interesting was the material in this slide set? Be honest!this slide set? Be honest!

a)a) Wow! That was SOOOOOO cool!Wow! That was SOOOOOO cool!

b)b) Somewhat interestingSomewhat interesting

c)c) Rather bortingRather borting

d)d) ZzzzzzzzzzzZzzzzzzzzzz

Page 81: 1 Introduction to Discrete Probability Rosen, section 5.1 CS/APMA 202 Aaron Bloomfield

8383

Today’s demotivatorsToday’s demotivators