[Math] Solution verification: picking $5$-card hands from standard deck of $52$, with conditions

card-gamescombinatoricsdiscrete mathematicsprobabilitysolution-verification

Problem

A 5-card hand is dealt from a perfectly shuffled deck of playing cards. What is the probability of each of the following events?

(a) The hand has at least one club.

(b) The hand has at least two cards with the same rank.

(c) The hand has exactly one club or exactly one spade.

(d) The hand has at least one club or at least one spade.

My solutions

(a) By complement, if there are no clubs, that means we have $13$ ranks but only $3$ suits to choose from, for a total of $39$ cards from which to pick $5$:

$p(E) = 1 – \frac{{39 \choose 5}}{{52 \choose 5}}$


(b) By complement, if at least $2$ cards have the same rank, then the negation of this statement is that no $2$ cards have the same rank, i.e. all $5$ cards are different ranks. This means that we only have $13$ cards to choose from (I think), so I got:

$p(E) = 1 – \frac{{13 \choose 5}}{{52 \choose 5}}$


(c) Let $C$ denote the set of outcomes that are exactly $1$ club, and let $S$ denote the set of outcomes that are exactly $1$ spade. These are not mutually exclusive.

$p(C \cup S) = p(C) + p(S) – p(C \cap S)$

$p(C)$: one of the cards is a club, leaving us with $13$ ranks and $3$ suits to choose from (and we choose $4$ cards): ${39 \choose 4}$

$p(S)$: same logic as above, so we have ${39 \choose 4}$ again

$P(C \cap S)$: one club and one spade, $3$ cards left to choose from $2$ suits of $13$ ranks each, meaning we choose $3$ from $26$ cards: ${26 \choose 3}$

I got: $\frac{2\cdot {39 \choose 4}-{26 \choose 3}}{{52 \choose 5}}$


(d): at least $1$ club or at least $1$ spade; we can use complement to find the probability of $0$ clubs AND $0$ spades and subtract this from $1$. If there are no clubs or spades, then we have $13$ cards and $2$ suits to choose from, and we pick $5$ cards, so that's ${26 \choose 5}$.

I got: $p(E) = 1 – \frac{{26 \choose 5}}{{52 \choose 5}}$


Questions/concerns

I'd really appreciate if you could verify my work, as the solutions are not available. I'm particularly curious if I did part (b) correctly.

Best Answer

Extended Comment: This is a simulation mixed with some exact computations. It may help as a reality check for a couple of the parts of your question.

The simulation in R deals a million 5-card hands and counts Clubs and Spades. The deck consists numbers 1, 2, 3, 4, for H, D, C, S, respectively; 13 of each. (The sample function distinguishes among elements labeled with the same number.)

With a million hands, probabilities should be accurate to about two or three places. Exact values of $13{39 \choose 4}/{52 \choose 5}$ and the corresponding hypergeometric probability are also shown. It may be of interest for you to look at the hypergeometric distribution in your textbook or on Wikipedia.

deck = rep(1:4, times=13)
deck
# [1] 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2
#[27] 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4

m = 10^6;  nr.cl = nr.sp = numeric(m)
for (i in 1:m) {
  hand = sample(deck,5)
  nr.cl[i] = sum(hand==3)
  nr.sp[i] = sum(hand==4)  }

mean(nr.cl==1);  mean(nr.sp==1)
## 0.411229      # aprx P(exactly 1 Club)
## 0.412112      # aprx P(exactly 1 Spade)
13*choose(39,4)/choose(52,5)
## 0.4114196     # exact value of above from combinatorics
dhyper(1, 13, 39, 5)
## 0.4114196     # exact value of above from hypergeometric dist'n

mean((nr.cl==1) | (nr.sp==1))
## 0.654191      # aprx P(ex 1 Club OR ex 1 Spade)
mean((nr.cl==1) & (nr.sp==1))
## 0.16915       # aprx P(ex 1 Club AND ex 1 Spade)