A 1-D random walk starting at step $0$ has an absorbing barrier at step $s=3$.
I want to calculate the expected number of steps, starting from $0$, to get to $s=3$
The transition probabilities are:
$ T = \begin{bmatrix} 0 & 1 & 0 & 0\\ 1/3 & 0 & 2/3 & 0 \\ 0 & 2/3 & 0 & 1/3 \\ 0 & 0 & 0 & 1 \end{bmatrix} $
The first assumption, is that the expected number of steps to get from $0$ to $3$ is:
$E_{03} = E_{01} + E_{12} + E_{23}$
where $E_{ij}$ is the expected steps to get from $i$ to $j$
Now, we have
$E_{01} = 1$ as one transitions from $0$ to $1$ with $p=1$
$E_{12} = \frac{2}{3}\cdot 1 + \frac{1}{3}E_{02}$. This means one takes one step forward with $p=\frac{2}{3}$ or a step back with $p=\frac{1}{3}$
$E_{02} = E_{01}+E_{12}$ Therefore we can plug this is in into the previous equation to solve for $E_{12} = \frac{3}{2}$
$E_{23} = \frac{1}{3}\cdot 1 + \frac{2}{3}E_{13} = \frac{1}{3}\cdot 1 + \frac{2}{3}[E_{12} + E_{23}] $, which one can solve and gives $E_{23}=4$
Therefore, $E_{03} = 1+ \frac{3}{2} + 4 = \frac{13}{2}$
However, this result is wrong, and I'm not sure where the faulty reasoning is here.
Just realized what the issue is. I'll paste it here in case it helps.
The right equation for 2 above is:
$E_{12} = \frac{2}{3} \cdot 1 + \frac{1}{3}(E_{02} + \bf{1})$
Since one needs to count the step taken from $1$ to $0$.
Similarly, equation 4 should be
$E_{23} = \frac{1}{3} \cdot 1 + \frac{2}{3}(E_{12} + E_{23} + \bf{1})$