# Expected Number of Rolls needed to get a 3 and then a 4 consecutively of an unbiased dice

Not to be confused with the number of rolls needed to get two of the same number, suppose you keep rolling a dice until you get a 3 and then 4 consecutively. Calculate the expected number of rolls required.

My logic was that the probability of rolling a three is 1/6 and the probability of rolling a four is 1/6, so we can multiply the two to get 1/36. Then since the distribution is geometric, the expected value of the geometric distribution is $$1/p = 1/(1/36) = 36$$.

However, multiple people have gotten an answer of either 9 or 12. I get how one would arrive at 12, but how do you get 9 rolls out of this? Just what does this problem have to do with Harmonic Numbers? Any help would be appreciated.

• You can take a look here. I don't think $9$ or $12$ is correct. Nov 14, 2018 at 21:40

Just to have a different method, let's do it with states. There are only three states of interest. Either you are just starting or the last throw was not a three (call it $$\mathscr S_{\emptyset}$$) or the last throw was a $$3$$, call it $$\mathscr S_{3}$$, or you are done.
We also denote by $$E_{\emptyset}$$ ansd $$E_3$$ the expected number of moves it should take to finish from there. Of course $$E_{\emptyset}$$ is the answer we seek.
Considering the first toss we see that $$E_{\emptyset}=\frac 16\times (E_3+1)+\frac 56\times (E_{\emptyset}+1)$$
And if you are in $$\mathscr S_{3}$$ we see that $$E_3=\frac 16\times 1+\frac 16\times (E_3+1)+\frac 46\times (E_{\emptyset}+1)$$
This system is easy to solve and we get $$E_{\emptyset}=36\quad E_3=30$$