n-th Term Transition

Because of the limited dependence property of the Markov chain, we can use the transition matrix $ P $ to represent the relationship between two adjacent state vectors:

$ X_{1} = X_{0} \times P \\ X_{2} = X_{1} \times P \\ ... \\ X_{n} = X_{n-1} \times P $

From the equations above, it is not difficult to obtain $ X_{n} $, the probability of each states after n-times transition:

$ X_{n} = X_{0} \times P^{n} $

Now we use the matrix calculation to solve the problem raised earlier: if it is known that the first day is sunny, how can we calculate the probability that the third day will be rainy?

The weather of the first day, which is also denoted as $ X_{0} $, can be written as:

$ \left(\begin{array}{ccc}0&1&0\end{array}\right) $

And we already know the transition probability matrix is:

$ \left(\begin{array}{ccc}0.4&0.2&0.4\\0.1&0.7&0.2\\0.3&0.1&0.6\end{array}\right) $

Plugging them into the equation $ X_{n} = X_{0} \times P^{n} $, we obtain the probability of each weather state on the third day:

$ \left(\begin{array}{ccc}0&1&0\end{array}\right)\left(\begin{array}{ccc}0.4&0.2&0.4\\0.1&0.7&0.2\\0.3&0.1&0.6\end{array}\right)\left(\begin{array}{ccc}0.4&0.2&0.4\\0.1&0.7&0.2\\0.3&0.1&0.6\end{array}\right) = \left(\begin{array}{ccc}0.17&0.53&0.3\end{array}\right) $

Alternatively, there is another method of solving for this. We can transpose the probability matrix so that the columns add up to one instead of the rows as we have it right now. It is purely preference as to which method you use, as both provide the same answer.

$ \left(\begin{array}{c}0\\1\\0\end{array}\right)\left(\begin{array}{ccc}0.4&0.1&0.3\\0.2&0.7&0.1\\0.4&0.2&0.6\end{array}\right)\left(\begin{array}{ccc}0.4&0.1&0.3\\0.2&0.7&0.1\\0.4&0.2&0.6\end{array}\right) = \left(\begin{array}{c}0.17\\0.53\\0.3\end{array}\right) $

Notice that the first row has become the first column, the second row has become the second column, and the third row has become the third column. Additionally, our state vector is now aligned vertically.

We observe that the result matches each other from both calculations.

Back to Markov Chains

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood