First Repeated Die Roll
You roll a fair six-sided die repeatedly until you see a number that has already appeared. Let $r$ be the total number of rolls, and let $p_r$ be the probability that the game lasts exactly $r$ rolls.
Part 1. Calculate $p_3$.
Part 2. What is $p_1 + p_2 + \cdots + p_{10}$?
Part 3. What is $P(r = 5 \mid r \geq 3)$?
Hints
- Think about what must happen on each successive roll for the game to continue -- how many "safe" faces remain?
- The probability of no collision through the first $r-1$ rolls is $\frac{6}{6} \cdot \frac{5}{6} \cdot \frac{4}{6} \cdots \frac{7-(r-1)}{6}$. On roll $r$, the collision probability is $\frac{r-1}{6}$.
- For Part 2, how many faces does a six-sided die have? What does the pigeonhole principle say about the maximum possible $r$? For Part 3, use $P(A \mid B) = P(A)/P(B)$ and compute $P(r \geq 3)$ via the complement.
Worked Solution
How to Think About It: This is a birthday-problem variant on a six-sided die. Each roll is like a new person arriving -- you keep going until you get a "collision" with a previously seen face. The key observation is that on roll $k$, there are $k - 1$ faces already seen, so the probability of matching is $(k-1)/6$, and the probability of not matching is $(7-k)/6$. That gives you a clean product formula for $p_r$. Before doing any algebra, notice that with only 6 faces you must get a repeat by roll 7 at the latest (pigeonhole), so $p_r = 0$ for $r \geq 8$ and for $r = 1$.
Quick Estimate: The expected number of rolls is roughly the birthday-problem threshold for $n = 6$. A quick approximation: you expect a collision after about $\sqrt{\pi \cdot 6 / 2} \approx 3.1$ rolls. So the probability mass should be centered around $r = 3$ or $r = 4$. For Part 1, $p_3$ should be a decent chunk -- maybe around $5/18 \approx 0.28$. For Part 2, the sum over all possible outcomes must be 1 since the game always terminates. For Part 3, conditioning on $r \geq 3$ just removes $p_2 = 1/6$, so we are re-normalizing over a probability mass of $5/6$.
Approach: Build the product formula for $p_r$ using sequential independence, then apply conditional probability for Part 3.
Formal Solution:
Part 1: Computing $p_3$
For the game to last exactly 3 rolls: - Roll 1: any face. Probability $= 1$. - Roll 2: must differ from roll 1. Probability $= 5/6$. - Roll 3: must match one of the 2 faces already seen. Probability $= 2/6$.
Since rolls are independent:
$$p_3 = 1 \cdot \frac{5}{6} \cdot \frac{2}{6} = \frac{10}{36} = \frac{5}{18}$$
More generally, for $2 \leq r \leq 7$:
$$p_r = \left(\prod_{k=1}^{r-1} \frac{7-k}{6}\right) \cdot \frac{r-1}{6}$$
The first product ensures rolls $1$ through $r-1$ are all distinct, and the last factor is the probability that roll $r$ matches one of the $r-1$ previously seen faces.
Part 2: $p_1 + p_2 + \cdots + p_{10}$
A six-sided die has only 6 faces, so by the pigeonhole principle the game must end by roll 7 at the latest: after 6 rolls you have seen at most 6 distinct faces, and the 7th roll is guaranteed to repeat one.
Therefore $p_r = 0$ for $r = 1$ (no face to repeat on the first roll) and for $r \geq 8$ (impossible). The events $\{r = 2\}, \{r = 3\}, \ldots, \{r = 7\}$ partition the entire sample space, so:
$$p_1 + p_2 + \cdots + p_{10} = p_2 + p_3 + \cdots + p_7 = 1$$
Part 3: $P(r = 5 \mid r \geq 3)$
This is a direct application of conditional probability:
$$P(r = 5 \mid r \geq 3) = \frac{P(r = 5 \cap r \geq 3)}{P(r \geq 3)} = \frac{P(r = 5)}{P(r \geq 3)}$$
since $r = 5$ implies $r \geq 3$.
First, compute $p_5$:
$$p_5 = \frac{6}{6} \cdot \frac{5}{6} \cdot \frac{4}{6} \cdot \frac{3}{6} \cdot \frac{4}{6} = \frac{5 \cdot 4 \cdot 3 \cdot 4}{6^4} = \frac{240}{1296} = \frac{5}{27}$$
For the denominator, use the complement. The complement of $r \geq 3$ is $r \leq 2$, and since $p_1 = 0$:
$$P(r \geq 3) = 1 - p_1 - p_2 = 1 - 0 - \frac{1}{6} = \frac{5}{6}$$
Putting it together:
$$P(r = 5 \mid r \geq 3) = \frac{5/27}{5/6} = \frac{5}{27} \cdot \frac{6}{5} = \frac{6}{27} = \frac{2}{9} \approx 0.222$$
Verification by simulation:
```python import random
def simulate_game(): seen = set() rolls = 0 while True: face = random.randint(1, 6) rolls += 1 if face in seen: return rolls seen.add(face)
N = 500_000 count_5_given_ge3 = 0 count_ge3 = 0
for _ in range(N): r = simulate_game() if r >= 3: count_ge3 += 1 if r == 5: count_5_given_ge3 += 1
print(f"p_3 = {sum(1 for _ in range(N) if simulate_game() == 3) / N:.4f}") print(f"P(r=5 | r>=3) = {count_5_given_ge3 / count_ge3:.4f}") # Expected: p_3 ~ 0.2778, P(r=5|r>=3) ~ 0.2222 ```
Answer:
- Part 1: $p_3 = \dfrac{5}{18} \approx 0.278$
- Part 2: $p_1 + p_2 + \cdots + p_{10} = 1$
- Part 3: $P(r = 5 \mid r \geq 3) = \dfrac{2}{9} \approx 0.222$
Intuition
This problem is a miniature version of the birthday problem: with $d$ equally likely "slots" (here $d = 6$ die faces), how many independent draws until you see a repeat? The product formula $P(\text{no collision in } k \text{ draws}) = \prod_{i=0}^{k-1}(1 - i/d)$ is one of the most useful expressions in combinatorial probability. It shows up everywhere -- from hashing collisions to duplicate trade IDs to sampling without replacement.
The conditional probability in Part 3 is a good reminder that conditioning on "at least $k$ rolls" just re-normalizes the tail of the distribution. The complement trick ($P(r \geq 3) = 1 - p_2$) is much cleaner than summing $p_3 + p_4 + \cdots + p_7$ individually. In interviews, always look for the complement shortcut when conditioning on tail events -- it saves time and reduces arithmetic errors.