3

What is the probability when rolling a fair dice $7$ times to see every number $1, \dots, 6$ at least once?

My attempt: The total number of outcomes is $6^7$. Now we count the number of possibilities to see all the $6$ numbers as follows:

Let's consider the first roll unimportant. The last 6 rolls have to show every number (there are 6 possibilities for the first roll and $6!$ possibilities for the last 6 rolls to show every number). There are $6\cdot 6!$ possibilities.

Now we repeat the process, but consider the second roll unimportant and so on.

This yields: $6 \cdot 6 \cdot 6!$ possibilities. But we counted some elements twice. How can I calculate the number of possibilities I counted twice or is there an easier way to approach this problem?

user7802048
  • 1,285
  • 1
    Can you give us an example of a possibility that is counted twice? Maybe 1-2-2-3-4-5-6. To me it feels like each one is counted exactly twice – David Jul 29 '19 at 10:28
  • Alternative: you want to find the number of positive integer solutions to $$x_1+x_2+x_3+x_4+x_5+x_6 = 7$$

    where $x_i$ is the number of times $i$ is seen.

    – AgentS Jul 29 '19 at 10:30
  • 1
    @rsadhvika That doesn't take into account the ordering of the dice, though. At least not without additional work. – Arthur Jul 29 '19 at 10:32
  • Oh ok. Let me check.. btw thank you :) – AgentS Jul 29 '19 at 10:33
  • @rsadhvika: there are exactly six positive integer solutions to that equation. But this doesn't help very much. – TonyK Jul 29 '19 at 10:52

2 Answers2

2

I can see one mistake: there are seven dice that may be considered unimportant, not six.

You counted each possibility exactly twice. For instance, consider the throw $$ 1, 2, 3, 4, 5, 6, 6 $$ You counted it once when the sixth die was unimportant, and once when the seventh die was unimportant. Same goes for any other throw: Whatever the pair is, you counted the throw once when the first pair die was unimportant, and once when the second pair die was unimportant.

Alternative approach: No matter which way you throw six different numbers with seven dice, there must be exactly one pair. Choose the value of the pair, decide what places the two dice in the pair appear, then place the rest of the dice. You get the same answer.

Arthur
  • 204,511
  • 1
    Ok, so I counted every possibility exactly twice, since there is exactly one number occurring twice and I'll count the same possibility for each of these two places fixed, right? This would lead to $\frac{3 \cdot 6 \cdot 6!}{6^7}$ as the probability. Is this correct? – user7802048 Jul 29 '19 at 10:33
  • @user7802048 Looks good to me. – Arthur Jul 29 '19 at 10:34
  • I'll calculate the some probability with your alternative approach and come back to you to. Thank you! – user7802048 Jul 29 '19 at 10:34
  • @user7802048 I caught a mistake you made. See first line in my answer. – Arthur Jul 29 '19 at 10:35
  • Yeah, I see so $\frac{7\cdot 6! }{2\cdot 6^7}$ is the right answer. I'm also getting there with your alternative approach. – user7802048 Jul 29 '19 at 10:37
  • Using your alternative approach: There is always exactly one pair. This pair can be at $6 + 5 + 4 + 3+ 2+ 1$ different positions ($= \frac{6\cdot 7}{2}$). The last $5$ dice must match exactly the $5$ missing dices - there are $5!$ different possibilities to do so. This yields: $\frac{6 \cdot 7 \cdot 5!}{6^7 2} = \frac{7!}{2 \cdot 6^7}$ - same as above. Thank you! – user7802048 Jul 29 '19 at 10:40
  • 1
    @user7802048: You forgot that there are six possibilities for the value of the pair. So you need to multiply that result by $6$. – TonyK Jul 29 '19 at 10:56
  • @user7802048 And your corrected first approach swapped two $6$'s for one $7$. You should've only swapped one. So still the two approaches give the right answer. – Arthur Jul 29 '19 at 10:59
2

In your case, precisely one number must appear twice. Fix this to be $1$. There are $\binom{7}{2}$ ways to pick where these appear, and then $5!$ options for the other five numbers. There $6$ options for the fixed number, so the solution is

$\cfrac{5!\cdot 6 \cdot \binom{7}{2}}{6^7} = \cfrac{6!\cdot\binom{7}{2}}{6^7} = 0.054$

(I have checked this using the following Python code:)

import numpy as np     
n = 1000000
counter = 0
for i in range(n):
if all(i in (np.random.random_integers(1,6,7)) for i in range(1,7)):
    counter+=1
print (counter/n)