1

I have spent a couple of hours trying to solve the following problem, and my approach is incorrect, but I don't understand why.

Problem: Say we deal 13 cards from a 52 card deck. What is the probability of having at least one card from each suit?

My approach to this problem was to ignore the 52 card deck. Statistically, any set of 13 cards should have the same probabilities as any other set of 13 cards randomly selected. Given we have a set of 13 cards, what is the likelihood that at least one suit is missing? To me, the rank of each card is irrelevant. On average, each set of 13 cards randomly selected would have the same number of cards from each suit. In other words, a set of 13 cards should be a representative subset of the larger set of possibilities. With all that said, here was my approach. What is the flaw in my thinking?

Using the inclusion-exclusion formula for the at least condition:

$$L_m = S_m - \binom{m}{1} * S_{m+1} + \binom{m+1}{2} * S_{m+2}$$

Conditions:

c1: H (hearts) = 0

c2: D (diamonds) = 0

c3: S (spades) = 0

c4: C (clubs) = 0

At least one condition met:

$$L_1 = S_1 - \binom{1}{1} * S_2 + \binom{2}{2} * S_3$$

S1 = number of ways to deal 13 cards where one suit is not represented

S2 = number of ways to deal 13 cards where two suits are not represented

S3 = number of ways to deal 13 cards where three suits are not represented

S4 = number of ways to deal 13 cards where four suits are not represented = 0

Now:

$C_{tot}$ = total number of combinations of 13 cards (ignoring rank & ordering)

$C_{inc}$ = number of combinations of 13 cards where all suits are included (ignoring rank & ordering)

$C_{exc}$ = number of combinations of 13 cards where at least one suit is not included (ignoring rank & ordering)

$$C_{inc} = C_{tot} - C_{exc}$$

When I say "ignoring rank & ordering", I mean that we have 13 cards that could be described as follows (for example): CCCHHHDDDSSSS. All we care about is that we have 3 clubs, 3 hearts, 3 diamonds, and 4 spades. Nothing else seems relevant to me.

Next:

$$H + D + S + C = 13$$

In other words, the 13 cards must be assigned to each bucket (heads, diamonds, spades, clubs)

The total number of ways the 13 cards can be assigned to the buckets would be:

$$\binom{n+r-1}{r} = \binom{13 + 4 - 1}{13} = \binom{16}{13} = 560$$

$$C_{tot} = 560$$

If c1 is true:

$$D + S + C = 13$$

So:

$$S_1 = \binom{4}{1} * \binom{15}{13} = 420$$

If c1,c2 is true:

$$S + C = 13$$

So:

$$S_2 = \binom{4}{2} * \binom{14}{13} = 84$$

If c1,c2,c3 is true:

$$C = 13$$

There is only one way for this to be true for each hand selected (or in other words, for each set of three hands not selected), so we can calculate $S_3$ as follows:

$$S_3 = \binom{4}{3} * 1 = 4$$

Finally, adding everything:

$$L_1 = S_1 - \binom{1}{1} * S_2 + \binom{2}{2} * S_3$$

$$L_1 = 420 - \binom{1}{1} * 84 + \binom{2}{2} * 4$$

$$L_1 = 340$$

$$C_{exc} = L_1 = 340$$

Putting it all together:

$$C_{inc} = C_{tot} - C_{exc}$$

$$C_{inc} = 560 - 340$$

$$C_{inc} = 220$$

Probability of selecting a set of 13 cards from a deck of 52 cards where at least one card from each suit is included in the set selected:

(Note: this step is invalid and is where my error is located. See Lourrran's answer for an explanation of this error.)

$$ p_{inc} = C_{inc}/C_{tot}$$

$$ p_{inc} = 220/560$$

Note - this result is incorrect. The correct answer is $p_{inc} = 0.9489$.

  • This is hard to follow. What difference does it make what the "average" hand looks like? Sure you "expect" to see cards of each suit...but then your answer, which is considerably less than $\frac 12$ seems too small, right? here is a near duplicate (which asks for the probability that a hand of $13$ contains exactly one void). – lulu Sep 27 '24 at 13:10
  • Proper formatting would make this more readable. here is a good tutorial on formatting for this site. – lulu Sep 27 '24 at 13:13
  • You have an intermediate result which is wrong ... or at least can not be used for further computations. When you say there is 560 as a total, I don't know how you obtain this number 560, and I am not interested. The only total that we can use is 'how many different subsets we can choose' and this number is not 560, it is very very big. It is (52choose13). – Lourrran Sep 27 '24 at 14:09
  • @Lourrran Thanks for the response. I calculated 560 as follows:

    H + D + S + C = 13

    In other words, the 13 cards must be assigned to each bucket (heads, diamonds, spades, clubs)

    The total number of ways the 13 cards can be assigned to the buckets would be: (n+r-1) choose (r) = (13 + 4 - 1) choose (13) = 16 choose 13 = 560

    – Jonathan Yoder Sep 27 '24 at 14:16
  • @lulu Yes, I agree the answer is a little absurd. That’s how I knew it was wrong. But I really want to understand why it’s wrong. – Jonathan Yoder Sep 27 '24 at 14:18
  • Again, I suggest formatting your post properly. It's quite long and hard to read. There's no problem with inclusion-exclusion as a method, that's what I would expect to be used here. – lulu Sep 27 '24 at 14:20
  • 2
    I repeat : the number in denominator is $C_{52}^{13}$ ; When you count 560, you have 560 different cases, ok, consider it is correct. But these 560 subsets are not equi-probable. So you cannot do anything with this. – Lourrran Sep 27 '24 at 14:46
  • a guy with 59 rep. Having a gold batch. – Ritzthephysibeast Sep 27 '24 at 17:57
  • 1
    @Ritzthephysibeast hahaha I guess I ask popular questions rather than good ones – Jonathan Yoder Sep 28 '24 at 07:50
  • @lulu I have corrected the formatting per your request. – Jonathan Yoder Sep 28 '24 at 08:57
  • See this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula. – user2661923 Sep 29 '24 at 08:19

4 Answers4

2

I will take an example with dice.

Exercise :

The dice in this exercise are fair dice, classic dice, with 6 faces

Question 1) (2 points) We roll a die, what is the probability to obtain 6.

Question 2) (3 points) We roll 2 dice and sum the results, what is the probability to obtain 12.

For both question, we want the result, and explanation of the process.

Answer from the student :

Question 1) There are 6 different outcomes, so the probability to obtain 6 is 1/6.

Question 2) The sum is a number between 2 and 12, there are 11 different outcomes, so the probability to obtain 12 is 1/11.

This answer is the answer that you could give... but ... you will have some doubts.

The teacher says :

Question 1) The numeric result is correct, it is 1/6, but the explanation is not correct. The correct explanation is : There are 6 different outcomes, and they all have the same probability to occur, so the probability of each outcome is 1/6.

So only 1 point for this question.

Question 2) The numeric result is not correct, and the explanation is wrong. No point for this question.

Now , go back to original exercise with 52 cards.

We deal 13 cards, what is the probability ... ... You say we have 560 different shapes : let us list some of them :

  • shape n°1 : 13 spades, no heart, no diamond, no club
  • ... ...
  • shape n°5 : 12 spades, 1 heart, no diamond, no club
  • ... ...
  • shape n°150 : 4 spades, 3 hearts, 3 diamonds, 3 clubs
  • ... ...

Question n°1 : What is the probability to obtain 13 spades ? your answer is 1/560

Question n°2 : What is the probability to obtain 4 spades, 3 hearts, 3 diamonds, 3 clubs ? your answer is 1/560

Same probability.

And it is obvious that shape n°1 (13 spades) is very very rare, when shape n°150 (4 spades, 3 hearts, 3 diamonds, 3 clubs) is totally standard.

When we have $n$ different possible outcomes ($560$ in you example), when $k$ different outcomes are considered as 'success', we can say that probability of success is $\frac{k}{n}$ only if all $n$ outcomes have same probability to occur.

Lourrran
  • 1,765
  • This makes perfect sense. I see the flaw in my thinking. I guess the basic, intuitive concept about k/n only being true when all the outcomes have the same probability to occur was lost on me as the problem solving got slightly more complicated than a simpler problem, such as the dice problem you describe. I got carried away with equations rather than actually thinking. – Jonathan Yoder Sep 28 '24 at 07:53
2

You really do have to consider the fact that you are drawing the cards from a deck of $52$ cards. It makes a difference in how you figure your probabilities.

You have assumed that the probability of getting thirteen spades is $\dfrac1{4^{13}} \approx 1.5 \times 10^{-8}$.

But how do you deal thirteen spades from a standard deck of $52$ cards? You might shuffle the deck thoroughly and then take the first thirteen cards from the top of the deck.

There are $52!$ different possible orderings of the deck after shuffling. After a thorough shuffle, we assume each of these orderings is equally likely. Now let's count the number of orderings in which the top thirteen cards are all spades.

To begin with, the spades can occur in any order of ranks. So there are $13!$ possible orderings of the top $13$ cards. For each possible ordering of the spades at the top of the deck, there are $39!$ possible orderings of the cards underneath them. This gives a total of $13! 39!$ possible orderings of cards where you deal thirteen spades.

The probability of dealing thirteen spades is therefore

$$ \frac{13! 39!}{52!} = \frac{1}{\binom{52}{13}} \approx 1.6 \times 10^{-12}. $$

So the probability of thirteen spades is much, much less than you calculated.

The reason you calculate such a (relatively) large probability in your approach is you assume that each card has an independent $\frac14$ probability to be a spade. But the probabilities are not independent. For example, if the first twelve cards are all spades, there is only one spade remaining in the other $40$ cards of the deck. The probability that that spade just happens to be the next card to be dealt is $\frac1{40}$, not $\frac14$. In fact, once you have dealt the first spade, every other card has less than $\frac14$ chance to be a spade.


Aside:

If instead of one standard $52$-card deck you assembled a million such decks into a single $52000000$-card deck and shuffled that deck thoroughly, then you would have (approximately) a $\dfrac1{4^{13}}$ probability of dealing thirteen spades from the top of the deck, because after dealing $12$ spades you still have $12999988$ spades in the remaining $51999988$ cards, which is very nearly $\frac14$ of the remaining cards. But in your question you state that you have only one $52$-card deck, and in the absence of any further description of this deck, we have to assume it's the usual $52$=card deck containing exactly $13$ cards of each suit.

The point is that it really does matter that you are drawing the cards from a $52$-card deck, and it is not OK to ignore that fact.


Just as your assumed value of the probability for thirteen spades (or thirteen of any other suit) is much too large, likewise many of your other assumed probabilities are too large, and others are too small. To go through every case and show how its error contributes to the error in your final result would be ridiculously tedious. But I hope that giving one example is enough to show the error in the assumptions. Once you give up the erroneous assumption that you can ignore the deck the cards came from, you have to start over with a new approach entirely.

David K
  • 108,155
  • Thank you David. I finally understand it thanks to you.

    Fundamentally, the issue is that my answer assumes that each permutation is equally likely, which is not the case.

    For instance, the permutation: C C C C C C C C C C C C H (or any other permutation of these 13 suit letters) is much more likely than the permutation: C C C C C C C C C C C C C.

    Finding the probability is not always as simple as dividing the permutations that meet the criteria by the total number of permutations - this is only valid if all the permutations have an equal probability.

    – Jonathan Yoder Sep 29 '24 at 07:16
1

I modified my process to use the permutation formula instead of the combination formula in an attempt to correct my mistake. The answer is still incorrect. Unsure what is wrong with my process now.

Using the inclusion-exclusion formula for the at least condition:

$$L_m = S_m - \binom{m}{1} * S_{m+1} + \binom{m+1}{2} * S_{m+2}$$

Conditions:

c1: H (hearts) = 0

c2: D (diamonds) = 0

c3: S (spades) = 0

c4: C (clubs) = 0

At least one condition met:

$$L_1 = S_1 - \binom{1}{1} * S_2 + \binom{2}{2} * S_3$$

S1 = number of ways to deal 13 cards where one suit is not represented

S2 = number of ways to deal 13 cards where two suits are not represented

S3 = number of ways to deal 13 cards where three suits are not represented

S4 = number of ways to deal 13 cards where four suits are not represented = 0

Now:

$P_{tot}$ = total number of permutations of 13 cards (ignoring rank)

$P_{inc}$ = number of permutations of 13 cards where all suits are included (ignoring rank)

$P_{exc}$ = number of permutations of 13 cards where at least one suit is not included (ignoring rank)

$$P_{inc} = P_{tot} - P_{exc}$$

When I say "ignoring rank", I mean that we have 13 cards that could be described as follows (for example): CCCHHHDDDSSSS. All we care about is that we have 3 clubs, 3 hearts, 3 diamonds, and 4 spades. The rank is not relevant.

Next:

$$H + D + S + C = 13$$

In other words, the 13 cards must be assigned to each bucket (heads, diamonds, spades, clubs)

The total number of ways the 13 cards can be assigned to the buckets would be:

$${n}^{r} = {4}^{13} = 67108864$$

$$P_{tot} = 67108864$$

If c1 is true:

$$D + S + C = 13$$

So:

$$S_1 = \binom{4}{1} * {3}^{13} = 6377292$$

If c1,c2 is true:

$$S + C = 13$$

So:

$$S_2 = \binom{4}{2} * {2}^{13} = 49152$$

If c1,c2,c3 is true:

$$C = 13$$

There is only one way for this to be true for each hand selected (or in other words, for each set of three hands not selected), so we can calculate $S_3$ as follows:

$$S_3 = \binom{4}{3} * 1 = 4$$

Finally, adding everything:

$$L_1 = S_1 - \binom{1}{1} * S_2 + \binom{2}{2} * S_3$$

$$L_1 = 6377292 - \binom{1}{1} * 49152 + \binom{2}{2} * 4$$

$$L_1 = 6328144$$

$$P_{exc} = L_1 = 6328144$$

Putting it all together:

$$P_{inc} = P_{tot} - P_{exc}$$

$$P_{inc} = 67108864 - 6328144$$

$$P_{inc} = 60780720$$

Probability of selecting a set of 13 cards from a deck of 52 cards where at least one card from each suit is included in the set selected:

$$p_{inc} = P_{inc}/P_{tot}$$

$$p_{inc} = 60780720/67108864 = 0.91$$

Note - this result is incorrect. The correct answer is $p_{inc} = 0.9489$. See David K's answer for an explanation of this error.

Fundamentally, the issue is that my answer assumes that each permutation is equally likely, which is not the case.

For instance, the permutation: C C C C C C C C C C C C H (or any other permutation of these 13 suit letters) is much more likely than the permutation: C C C C C C C C C C C C C

Finding the probability is not always as simple as dividing the permutations that meet the criteria by the total number of permutations - this is only valid if all the permutations have an equal probability.

1

I find it difficult to follow your answer.

To count hands where at least one suit is void. using inclusion-exclusion, we need to count

|1 guaranteed void| - |2 guaranteed void| + |3 guaranteed void|

and taking into account the symmetry in the situation, this will be

$$\binom41\binom{39}{13} - \binom42\binom{26}{13} + \binom43\binom{13}{13} = 32427298180$$

$$And\; P(all\; suits\; present) = 1 - \frac{32427298180}{\binom{52}{13}},\approx 0.9489$$

  • you say : it seems like it should be possible to calculate the probability without needing to know the total number of cards in the deck (i.e. 52). How can you imagine this ??? You need to apply logical rules, not create your own illogical rules. – Lourrran Sep 28 '24 at 15:43
  • Lourran's comment was in response to a now deleted comment of OP – true blue anil Oct 03 '24 at 06:29