0

From a deck of 52 cards, we draw $N$ times one card, with the return. Calculate the probability that each card in the deck will be drawn at least once.


I know that it looks a bit like Coupon collector's problem, but as I understand it, it's about expected value and variance. Here I need to look the other way around - I am given N and have to calculate the probability.

For N < 52 that will be 0 of course.

Then, for N = 52 we have: $1 \cdot \frac{51}{52} \frac{50}{52} \cdot ... \cdot \frac{1}{52}$ as I need to get a 'new card' each time and that probability is smaller with each draw as the set of 'old' (already chosen) cards gets bigger.

For $N = 53$ I have $1$ 'extra draw' that I can loose on drawing an 'old' card - one of $52$. But I can't just choose one of $51$ places between draws extending the set of already chosen cards and choose one of $52$ cards. I think that I would calculate many times the same sequences.

Therefore I lack the idea for scaling the idea from $52$ draws onwards. Any help would be appreciated.

RobPratt
  • 50,938
thefool
  • 1,024
  • The answer is $\dfrac{52!, S_2(N,52)}{52^N}$ where $S_2(N,52)$ is a Stirling number of the second kind. You can also use inclusion-exclusion or recursion to find it. https://math.stackexchange.com/questions/4506194/probability-that-there-exist-at-least-one-day-without-any-birthday is one of many similar questions on this site. – Henry Jun 16 '24 at 00:21
  • @Henry thank you for help! Could you show me the inclusion-exclusion and recursion ideas? Provided link and the answer mention Stirling numbers of second kind and I would love to avoid those. – thefool Jun 16 '24 at 01:27
  • My answer to the linked question gives a recursion if you replace $365$ days with $52$ cards. For an example of inclusion-exclusion see https://math.stackexchange.com/a/4813267/6460 using $m=52$ – Henry Jun 16 '24 at 01: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 Jun 16 '24 at 05:20
  • @Henry I see the recursion.If I replace 365 days with 52 cards I get: $p(N,m) = \frac{m}{52}p(N-1,m)+\frac{53-m}{52}p(N-1,m-1)$. But that is a recoursion on $N$ and $m$. In my case, I need compact function of $N$ (not including sums). – thefool Jun 16 '24 at 17:30
  • Should I therefore unfold the recoursion for $m = 52$ and 'go down with m' until $m = 0$? That will be my function of N, right? – thefool Jun 16 '24 at 17:39
  • @thefool: you want $P(N,52)$ for all the cards - in the linked recursion answer $P(N,365)$ for all the $365$ days to be somebody's birthday. "Unfolding" may not be the best approach; starting with $m=0$ and then increasing towards $52$ may be more efficient. If you want to avoid sums (i.e. reject recursion or inclusion-exclusion) then exact results and compact expressions require Stirling numbers of the second kind or something equivalent. – Henry Jun 16 '24 at 17:43
  • @Henry, so the answer is: $p(N, 52) = p(N-1, 52) + \frac{1}{52} p(N-1, 51)$ and it is impossible to solve that recoursion (express it as a compact function of N) without Stirling numbers of second kind? – thefool Jun 16 '24 at 17:48
  • @thefool You do not need Stirling numbers of second kind to find the values $p(52,52)\approx 4.7\times 10^{-22}$ or $p(225,52)\approx 0.50579$ or $p(1000,52)\approx 0.9999998$; you can use a spreadsheet to get all these values simultaneously. But an exact compact expression will require Stirling numbers of the second kind or something equivalent. – Henry Jun 16 '24 at 18:01
  • Ok, now I understand. Thank you for help. I will update my original question or write an answer containing the use of inclusion-exclusion to bring it home. Thanks! – thefool Jun 16 '24 at 18:16
  • @Henry does my answer look correct? – thefool Jun 16 '24 at 18:44

1 Answers1

1

To calculate the probability that each card in a deck of $52$ cards will be drawn at least once in $N$ draws with replacement, we can use the principle of inclusion-exclusion.

Let $A_i$​ be the event that the $i$-th card is not drawn in $N$ draws.

We want the probability that every card is drawn at least once, which is $\mathbb{P}(\bigcap_{i=1}^{52} A_i^c)$.

The probability of not drawing a specific card $i$ in a single draw is $1 − \frac{1}{52} = \frac{51}{52}$

The probability that card $i$ is not drawn in $N$ draws is $\left( \frac{51}{52} \right)^N$.

The principle of inclusion-exclusion allows us to calculate the probability that at least one of the events $A_i$​ occurs: $$\mathbb{P} \left( \bigcup_{i=1}^{52} ​A_i​ \right) = \sum_{i=1}^{52} ​\mathbb{P}(A_i​) − \sum_{1≤i<j≤52} \mathbb{P} (A_i​ \cap A_j​) + \sum_{1≤i<j<k≤52} ​\mathbb{P} (A_i​ \cap A_j ​\cap A_k​) − ...$$

For each $k$-subset of cards, the probability that all $k$ cards are not drawn in $N$ draws is: $$\mathbb{P} (A_{i_1}​​ \cap A_{i_2} \cap ... \cap A_{i_k}​​) = \left( \frac{52-k}{52} \right)^N$$

We can use inclusion-exclusion to find the probability that at least one card is missing, and subtract this from $1$ to get the probability that every card is drawn at least once.

Finally:

$$\mathbb{P}(\text{each card drawn at least once}) = 1 − \mathbb{P}(\text{at least one card is missing})$$

$$\mathbb{P}(\text{each card drawn at least once}) = 1 − \sum_{k=1}^{52} ​(−1)^{k+1} {{52}\choose{k}} \left( \frac{52-k}{52} \right)^N$$

thefool
  • 1,024
  • +1 to your accurate and valid answer. My only constructive criticism is to suggest that in general with such problems, you (alternatively) express the probability as something like $~\dfrac{A}{D} ~: ~D = (52)^N.~$ So, you compute $~A~$ combinatorically, using Inclusion-Exclusion, bypassing any considerations of probability, thus (arguably) making things easier on yourself. You might end up with something like $$A = \sum_{k=0}^{52} (-1)^{k} \binom{52}{k} (52-k)^N.$$ – user2661923 Jun 17 '24 at 04:47
  • See also this answer for an explanation of and justification for the Inclusion-Exclusion formula. – user2661923 Jun 17 '24 at 04:52