# Law of total probability

\begin{align} p_{ij}(k, k+n) =& \Pr\left\{X_{k+n}=j\mid X_k=i\right\}\\ =& \sum_{r=1}^R \Pr\left\{X_{k+n}=j\mid X_u=r\color{red}, X_k=i\right\}\Pr\left\{X_u=r\mid X_k=i\right\} \end{align}

Markov Chains; Using the law of total probability, one can obtain the following equation. I am not entirely sure how it can be obtained. Does the comma between $X_u$ and $X_k$ means intersection between them? $X_u$ is supposed to be a partition of the sample space I think. Any help is appreciated.

• $X_u$ is presumably supposed to be a random variable. – Nate Eldredge Sep 24 '13 at 23:06

\begin{align} \Pr\left[X_{k+n}=j\mid X_k=i\right] =& \frac{\Pr[X_{k+n}=j, X_k=i]}{\Pr[X_k=i]}\\ =& \frac{\sum_r\Pr[X_{k+n}=j, X_k=i, X_u=r]}{\Pr[X_k=i]}\\ =& \sum_r\frac{\Pr[X_{k+n}=j\mid X_k=i, X_u=r]\Pr[X_k=i, X_u=r]}{\Pr[X_k=i]}\\ =& \sum_r\Pr[X_{k+n}=j\mid X_k=i, X_u=r]\Pr[X_u=r\mid X_k=i] \end{align}
where the summation is over all possible value of $X_u$.