Probability of rolling a dice 8 times before all numbers are shown.

Rephrase the question:

What is the probability of not seeing all $6$ values when rolling a die $7$ times?


Find the probability of the complementary event:

What is the probability of seeing all $6$ values when rolling a die $7$ times?


Use the inclusion/exclusion principle in order to count the number of ways:

  • Include the number of ways to roll a die $7$ times and see up to $6$ different values: $\binom66\cdot6^7$
  • Exclude the number of ways to roll a die $7$ times and see up to $5$ different values: $\binom65\cdot5^7$
  • Include the number of ways to roll a die $7$ times and see up to $4$ different values: $\binom64\cdot4^7$
  • Exclude the number of ways to roll a die $7$ times and see up to $3$ different values: $\binom63\cdot3^7$
  • Include the number of ways to roll a die $7$ times and see up to $2$ different values: $\binom62\cdot2^7$
  • Exclude the number of ways to roll a die $7$ times and see up to $1$ different values: $\binom61\cdot1^7$

Divide the result by the total number of ways, which is $6^7$:

$$\frac{\binom66\cdot6^7-\binom65\cdot5^7+\binom64\cdot4^7-\binom63\cdot3^7+\binom62\cdot2^7-\binom61\cdot1^7}{6^7}=\frac{35}{648}$$


Calculate the probability of the original event by subtracting the result from $1$:

$$1-\frac{35}{648}=\frac{613}{648}\approx94.6\%$$


(Edit: Answer is for the probability of seeing all the numbers for $n$ rolls)

For exactly $n$ rolls, the problem can be solved using a markov chain

\begin{align*} A&= \begin{pmatrix}0 & 1 & 0 & 0 & 0 & 0 & 0\cr 0 & \frac{1}{6} & \frac{5}{6} & 0 & 0 & 0 & 0\cr 0 & 0 & \frac{1}{3} & \frac{2}{3} & 0 & 0 & 0\cr 0 & 0 & 0 & \frac{1}{2} & \frac{1}{2} & 0 & 0\cr 0 & 0 & 0 & 0 & \frac{2}{3} & \frac{1}{3} & 0\cr 0 & 0 & 0 & 0 & 0 & \frac{5}{6} & \frac{1}{6}\cr 0 & 0 & 0 & 0 & 0 & 0 & 1\end{pmatrix} \end{align*}

where the rows and columns are the number of faces of the die seen.

The probability of seeing all the faces in exactly 8 rolls is $(A^8)[0,6]$, which is $\dfrac{665}{5832}\approx 0.11402606310014$

For any $n$, it can be found by finding the generating function $G(z)$ and in turn finding the coefficient of $z^n$

\begin{align*} \mathbb{P}(n) = 1-\frac{20}{2^n}+15\left(\frac{2}{3}\right)^n+\frac{15}{3^n}-6\left(\frac{5}{6}\right)^n-\frac{6}{6^n} \end{align*}