Probability that duplicates are still in the deck after X card drawn

171 Views Asked by At

Deck has 30 cards, out of which 5 cards have duplicates (20 cards are unique, 5 cards have 2 copies each).

If you draw X cards from the deck (without returning), what is the probability that there are at least one duplicate remaining in the deck?

1

There are 1 best solutions below

0
On

Say there are $n$ cards, including $k$ pairs and $n-2k$ singletons, and we draw $m$ cards. The probability that a pair remains can be determined by inclusion-exclusion. There are $\binom kj$ ways to choose $j$ particular pairs, and the probability that they remain in the deck is $\frac{\binom{n-2j}m}{\binom nm}$. Thus the probability that no pair remains is

$$ \binom nm^{-1}\sum_{j=0}^k(-1)^j\binom kj\binom{n-2j}m\;, $$

and the probability that at least one pair remains is the complement,

$$ \binom nm^{-1}\sum_{j=1}^k(-1)^{j-1}\binom kj\binom{n-2j}m\;. $$

In your case, with $n=30$, $k=5$ and $m=X$, this is

$$ \binom{30}X^{-1}\sum_{j=1}^5(-1)^{j-1}\binom5j\binom{30-2j}X\\ =\binom{30}X^{-1}\left(5\binom{28}X-10\binom{26}X+10\binom{24}X-5\binom{22}X+\binom{20}X\right)\;. $$

Here's a table of the values for $0\le X\le30$.