## Representing Probabilities in Matrices

A fickle man has two brands of bogroll (toilet roll if you are prudish) to choose from. He shops once a month. The choice he makes is affected by the choice he made the previous month. Let
$p_{ij}$
be the probability that he chooses brand j and given that he chose brand i the previous month. Suppose
$p_{11}=3/4, \: p_{12}=1/4, \: p_{21}=1/2, \: p_{22}=1/2$
.
We can represent this by the matrix
$M=\left( \begin{array}{cc} 3/4 & 1/2 \\ 1/4 & 1/2 \end{array} \right)$
.
Suppose that in January, the man chose brand 1. We can represent this by the vector
$\mathbf{P}=\begin{pmatrix}1\\0\end{pmatrix}$
.
$M \mathbf{P}=\left( \begin{array}{cc} 3/4 & 1/2 \\ 1/4 & 1/2 \end{array} \right) \mathbf{P}=\begin{pmatrix}1\\0\end{pmatrix}=\mathbf{P}=\begin{pmatrix}3/4\\1/2\end{pmatrix}$
.
In February the man will choose brand 1 with probability 3/4 and brand 2 with probability 1/4.
$M(M \mathbf{P})=M^2 \mathbf{P}=\left( \begin{array}{cc} 11/16 & 5/8 \\ 5/16 & 3/8 \end{array} \right) \mathbf{P}=\begin{pmatrix}1\\0\end{pmatrix}=\mathbf{P}=\begin{pmatrix}1/16\\ 5/16 \end{pmatrix}$
.
In February the man will choose brand 1 with probability 3/4 and brand 2 with probability 1/4.
The proportion with which the man buys brands 1 and 2 settles down, then in the long term
$M \mathbf{P}=\mathbf{P} \rightarrow (M-I) \mathbf{P}=\mathbf{0}$
.
Hence
$(M-I) \mathbf{P}=(\left( \begin{array}{cc} 3/4 & 1/2 \\ 1/4 & 1/2 \end{array} \right)-\left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right) ) \begin{pmatrix}p_1\\p_2\end{pmatrix} =\left( \begin{array}{cc} -1/4 & 1/2 \\ 1/4 & -1/2 \end{array} \right) \begin{pmatrix}-1/4p_1+1/2p_2\\1/4p_1-1/2p_2\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}$
.
Then
$-1/4p_1+1/2p_2=1/4p_1-1/2p_2=0 \rightarrow p_1=2k, \: p_2=k$
but since
$p_1+p_2=1$
we must take
$p_1=2/3, \: p_2=1/3$
.
Models like this are called Markov chains. 