# Coupon collector - Chance of collecting desired coupons but not a full set. [duplicate]

Disclaimer: I am not in a mathematics field or a mathematics professional.

I'm interested to know how many random draws it would take to have a particular chance (50%, 75% and 90%) of getting 5 specific results (out of a pool of 12 possible results) at least once each, assuming that it is possible to obtain each result more than once and that each result is equally probable.

Eg. How many times would you have to roll a 12-sided die before you had a 50% chance of rolling at least one each of the numbers 1, 2, 3, 4 and 5? How many rolls for a 75% chance? How many rolls for a 90% chance.

I know this is a variant of the coupon collector problem, but my maths is nowhere near good enough to work on the problem or to even follow many of the explanations I've found online.

While I'm primarily interested in the "5 out of 12" scenario mentioned above, I'm also curious what the formula would be for "X out of Y" where X is the number of specific results that are desirable and Y is the total number of possible results.

• Well, it's straightforward to write an exact formula for the probability of getting all $5$ after drawing $m$ coupons and you can use that to find $m$ (e.g. using binary search) for when probability of getting all $5$ is at least $q$. However, I suspect that it may not be possible to find an explicit formula for $m$ without making approximations and then the value of $m$ will not be exact. – Qudit Oct 25 '17 at 8:02

Easiest for me was to set it up as a recursion, and then write a program to implement the recursion.

The following Maple program gets the results you asked about . . .

Thus, based on the results of the program,

• $25$ rolls are needed for success probability $\ge \frac{1}{2}$.$\\[8pt]$
• $34$ rolls are needed for success probability $\ge \frac{3}{4}$.$\\[8pt]$
• $45$ rolls are needed for success probability $\ge \frac{9}{10}$.

If you are interested in the expectation, the time until you get the first of your $X$ desired coupons from $Y$ equally likely possibilities has a geometric distribution with parameter $\frac{X}{Y}$ and so the expected time to get the first is $\frac{Y}{X}$

So the expected time to get all $X$ desired coupons is $$\frac{Y}{X}+\frac{Y}{X-1}+\cdots+ \frac{Y}{1} = YH_X$$ where $H_X$ is the harmonic number, about $\log(X)+\gamma+ \frac{1}{2X}$. When $X=Y$, this becomes the standard coupon collector's problem

In your particular example of $X=5$ and $Y=12$ as the sum of five independent geometric random variables this would give an expectation of $\frac{12}{5}+\frac{12}{4}+\frac{12}{3}+\frac{12}{2}+\frac{12}{1} = 27.4$, and a variance of $\frac{12^2}{5^2}-\frac{12}{5}+\frac{12^2}{4^2}-\frac{12}{4}+\frac{12^2}{3^2}-\frac{12}{3}+\frac{12^2}{2^2}-\frac{12}{2}+\frac{12^2}{1^2}-\frac{12}{1} = 183.26$

Since the five geometric random variables have different parameters I do not know of a simple form of the distribution of the sum, but it would not impossible to calculate for particular cases

As stated at Probability distribution in the coupon collector's problem, in the standard coupon collector's problem the probability not to have all $$m$$ coupons after $$n$$ draws is

$$\frac1{m^n}\sum_{j=0}^m(-1)^j\binom mj(m-j)^n\;,$$

which can be derived using inclusion–exclusion. Here $$\left(\frac{m-j}m\right)^n$$ is the probability of not drawing $$j$$ particular coupons in any of the $$n$$ draws. In your case, we're waiting for $$m=5$$ specific results but drawing from $$s=12$$, so we need to replace this probability by $$\left(\frac{s-j}s\right)^n$$. Thus, the probability to get all desired $$m$$ out of the $$s$$ results in $$n$$ draws is

$$\frac1{s^n}\sum_{j=0}^m(-1)^{m-j}\binom mj(s-j)^n\;.$$

Here's a table calculated with Wolfram|Alpha for $$m=5$$, $$s=12$$, $$n=1,\ldots,50$$ that confirms quasi’s results for the thresholds for probablities of $$\frac12$$, $$\frac34$$ and $$\frac9{10}$$.