Finding expected total number of die rolls Question
Ann and Bob take turns to roll a fair six-sided die. The game ends after a six or three consecutive fives come up, with the winner being the last person who threw the die. Ann will go first.
$(a)\quad$ Find the probability that Ann will win.
$(b)\quad$ Find the expected total number of rolls.
My working
Let $(A, 0)$ denote the state in which it is $A$'s turn and the prior toss was not a $5$ or a $6$, $(A, 5)$ the state in which it is $A$'s turn and the prior toss was a $5$ and $(A, 55)$ the state in which it is $A$'s turn and the prior two tosses were a $5$. The states for $B$ are defined similarly and note also that $(A, 0)$ is the starting state.
Now, for any state $S$, let $P(S)$ denote the probability that $A$ will eventually win, given that we are now in state $S$ and we have the following relationships:
$$\begin{aligned}
P(A, 0) & = \frac 1 6 + \frac 1 6 P(B, 5) + \frac 4 6 P(B, 0)
\\[5 mm] P(A, 5) & = \frac 1 6 + \frac 1 6 P(B, 55) + \frac 4 6 P(B, 0)
\\[5 mm] P(A, 55) & = \frac 2 6 + \frac 4 6 P(B, 0)
\\[5 mm] P(B, 0) & = \frac 1 6 P(A, 5) + \frac 4 6 P(A, 0)
\\[5 mm] P(B, 5) & = \frac 1 6 P(A, 55) + \frac 4 6 P(A, 0)
\\[5 mm] P(B, 55) & = \frac 4 6 P(A, 0)
\end{aligned}$$
The system of linear equations above can be easily solved to give $P(A, 0) = \frac {93} {170}$, which is the correct answer for $(a)$.
However, I am not sure how to approach $(b)$, whose answer is $\frac {129} {22}$. Any intuitive suggestions will be greatly appreciated :)

Edit
Following some hints Joe posted in an answer, I managed to solve $(b)$ :)
Let $X$ be the number of dice rolls it takes for the game to stop, $A$ be the event that a $5$ is first rolled, $B$ the event that a $6$ is first rolled and $C$ the event that neither a $5$ nor a $6$ is first rolled.
By the law of iterated expectation, we have
$$\begin{aligned}
\mathbb{E}(X) & = \mathbb{E}(X \mid A) \mathbb{P}(A) + \mathbb{E}(X \mid B) \mathbb{P}(B) + \mathbb{E}(X \mid C) \mathbb{P}(C)
\\[5 mm] & = (1)\left(\frac 1 6\right) + \mathbb{E}(X \mid B) \mathbb{P}(B) + [\mathbb{E}(X) + 1]\left(\frac 4 6\right)
\end{aligned}$$
To find $\mathbb{E}(X \mid B) \mathbb{P}(B)$, I chose to consider different cases.

*

*The game ends with three $5$s or two $5$s and a $6$, each case happening with probability $\left(\frac 1 6\right)^3$ and taking three turns to end.


*The game ends with one $5$ and one $6$, which happens with probability $\left(\frac 1 6\right)^2$ and takes two turns to end.
We must also not forget the cases where the game does not end (immediately).


*Two $5$s are thrown, followed by neither a $5$ nor a $6$, which happens with probability $\left(\frac 1 6\right)^2\left(\frac 4 6\right)$ and takes $\mathbb{E}(X + 3)$ turns to end.


*One $5$ is thrown, followed by neither a $5$ nor a $6$, which happens with probability $\left(\frac 1 6\right)\left(\frac 4 6\right)$ and takes $\mathbb{E}(X + 2)$ turns to end.
These four cases, when added up, will give
$$\begin{aligned}
\mathbb{E}(X \mid B) \mathbb{P}(B) & = \left(\frac 1 6\right)^3(3)(2) + \left(\frac 1 6\right)^2(2) + \left(\frac 1 6\right)^2\left(\frac 4 6\right)[\mathbb{E}(X + 3)] + \left(\frac 1 6\right)\left(\frac 4 6\right)[\mathbb{E}(X + 2)]
\\[5 mm] & = \frac 1 {12} + \frac 1 {54} \mathbb{E}(X + 3) + \frac 1 9 \mathbb{E}(X + 2)
\end{aligned}$$
Thus,
$$\begin{aligned}
\mathbb{E}(X) & = (1)\left(\frac 1 6\right) + \mathbb{E}(X \mid B) \mathbb{P}(B) + [\mathbb{E}(X) + 1]\left(\frac 4 6\right)
\\[5 mm] & = \frac 1 6 + \frac 1 {12} + \frac 1 {54} \mathbb{E}(X + 3) + \frac 1 9 \mathbb{E}(X + 2) + \frac 4 6 \mathbb{E}(X + 1)
\\[5 mm] & = \frac 1 4 + \frac 1 {54} \mathbb{E}(X + 3) + \frac 1 9 \mathbb{E}(X + 2) + \frac 4 6 \mathbb{E}(X + 1)
\\[5 mm] & = \frac {43} {36} + \frac {43} {54} \mathbb{E}(X)
\\[5 mm] \implies \mathbb{E}(X) & = \frac {129} {22}
\end{aligned}$$
 A: If $x$ is the expected number of rolls, $y$ is the expected number of rolls from $S(5)$ and $z$ is the expected number of rolls from $S(55)$, then we have
$\left
\{\begin{array}
{l}x = 1 + \dfrac{1}{6} \cdot y + \dfrac{4}{6} \cdot x \\ y = 1 + \dfrac{4}{6} \cdot x + \dfrac{1}{6} \cdot z \\
z = 1 + \dfrac{4}{6} \cdot x
\end{array}
\right.$
Solving, $x = \dfrac{129}{22}$
A: Let $X$ be the number of dice rolls that it takes for the game to stop. When we first roll the die, there are essentially $3$ options that can come up:

*

*A $6$ comes up. Call this event "$A$".

*A $5$ comes up. Call this event "$B$".

*Neither a $5$ nor a $6$ comes up. Call this event "$C$".

The law of iterated expectation states that
$$
\mathbb{E}(X)=\mathbb{E}(X\mid A)\mathbb{P}(A)+\mathbb{E}(X\mid B)\mathbb{P}(B)+\mathbb{E}(X\mid C)\mathbb{P}(C)
$$
It is trivial to compute the probabilities of $A$, $B$, and $C$ occurring.
If event $A$ occurs, then the game stops and $X=1$. Hence, $\mathbb{E}(X\mid A)=1$. If event $C$ occurs, then you have essentially wasted a turn. It will take another $\mathbb{E}(X)$ rolls on average for the game to stop. Hence, the overall number of expected spins $\mathbb{E}(X\mid C)=\mathbb{E}(X)+1$.
Calculating $\mathbb{E}(X|B)$ is harder. Given that you have rolled a $5$, you must again consider the possibilities that

*

*A $6$ comes up.

*A $5$ comes up.

*Neither a $5$ nor a $6$ comes up.

Can you work things out from here?
