# Expected time to roll all 1 through 6 on a die

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die? The order in which the numbers appear does not matter.

I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation. We were given the answer (1-(5/6)^n)^6 = .5 or n = 12.152

Can someone please explain this to me, possibly with a link to a general topic?

-
This is the coupon-collector's problem (en.wikipedia.org/wiki/Coupon_collector%27s_problem), but with dice. So there's your link to a general topic. :) –  Mike Spivey Mar 24 '11 at 23:49
Thanks for link :) –  eternalmatt Mar 25 '11 at 0:50
I'm glad that the justification for that formula which produces $12.152$ was unclear, since it's wrong, and it looks like more than one conceptual error went into it. –  Douglas Zare Mar 25 '11 at 2:34
If anyone's curious, simulating reveals $E[$time until all values rolled$]$ for two dice is roughly $61.2$. –  ninjagecko Jun 8 '11 at 20:35
@DouglasZare Performing a little algebromancy... (a) trying to find the point at which a probability becomes 50% and presuming that's the expectation (i.e., confusing mean for median); (b) Assuming that the probabilities each number is rolled is independent? If you assume independence, that gives the LHS: $1-\left(\frac56\right)^n$ gives the probability that e.g. 1 has been rolled after $n$ rolls; now include one of those factors for each of the six faces... –  Steven Stadnicki Jul 30 at 15:36

The time until the first result appears is $1$. After that, the random time until a second (different) result appears is geometrically distributed with parameter of success $5/6$, hence with mean $6/5$ (recall that the mean of a geometrically distributed random variable is the inverse of its parameter). After that, the random time until a third (different) result appears is geometrically distributed with parameter of success $4/6$, hence with mean $6/4$. And so on, until the random time of appearance of the last and sixth result, which is geometrically distributed with parameter of success $1/6$, hence with mean $6/1$. This shows that the mean total time to get all six results is $$\sum_{k=1}^6\frac6k=\frac{147}{10}=14.7.$$

-
Follow-up question, Didier: what's the distribution? :) –  Jérémie May 8 '12 at 23:20
@Jérémie Somehow my post gives the answer but if need be, just ask a new question. –  Did May 8 '12 at 23:42

Here's the logic:

The chance of rolling a number you haven't yet rolled when you start off is $1$, as any number would work. Once you've rolled this number, your chance of rolling a number you haven't yet rolled is $5/6$. Continuing in this manner, after you've rolled $n$ different numbers the chance of rolling one you haven't yet rolled is $(6-n)/6$.

You can figure out the mean time it takes for a result of probability $p$ to appear with a simple formula: $1/p$. Furthermore, the mean time it takes for multiple results to appear is the sum of the mean times for each individual result to occur.

This allows us to calculate the mean time required to roll every number: $t = 1/1 + 6/5 + 6/4 + 6/3 + 6/2 + 6/1 = 1 + 12/10 + 15/10 + 2 + 3 + 6 = 12 + 27/10 = 14.7$

-