Skip to main content

Subsection 4.4.1 Motivation

The first unit of the week, in which we discussed a simple model for prediction the weather, finished with the following exercise: Given

Today
sunny cloudy rainy
sunny 0.4 0.3 0.1
Tomorrow cloudy 0.4 0.3 0.6
rainy 0.2 0.4 0.3
fill in the following table, which predicts the weather the day after tomorrow given the weather today:
Today
sunny cloudy rainy
Day after sunny
tomorrow cloudy
rainy
Now here is the hard part: Do so without using your knowledge about how to perform a matrix-matrix multiplication, since you won't learn about that until later this week...

The entries in the table turn out to be the entries in the transition matrix \(Q \) that was described just above the exercise:

\begin{equation*} \begin{array}{rcl} \left( \begin{array}{r} {\chi_s^{(2)}} \\ {\chi_c^{(2)}} \\ {\chi_r^{(2)}} \end{array} \right) \amp=\amp \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \left( \begin{array}{r} {\chi_s^{(1)}} \\ {\chi_c^{(1)}} \\ {\chi_r^{(1)}} \end{array} \right) \\ \amp=\amp \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \left( \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \left( \begin{array}{r} {\chi_s^{(0)}} \\ {\chi_c^{(0)}} \\ {\chi_r^{(0)}} \end{array} \right) \right) = Q \left( \begin{array}{r} {\chi_s^{(0)}} \\ {\chi_c^{(0)}} \\ {\chi_r^{(0)}} \end{array} \right) , \end{array} \end{equation*}

Now, those of you who remembered from, for example, some other course that

\begin{equation*} \begin{array}{rcl} \lefteqn{ \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \left( \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \left( \begin{array}{r} {\chi_s^{(0)}} \\ {\chi_c^{(0)}} \\ {\chi_r^{(0)}} \end{array} \right) \right) } \hspace{1in}\\ \amp=\amp \left( \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \right) \left( \begin{array}{r} {\chi_s^{(0)}} \\ {\chi_c^{(0)}} \\ {\chi_r^{(0)}} \end{array} \right) \end{array} \end{equation*}

would recognize that

\begin{equation*} Q = \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right) \left( \begin{array}{r r r r} 0.4 \amp 0.3 \amp 0.1 \\ 0.4 \amp 0.3 \amp 0.6 \\ 0.2 \amp 0.4 \amp 0.3 \end{array} \right). \end{equation*}

And, if you then remembered how to perform a matrix-matrix multiplication (or you did \verb+P * P+ in Python), you would have deduced that

\begin{equation*} Q = \left( \begin{array}{r r r r} 0.3 \amp 0.25 \amp 0.25 \\ 0.4 \amp 0.45 \amp 0.4 \\ 0.3 \amp 0.3 \amp 0.35 \end{array} \right). \end{equation*}

These then become the entries in the table. If you knew all the above, well, GOOD FOR YOU!

However, there are all kinds of issues that one really should discuss. How do you know such a matrix exists? Why is matrix-matrix multiplication defined this way? We answer that in the next few units.