7

A die is rolled until every number appears at least once. What is the probability that the number 1 only appears once?

I think the problem is related to the Coupon collector's problem, but I cannot think of a good way to solve this problem.

Edit: I have used simulation to find that the probability is around 0.4081. I have tried methods such as dividing the case with 1 appears in the last roll, and the case 1 appears not in the last roll, but the computation is too complicated.

RobPratt
  • 45,619
  • 2
    Both at most once and exactly once is the same, since the dice is rolled until every number, including 1, appears at least once – deep12345 Jan 31 '20 at 12:50
  • 1
    $(1/6)(1/6+1/5+1/4+1/3+1/2+1/1)=0.408333$ I am not able to provide full answer at this time, but that result is from cases where $1$ is the first, second, third, etc number to appear. – Daniel Mathias Jan 31 '20 at 14:29
  • 1
    @DanielMathias I'd be interested to hear your full reasoning when you have time as we got the same final answer so I don't doubt that your approach is valid but I do not as of yet understand your approach given the snippet you've written. – JMoravitz Jan 31 '20 at 14:38
  • 2
    @JMoravitz Following the first $1$, the number $1$ must then be the last number to appear among itself and all unseen numbers. – Daniel Mathias Jan 31 '20 at 14:53

4 Answers4

7

To have failed means that: At least two $1$'s have occurred before the first $2$ or At least two $1$'s have occurred before the first $3$ or At least two $1$'s have occurred before the first $4$ etc...

We continue with inclusion-exclusion over these events.

So, what is the probability that at least two $1$'s have occurred before the first $2$? Well, we can conveniently forget about all other possibilities of the dice and all rolls which resulted in a result other than these. At least two $1$'s before the first $2$ when considering only $1$'s and $2$'s as possibilities occurs when the first two results which were $1$'s or $2$'s were both $1$'s and occurs with probability $\frac{1}{4}$. Similarly so had it been at least two $1$'s before the first $3$ and so on...

What is the probability that at least two $1$'s have occurred before the first $2$ and before the first $3$? Well, again, the first two rolls will both need to be $1$'s (again, remembering that we are considering the only possible rolls as being $1$'s, $2$'s, and $3$'s at the moment) and occurs with probability $\frac{1}{9}$. Similarly for other combinations of two numbers.

The pattern continues, the probability of at least two $1$'s occurring before any of a group of $k$ other results occurs with probability $\frac{1}{(k+1)^2}$ as again the first two rolls must both be $1$'s.

Remembering how many choices there are for each collection of other results of various sizes, we are now ready to put all of this together to the probability of failure as being:

$$5\times \frac{1}{4} - \binom{5}{2}\frac{1}{9}+\binom{5}{3}\frac{1}{16}-\binom{5}{4}\frac{1}{25}+\frac{1}{36} = \frac{71}{120}$$

Giving a final answer to your original question of:

$$\frac{49}{120} = 0.408\overline{3}$$

JMoravitz
  • 79,518
  • This is a good method! I have thought of the probability of having two or more 1s, but never thought we can ignore other numbers when calculating the probabilities. – deep12345 Jan 31 '20 at 14:49
1

Acting on the principle that it's good to know more than one way to solve a problem, here is a solution based on exponential generating functions. Readers not familiar with generating functions may find useful resources in the answers to this question: How can I learn about generating functions?

Let's say that $a_n$ is the probability that exactly $n$ rolls of the die are required to see every number at least once, with exactly one $1$ appearing. We want to find the exponential generating function of $\{a_n\}$. There are two cases: either the final roll is a $1$, or the final roll is some other number.

In the first case, there must be a sequence of rolls in which every number except $1$ appears at least once, and then the final roll is the only $1$. The EGF for the probabilities in this case is $$f_1(x) = (e^{x/6}-1)^5 \cdot (1/6)$$

As an example of the second case, let's suppose the final roll is a $2$. Then there must be a sequence of rolls in which $1$ appears exactly once, each of the numbers $3$ through $6$ appear at least once, and then the final roll is the only $2$. The EGF for the probabilities in this example is $$f_2(x) = (e^{x/6}-1)^4 \cdot ((1/6)x) \cdot (1/6)$$ The EGFs for the cases in which the final roll is a $3$, $4$, or $5$ are the same as $f_2(x)$, so the EGF for $\{a_n\}$ is $$g(x) = f_1(x) + 5 f_2(x)$$ i.e. $$g(x) = \sum_{n=0}^{\infty} \frac{1}{n!} a_n x^n$$ We want to know the total probability $$p = \sum_{n=0}^{\infty} a_n$$ Taking advantage of the identity $$n! = \int_0^{\infty} x^n e^{-x} \; dx$$ we have $$p = \int_{0}^{\infty} e^{-x} g(x) \; dx$$ On evaluation of the integral, we find $$p = \frac{49}{120} \approx 0.40833$$

awkward
  • 14,736
1

Let state $(n,k)$ correspond to having rolled $n$ 1s and $k$ other distinct numbers, where $n\in\{0,1,2\}$ and $k\in\{0,\dots,5\}$. We start in state $(0,0)$, the absorbing states $(2,k)$ are losses, and the absorbing state $(1,5)$ is a win. Let $p(n,k)$ denote the win probability given state $(n,k)$. We want to compute $p(0,0)$. By conditioning on the value of the next roll (1, old number, or new number), we see that $p(n,k)$ satisfies the following linear recurrence relations: $$ p(n,k)= \begin{cases} 0 &\text{if $n=2$}\\ 1 &\text{if $(n,k)=(1,5)$}\\ \frac{1}{6}p(n+1,k) + \frac{k}{6}p(n,k) + \frac{5-k}{6}p(n,k+1) &\text{otherwise} \end{cases} $$ Solving for $p$ yields \begin{matrix} n\backslash k & 0 &1 & 2 & 3 & 4 & 5\\ 0 &49/120 &137/300 &25/48 &11/18 &3/4 &1\\ 1 &1/6 &1/5 &1/4 &1/3 &1/2 &1\\ 2 &0 &0 &0 &0 &0 &0\\ \end{matrix} In particular, $p(0,0)=49/120$.

RobPratt
  • 45,619
1

Full credits of this answer goes to @Daniel Mathias. I'm just elaborating on what he has written in the comments.

At any point of occurrence of the number $1$, consider the list of numbers "yet to occur" and the number $1$ again. (We can discard the numbers which have occured already, as they won't affect our probability). From the above mentioned list, which has size say $n$, with $1 \leq n \leq 6$ let this list denote the their respective orders of their occurrence in the subsequent throws(again to emphasize we aren't considering the numbers which already occured).

In this list, as per given conditions, the number $1$ mustn't occur at all again. Hence it is necessary that the other numbers in the list must be present before the number $1$. Let as denote the situation when $1$ occurs at the end of the list, to be the case when the experiment is a sucess, as all conditions in the Question have been met.In particular, the occurrence of the number $1$ after the experiment is a success is redundant and also isn't going to affect our answer in any way. So it is necessary that the number $1$ must occur at the end of the list, for any given list.

Hence the probability that the experiment is a success given that $1$ has occured with $n$ numbers are yet to occur is would be $\frac{(n-1)!}{n!}=\frac{1}{n}$.

Our final answer as per theorem of total probability would be the probability of occurrence of the number $1$(since it is samd for all sizes of the list/same at any point of its occurence) and the summation of the probability for all possible sizes of the list.

Hence the answer is $\frac{1}{6}(\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\frac{1}{6})=\frac{49}{120}=0.40833...$

user600016
  • 2,165