Given irreducible PTM $ P = \begin{bmatrix} .25 & .25 & .25 & .25 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\end{bmatrix}$
The stationary distribution is $[.4 .3 .2 .1]$
Given T is the minimum amount of steps it takes to return to state 1, find $E[T|X_0=1]$ $T= min\{{n>0:X_n=1}\} $ We have a system ofequations by computing the expectations conditioned on the first state $X_1$ let $x=E[T|X_0 = 1]$ $y = E[T|X_0 = 2]$ $z = E[T|X_0 = 3]$ $w = E[T|X_0 = 4]$
$x = 1 + (T=0)P_{11} + (T= 1)P_{12}y + T(=2)P_{13}z+(T=3)P_{14}w$
$y= 1 + (T=0)P_{21} + (T=1)P_{22}P_{21} + (T=2)P_{23}z$
$z= 1 + (T=0)P_{31} + (T=1)P_{32}y + (T=1)P_{33}P_{31}$
$w = 1 + (T=0)P_{41} + (T=2)P_{43}z$
Is this the right way to compute the expectations? After solving I got that $y = 1, z= 2 w=5, x = 6$ and $x$ did not tie out with being the reciprocal of $\frac{1}{.4}$ so I think I am not conditioning correctly.