What’s the probability to see all 6 numbers after odd number of rolls

probability

Let X be the random variable which is the number of rolls required to see all 6 faces of a die. What's P(X is odd)?

I found a very indirect way to get an analytic answer, a fraction, to this question.
Let $E_2$ be average times a pair of 6-sided dice must be rolled until all sides appear at least once. Let $E_1$ be be average times one 6-sided die must be rolled until all sides appear at least once. Then, $2E_2 = E_1 + P(\text{X is odd})$, where $E_2$ can be obtained by Markov chain, which is quite messy but doable.

I'm wondering if there is an elementary way to get this fraction. I think, which could be wrong,
$$
P(X=n) = \frac{6*5^{n-6}{n-6 \choose 5} *5!}{6^n}
$$
.

So, in other words, I'm asking how you simplify the infinite sum of this expression over all odd n. In fact, if there is an easy way to solve this question. I should be able to find $E_2$ without markov chain.

Best Answer

Here is an approach using exponential generating functions. Readers unfamiliar with generating functions can find many resources in the answers to the question How can I learn about generating functions?

To simplify the discussion, let's assume the final roll is a $6$. Then the rolls up to that point must include at least one of each of $1$ through $5$ and no $6$. The exponential probability generating function for $n$ rolls with at least one of $1$ through $5$ and no $6$ is $(e^{x/6}-1)^5$. If we want the number of rolls to be even, then the EGF is $$f(x) = \frac{1}{2} [(e^{x/6}-1)^5 + (e^{-x/6}-1)^5] $$ I.e., $$f(x) = \sum_{n=0}^{\infty} p_n \frac{1}{n!} x^n$$ where $p_n$ is the probability of rolling a die $n$ times with a result of at least one each of $1$ through $5$ and no $6$, with $n$ even. Then $(1/6) f(x)$ is the EGF for the probability that we get a complete set of $1$ through $6$ with the final $6$ occurring on roll $n+1$, with $n+1$ odd. So the total probability of ending with a $6$ on an odd number of rolls is $$\begin{align} \frac{1}{6}\sum_{n=0}^{\infty} p_n &= \frac{1}{6} \int_0^{\infty} e^{-x} \; f(x) \; dx \tag{*} \\ &= \frac{1}{12} \int_0^{\infty} e^{-x} \cdot [(e^{x/6}-1)^5 + (e^{-x/6}-1)^5] \; dx \\ &= \frac{461}{5544} \end{align}$$ But of course the final roll may be any number from $1$ to $6$, not just $6$, so the answer to the problem is $$6\cdot \frac{461}{5544} = \boxed{\frac{461}{924}}$$ At $(*)$ we have taken advantage of the identity $$n! = \int_0^{\infty} x^n e^{-x} \; dx$$

Related Question