3

I have a set of 54 numbers $[1,2,3,4, ... 54]$. After choosing one at random, it is replaced. The sequence continues until all numbers have been drawn at least once. How do I calculate the probability that all numbers will have been drawn at least once after drawing $n$ times, where $n > 54$.

I have tried calculating it by making a sequence of the probabilities of choosing a number that you have not already chosen, i.e. $\frac{54}{54},\frac{53}{54},\frac{52}{54},\frac{51}{54},... \frac{1}{54}$, but multiplying them all together gives the probability of drawing all numbers in only 54 tries, and I don't know how to calculate the formula for other values of $n$.

Bretsky
  • 343

1 Answers1

3

Let $x_1 $ denote the number of times 1 has been picked, $x_2$ denote the number of times 2 has been picked and so on upto $x_{54}$ where each of these vary from $0$ to $n$.

Calculation of total cases.

Total number of draws is $n$.

Hence, $x_1+x_2+\dots +x_{54} = n. $

This has number of solutions $\binom{n+53}{53}$ as you should know.

Therefore, total number of cases = $\binom{n+53}{53}$

Calculation of favorable cases

In this case, all those cases when any $x_i = 0 $ have to be removed.

Hence the equation becomes $x_1 + x_2 + \dots + x_{54} = n-54 \space\space\space$ (by supplying 1 to each $x_i$)

This has number of solutions $\binom{n-1}{53}$.

So favorable cases = $ \binom{n-1}{53}$

Hence, probability $P(n)$ = $\frac{\binom{n-1}{53}}{\binom{n+53}{53}} $

You can also check that $$\lim_{n \to \infty} P(n) = 1 $$.

Arpan
  • 2,633
  • I don't think your answer is accurate, as it gives the same value for all values of n, although the probability that all the numbers have already been drawn is obviously going to get larger and larger, approaching 1, as n gets very large. Also, I tested the question with a random number generator, and it usually takes 300±100 attempts to draw all 54. – Bretsky Mar 14 '15 at 16:21
  • Yes, I think there should also be a $ n \choose 54 $ in the numerator. – Arpan Mar 14 '15 at 16:47
  • Because the probability can never exceed 1, that makes your answer wrong. Although quite unlikely, there is a possibility that it could take over 1100 tries, disproving your formula. – Bretsky Mar 14 '15 at 17:19
  • OK sorry but I am a high school math student who never formally learned probability. What is the \choose? – Bretsky Mar 14 '15 at 17:24
  • When there is one number above another without the fraction line, what does that mean? – Bretsky Mar 14 '15 at 17:34
  • I have edited my answer. Refer http://en.wikipedia.org/wiki/Binomial_coefficient and try solving some basic problems first to build a grasp on the concept. – Arpan Mar 14 '15 at 17:34
  • Suppose you have to choose 2 elements from 3 distinct elements {1,2,3}. You can do this in 3 ways -
    1. {1,2}
    2. {2,3}
    3. {3,1}

    This is represented by $\binom{3}{2}$. It basically means choosing 2 out of 3 elements.

    – Arpan Mar 14 '15 at 17:38
  • Note that the formula at the end is a cumulative distribution function for $P(N \leq n) = \frac{n-1 \choose 53}{n+53 \choose 53}$ given a random variable N = {"Number of draws until all numbers have been drawn at least once"} – alain.s Mar 18 '19 at 10:48
  • This answer is incorrect as it assumes that samples with the same number are indistinguishable even though they were drawn at different times. The question is essentially the coupon collector's problem with correct approaches at https://math.stackexchange.com/questions/963077/cdf-of-probability-distribution-with-replacement and https://math.stackexchange.com/questions/379525/probability-distribution-in-the-coupon-collectors-problem using Stirling numbers of the second kind or inclusion-exclusion – Henry Apr 04 '23 at 21:37