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

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.

• (b) needs a correction factor. After you choose the ranks, you need to also choose the suits for those ranks. So it should be $$p(E) = 1 - \frac{{13 \choose 5}\left({4 \choose 1}^5\right)}{{52 \choose 5}}$$ – quasi Jul 10 '17 at 22:31
• Your answer to (c) is missing some terms as well. The setup is good, but $\binom{39}{4}$ only counts the number of ways of selecting the remaining four non-club cards without any reference to the number of ways of picking what the club card used is itself. $\binom{39}{4}/\binom{52}{5}$ is the probability of having the ace of clubs specifically and four non-club cards, not the probability of having exactly one club. Correct this by multiplying by $13$ to represent selecting which club it is. Similarly for spades, and multiply by $13^2$ for one club and one spade and three others – JMoravitz Jul 10 '17 at 22:38
• I'm saying your answer that you (incorrectly) calculated was for having the ace of clubs and no other clubs or the ace of spades and no other spades. The correct answer to the problem of having exactly one club or exactly one spade should have had some factors of $13$ being multiplied in there. (further, part (c) was in reference to "exactly" one club or exactly one spade, part (d) was for "at least") – JMoravitz Jul 10 '17 at 22:44
• Correct this by multiplying by 13 to represent selecting which club it is. Similarly for spades, and multiply by 13^2 for one club and one spade and three others so instead of $p(C)$ as you calculated being $\binom{39}{4}/\binom{52}{5}$ it should have been $p(C)=13\cdot\binom{39}{4}/\binom{52}{5}$ etc... – JMoravitz Jul 10 '17 at 22:48
• Ahhhh, now I get it. So I was neglecting to define which club/spade was actually chosen, right? And since there are 13 clubs and 13 spades, you have to multiply by $13$. Think I got it – AleksandrH Jul 10 '17 at 22:49

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 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
# 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)

• Sorry, but I don't understand what most of that means (the last paragraph and the code) – AleksandrH Jul 11 '17 at 22:32
• Sorry, but I don't understand how to respond to a complaint about "most of that". If there is a particular point you want to ask about, please say what it is. Otherwise, sorry. But you might try to figure out the hypergeometric distribution. – BruceET Jul 11 '17 at 22:42
• Right, I specified your last paragraph and your code. – AleksandrH Jul 11 '17 at 23:22
• You have already seen $13{39 \choose 4}/{52 \choose 5} = 0.4114$ in a previous comment. It is evaluated in the third block of code. It is P(Exactly one Club) = P(Exactly one Spade)..There are ${52 \choose 5}$ ways to deal a 5-card hand from a 52 card deck. Of these, there are ${13 \choose 1}{39 \choose 4}$ ways to choose one Club and three non-clubs. So the ratio (a hypergeometric probability) is P(Exactly one Club). The R function dhyper shown in the code evaluates this probability. – BruceET Jul 12 '17 at 6:25
• The for loop in the R program simulates dealing $m = 1,000,000 = 10^6$ hands from a deck shown at the start where numbers 1,2,3,4 stand for suits. The sample function deals five cards at random without replacement. The code sum(hand==3) finds the number of clubs nr.cl in the $i$th hand; hand==3 is a 'logical' vector taking values 5 values T or F according as each card is a club or not. The sum of a logical vector is the number of T's it contains. The vector nr.cl has $10^6$ elements, each a number from 0 thru 4. After the loop, the logical vector nr.cl==1 is true ... – BruceET Jul 12 '17 at 6:35