Let ${X_n : n = 0, 1, 2, . . .}$ denote a Markov chain with the states $S = {1, 2, 3}$ and transition matrix P given by $$ \begin{bmatrix} 0 & 0.5 & 0.5 \\ 0.1 & 0 & 0.9 \\ 0.8 & 0.2 & 0 \end{bmatrix} $$
Assume that the Markov chain starts in state 1 with probability 1/3, in state 2 with probability 1/3 and in state 3 with probability 1/3.
Find the distribution of X_0 given X_2 = 2 i.e. what is the probability that X_0 assumes the values 1, 2, 3 given that X_2 = 2.
I really have no idea about how to solve this and that i have tried it the following which didn't work and i donø't have any ideas as to what i'm supposed to do now.
I have tried to find the probability that we start in state 1 given that we have in X_2 = 2 and wrote the following: $$ P(X_0 = 1, X_1 = 3, X_2 = 2) = \frac{1}{3} \cdot \frac{1}{2} \cdot \frac{2}{10} = \frac{1}{30} $$ I know that is incorrect, because it does not match the desired result that i'm trying to calculate.
We use the following formula to solve the problem: $$ P(X_0 = n | X_2 = 2) = P(X_2 = 2 | X_0 = n) \frac {P(X_0 = n )}{P(X_2 = 2)} $$
I start by calculating $P(X_2 = 2)$ that will be used in the formula: \begin{align*} P(X_2 = 2) &= P(X_2 = 2 | X_0 = 1) + P(X_2 = 2 | X_0 = 2) + P(X_2 = 2 | X_0 = 3) \\ &= P(X_2 = 2 | X_0 = 1) + P(X_2 = 2 | X_0 = 3) + P(X_2 = 2 | X_0 = 2) \\ &= \bigg(\frac{1}{3}\frac{1}{2}\frac{2}{10} \bigg) + \bigg(\frac{1}{3}\frac{8}{10}\frac{1}{2} \bigg) + \Bigg( \bigg(\frac{1}{3}\frac{1}{10}\frac{1}{2} \bigg) + \bigg(\frac{1}{3}\frac{9}{10}\frac{2}{10} \bigg) \Bigg) \\ &= \frac{73}{300} \end{align*}
Now I can calculate $P(X_0 = n | X_2 = 2)$ and start by calculating it for $X_0 = 1$: \begin{align*} P(X_0 = 1 | X_2 = 2) &= P(X_2 = 2 | X_0 = 1) \frac {P(X_0 = 1)}{P(X_2 = 2)} \\ &= (\frac{1}{2}\frac{2}{10}) \frac {P(X_0 = 1)}{P(X_2 = 2)}\\ &= \frac{1}{10} \frac {\bigg( \frac{1}{3} \bigg)}{\bigg( \frac{73}{300} \bigg)} \\ &\approx 0.137 \end{align*}
Now I calculate it for $X_0 = 2$ \begin{align*} P(X_0 = 2 | X_2 = 2) &= P(X_2 = 2 | X_0 = 2) \frac {P(X_0 = 2)}{P(X_2 = 2)} \\ &= (\frac{9}{10}\frac{2}{10} + \frac{1}{10}\frac{1}{2}) \frac {P(X_0 = 2)}{P(X_2 = 2)}\\ &= \frac{23}{100} \frac {\bigg( \frac{1}{3} \bigg)}{\bigg( \frac{73}{300} \bigg)} \\ &\approx 0.315 \end{align*}
Last but not least I calculate it for $X_0 = 3$ \begin{align*} P(X_0 = 3 | X_2 = 2) &= P(X_2 = 2 | X_0 = 3) \frac {P(X_0 = 3)}{P(X_2 = 2)} \\ &= (\frac{8}{10}\frac{1}{2}) \frac {P(X_0 = 3)}{P(X_2 = 2)}\\ &= \frac{2}{5} \frac {\bigg( \frac{1}{3} \bigg)}{\bigg( \frac{73}{300} \bigg)} \\ &\approx 0.548 \end{align*}
Thus, I have that the probability that $X_0$ assumes the values $1$, $2$ and $3$ given that $X_2 = 2$ is: $(0.137, \; 0.315, \; 0.548)$