# Give a deck of 54 cards, what's the probability that even one card will match two dealt hands...

if we shuffle a deck (with 54 cards including Joker) thoroughly and deal out a four card hand, there are over 300,000 different hands. What's the probability that no cards match between two dealt hands? even one card matches? two cards match? all cards match?

Edit: The two jokers are different. Not identical

Here is what I have so far. For no card to match the probability should be $$\frac{50}{54 }\cdot\frac{49}{53}\cdot\frac{48}{52}\cdot\frac{47}{51} \approx 72\%$$ chance that no cards match.

If any one is to match it would be $$\frac{4}{54} + \frac{4}{53} + \frac{4}{52} + \frac{4}{51}\approx 30.4\%$$

If exactly two are to match it would be $$\frac{4}{54}\cdot\frac{3}{53}\cdot\frac{48}{52}\cdot\frac{47}{51}\approx 0.35\%$$

for all cards to match it would be $$\frac{4}{54}\cdot\frac{3}{53}\cdot\frac{2}{52}\cdot\frac{1}{51}$$

Is this the right way to think about it? Am I missing anything?

• The jokers may mess with things. Also relies on a set number of cards per hand.
– user645636
Mar 31 '19 at 19:49
• Are the two jokers identical? In some decks they are, in some they aren't (for instance, one is red and one is black). Mar 31 '19 at 20:49
• There are a number of mistakes in your attempts. For example, for exactly two to match your attempt actually calculates the probability that very specifically the first card matches and the second card matches and the last two don't. You neglected to account for other orders of matching and not matching making that answer off by a factor of 6. For exactly one to match, you added when you weren't supposed to. Approach the same way as for two matches. It should be clear when a mistake is made since the totals don't add up to 1 like they should. Mar 31 '19 at 21:14
• no. A probability of 1 means absolutely certain. in your example it's $\frac{2^{100}-101}{2^{100}}$
– user645636
Mar 31 '19 at 23:13
• I'm tempted just give you combinatoric and probabilistic links as an answer...
– user645636
Mar 31 '19 at 23:22

Supposing you have $$54$$ distinct cards and you draw a four-card hand, take note of the cards and shuffle them back in and draw another four cards, the probability of having exactly $$k$$ cards in the new hand exactly matching a card from the initial hand (where exactly matching requires both the suit and the number to be identical and the jokers only match the exact same joker, e.g. if there is a black joker and a red joker) is:

$$\frac{\binom{4}{k}\cdot 4\frac{k}{~}\cdot 50\frac{4-k}{~}}{54\frac{4}{~}} = \frac{\binom{4}{k}\binom{50}{4-k}}{\binom{54}{4}}$$

where here $$n\frac{k}{~}$$ represents the falling factorial $$\underbrace{n\cdot (n-1)\cdot (n-2)\cdots (n-k+1)}_{k~\text{terms}}$$

The expression on the left can be explained by treating each card as being pulled in sequence, picking which positions in the sequence are occupied by matching cards, picking which matching cards those are, and picking which non-matching cards occupied the remaining spaces out of the possible ways in which four cards could be drawn.

The expression on the right can be explained by treating it as though the cards are picked simultaneously where order doesn't matter and picking which matching cards they are and which non-matching cards they are and dividing by the number of ways of selecting four cards. You should recognize the expression on the right as simply being the well-known hypergeometric distribution.

The results are:

$$\begin{array}{|c|c|c|}\hline k&\text{exact}&\text{approximate}\\ \hline 0&\frac{230300}{316251}&0.728219041\dots\\1&\frac{78400}{316251}&0.247904354\dots\\ 2&\frac{2450}{105417}&0.023241033\dots\\ 3&\frac{200}{316251}&0.000632409\dots\\ 4&\frac{1}{316251}&0.000003162\dots\\\hline\end{array}$$

Notice how the probabilities add up exactly to $$1$$, as should always be the case when partitioning the sample space of a probability experiment.

• Question: in equation above shouldn't the denominator be (54 4)? if I use (50 4) the denominator = 230300. If you address this, i'll accept this answer. Thanks! Apr 5 '19 at 4:45
• @Salman it should indeed be 54 choose 4, not 50 choose 4. That was a typo. Good catch Apr 5 '19 at 9:54

Comment: If I understand correctly, we can suppose the first hand is dealt, and then try to match it. In my simulation (in R) below I suppose that the first hand has cards numbered from 1 through 4 (in some order). In a million randomly dealt second hands, my probabilities of various counts of matching cards are shown below.

set.seed(401)  # for reproducibility
x = replicate(10^6,  sum(sample(1:54, 4)<=4))
table(x)/10^6
x
0        1        2        3        4
0.728386 0.247738 0.023251 0.000624 0.000001


Only the first few places of these probabilities are likely to be accurate, but this may give you something to check against as you finish your combinatorial analysis. Notice that the simulated proportion $$0.728$$ of no matches is the same (to three places) as the correct probability in your first answer.

A second simulation, with seed 2019, gave the following slightly different answers:

x
0        1        2        3        4
0.727877 0.247891 0.023563 0.000667 0.000002


More precisely, hypergeometric probabilities [also just now posted by @JMoravitz (+1)] are:

dhyper(0:3, 4, 50, 4)
[1] 0.7282190412 0.2479043545 0.0232410332 0.0006324091