# Mean first passage time of a Markov Chain

If I have this matrix:$$P= \begin{pmatrix} 0.2 & 0.3 & 0.5 \\ 0.5 & 0.1 & 0.4 \\ 0.3 & 0.3 & 0.4 \\ \end{pmatrix}$$ How do I find the mean first passage time $m_0,_2$ and $m_2,_0$? I know that $m_{i,j}$ = $1 +$ $\sum_{k≠j} P_{i,k}m_{k,j}$ so, is this how you would go about this:

$m_2,_0$ = $1 + P_2,_1m_1,_0 + P_2,_3m_3,_0$ = $1 + (0.5)$ $m_1,_0$? + $(0.4)$ $m_3,_0$? Then, where do I go from here?

• You have a system of 3 equations for 3 unknowns if you redo the calculation for all $m_{i,j}$, so just solve it. – Alex R. Oct 30 '17 at 18:29
• Could you clarify? Like by using Gaussian Elimination? – AmaC Oct 30 '17 at 18:34
• Use your formula to set up equations of the form $m_{1,0}=...,m_{2,0}=...,m_{3,0}=...$ and then use your favorite method to solve them. – Alex R. Oct 30 '17 at 19:04
• I believe there are $6$ unknowns. In general $m_{i,j}\neq m_{j,i}$. Is there a way to recast the equation $m_{i,j}=1+\sum_{k\neq j}P_{i,k}m_{k,j}$ into matrix form? Without the $k\neq j$ constraint, it looks like matrix multiplication. – Zhuoran He Oct 30 '17 at 20:57
• @AlexR., do you know if this is possible? – Zhuoran He Oct 30 '17 at 21:19

\begin{align} \left\{\begin{array}{} \left.\begin{array}{} m_{10}=1+P_{11\,}m_{10}+P_{12\,}m_{20},\\ m_{20}=1+P_{21\,}m_{10}+P_{22\,}m_{20}, \end{array}\,\right\}\rightarrow\mbox{ to State }0\\ \left.\begin{array}{} m_{01}=1+P_{00\,}m_{01}+P_{02\,}m_{21},\\ m_{21}=1+P_{20\,}m_{01}+P_{22\,}m_{21},\\ \end{array}\,\right\}\rightarrow\mbox{ to State }1\\ \left.\begin{array}{} m_{02}=1+P_{00\,}m_{02}+P_{01\,}m_{12},\\ m_{12}=1+P_{10\,}m_{02}+P_{11\,}m_{12}. \end{array}\,\right\}\rightarrow\mbox{ to State }2 \end{array}\right. \end{align} The equations with different destinations (second index) are uncoupled and can be solved separately. So to find $m_{02}$ you solve the $2$ coupled equations for $m_{02},m_{12}$, and to find $m_{20}$ you solve the $2$ coupled equations for $m_{10},m_{20}$. I'll let you work out the numbers. This method is equivalent to the absorbing state method, in which you set the destination as an absorbing state.
• @Zhouran He So, $m_0,_2$ = 19/40 and $m_2,_0$ = 20/7? – AmaC Oct 31 '17 at 1:03
• @AmaC, I got $\,m_{02}=40/19$, $m_{20}=20/7$. – Zhuoran He Oct 31 '17 at 4:13