12 A poker hand is a set of 5 cards randomly chosen from a deck of 52 cards. Find the probability of a
(c) four of a kind (four cards of the same face value).
There are 13 different ways a dealer could pick four of a kind (four 1s, four 2s, four 3s, four kings, etc). Given that four such cards are selected (without replacement), the likelihood of selecting a 5th card of any value is 1 in 48, because there are (\(52 - 48\)) cards left. Multiplying the probability of these two combinations together and then dividing by all of the combinations (picking 5 cards out of 52) yields the probability of dealing a 4 of a kind hand:
p12c <- (choose(13, 1) * choose(48, 1))/choose(52, 5)
p12c
## [1] 0.000240096
(d) full house (one pair and one triple, each of the same face value).
A full house is three of one face value and two of another. Given that there are 13 different sets of 4 face values in a card deck, and we initially need 3 of the same value, we initially take the \(n=13, r=1\) combination times the \(n=4, r=3\) combination to compute a frequency for selected 3 cards of the same value. Then, since there are 12 remaining face values for which we could select 2 cards, we multiply the \(n=12, r=1\) combination by the \(n=4, r=2\) combination. We then multiply both products by each other and divide by all of the combinations possible (n=52, r=5) to compute the probability:
p12d <- (choose(13, 1) * choose(4, 3) * choose(12, 1) * choose(4, 2))/choose(52, 5)
p12d
## [1] 0.001440576
(e) flush (five cards in a single suit but not a straight or royal flush).
There are 13 different ways of getting 5 cards in a single suit and 4 different suits (spades, clubs, hearts, and diamonds). Mutliplying the \(n=13, r=5\) combination by the \(n=4, r=1\) combination gives us the frequency for that outcome. However, these combinations include a royal flush or straight flush. There are 10 different ways a 5 cards could be a straight flush, one of which is a royal flush:
Ace - 2 - 3 - 4 - 5 2 - 3 - 4 - 5 - 6 3 - 4 - 5 - 6 - 7 4 - 5 - 6 - 7 - 8 5 - 6 - 7 - 8 - 9 6 - 7 - 8 - 9 - 10 7 - 8 - 9 - 10 - Jack 8 - 9 - 10 - Jack - Queen 9 - 10 - Jack - Queen - King 10 - Jack - Queen - King - Ace
Since there are four different suits, we can compute the frequency for a royal flush or straight flush by multiplying the \(n=10, r=1\) combination by the \(n=4, r=1\) combination. Then, we take this product and subtract it from the product computed for a flush, and then divide the result by all of the combinations possible (n=52, r=5):
# Frequency of flushes
f1 <- choose(13, 5) * choose(4, 1)
# Frequency of straight or royal flushes
f2 <- choose(10, 1) * choose(4, 1)
# Then subtract the frequency of straight or royal flushes from
# the frequency of flushes and then divide by all possible draws
p12e <- (f1 - f2) / choose(52, 5)
p12e
## [1] 0.001965402
(f) straight (five cards in a sequence, not all the same suit). (Note that in straights, an ace counts high or low.)
As explained in (e), there are \(n=10, r=1\) combinations of 5 cards in a sequence. There are also 4 different suits, but because suit does not matter for a straight, and we’re selecting 5 cards, we need to take the \(n=4, r=1\) combination to the 5th power. Once the first combination is multiplied by the 2nd combination to the 5th power, the result is divided by all of the combinations possible (n=52, r=5) to compute the probability:
p12f <- (choose(10, 1) * (choose(4, 1)^5)) / choose(52, 5)
p12f