Let's say we have a Markov chain with six states, number six being the absorbing state. Every state has a 50% probability to go one state up, and 50% probability of going one state down (with the obvious exception of state one, which will always go to state two).
We can calculate the expected number of steps from each starting state. How do I calculate the expected number of steps if the starting state is random? For example, if every state has a 1/6th probability of being the starting state (including the sixth, absorbing state).
Do I take the sum of all possible starting states times their respective probability, or is there a different approach?
Solve the system of linear equations:
$ E [ X | S_1 ] = 1 + E [ X | S_2 ] $
$ E[ X | S_n ] = \frac{1}{2} ( 1 + E [ X | S_{n-1} ] ) + \frac{1}{2} ( 1 + [ X | S_{n+1} ]) $
$ E[ X | S_6 ] = 0. $
We get that
$ E[X|S_6] = 0, E[X|S_5] = 9, E[X|S_4] =16, E[X|S_3] =21, E[X|S_2] =24, E[X|S_1] =25$
Hence $ E[X] = 15 \frac{5}{6}$.