# Expected number of die rolls until obtaining three same consecutive numbers.

What is the expected number of die rolls required to get 3 same consecutive outcomes (for example: a 111, 222, etc) if we use a 6-sided fair die? I was able to solve the case for a particular number like 3 consecutive sixes. The answer comes out to be 258. But in this question can we say expected number is $$1+E$$, where $$E$$ is the expected number of obtaining two consecutive 1's if the first die roll was a one or two consecutive 2's if the first die will was a 2 etc. So that way $$E= \frac{5}{6}(1+E)+\frac{1}{6(\frac{5}{6(2+E)} + 2\frac{1}{6})}$$. E comes out to be 42. So the final answer is 43. Is this correct? If not, what's the correct method?

• how can it be the result for three ones be different from that of three sixes, or any other triple? – G Cab Jun 17 at 7:59
• @GCab I suspect that it $E$ is meant to be: "the expected number of obtaining e.g. two consecutive 1's...". I think that "two consecutive 1's" is best replaced by "two consecutives". – drhab Jun 17 at 8:33

Let $$\mu$$ denote the expectation at the start of the process.

Let $$\mu_{1}$$ denote the expectation under condition that one roll has occurred or that the last two rolls have distinct result.

Let $$\mu_{2}$$ denote the expectation under condition that the result of the last two rolls are the same and differ from the (eventual) result of the roll that goes ahead of these two rolls.

Then we find the following equalities:

• $$\mu=1+\mu_{1}$$
• $$\mu_{1}=1+\frac{5}{6}\mu_{1}+\frac{1}{6}\mu_{2}$$
• $$\mu_{2}=1+\frac{5}{6}\mu_{1}$$

This is not difficult to solve and we find: $$\mu_2=36$$, $$\mu_1=42$$ and $$\mu=43$$.