Skip to main content

Section 4.9/5.9 Markov Chains

Handout 4.9/5.9 Markov Chains

Example 4.1.

A small town has two libraries, \(A\) and \(B\text{.}\)
Two-state Markov chain diagram with transitions between libraries with probabilities 0.8, 0.2, 0.3, and 0.7 representing book returns.
If both libraries start with 1000 books today, how many books does each library have after 1 month?

Example 4.2.

Let \(A\) and \(B\) be the same libraries from ExampleΒ 4.1.
(a)
Let \(\vec x_i \in \mathbb{R}^2\) be the vector which gives how many books are in libraries \(A\) and \(B\) after \(i\) months. What are \(\vec x_0\) and \(\vec x_1\text{?}\)
(b)
Find the \(2 \times 2\) matrix \(P \) so that \(\vec x_1 = P\vec x_0\)
(c)
How many books does each library contain after \(2\) months; that is, what is \(\vec x_2\text{?}\)
(d)
How many books does each library contain after \(n\) months?
(e)
What if each library had started with \(100\) books instead of \(1000\) books. Would \(P\) change? What would be the new \(\vec x_0, \vec x_1, \vec x_2\text{?}\)

Definition 4.3.

A few important definitions:
  • A probability vector is a vector \(\vec x\) whose entries are nonnegative and sum to 1.
  • A stochastic matrix is a square matrix whose columns are probability vectors.
  • A Markov chain is a sequence of probability vectors \(\vec x_k\) satisfying \(\vec x_{k+1}=P\vec x_k\) for a stochastic matrix \(P\text{.}\)
  • A steady-state vector for \(P\) is a probability vector \(\vec q\) such that \(P\vec q=\vec q\text{.}\)

Example 4.4.

Determine a steady-state vector for the stochastic matrix:
\begin{equation*} P = \begin{bmatrix} 0.8 \amp 0.3\\ 0.2 \amp 0.7 \end{bmatrix} \end{equation*}

Definition 4.5. Regular Stochastic Matrix.

A stochastic matrix \(P\) is regular if some power \(P^k\) has all entries strictly positive.
In \(\mathbb{R}^2\text{,}\) the probability vectors form the line segment between \((1,0)\) and \((0,1)\text{.}\) A stochastic matrix maps probability vectors to probability vectors, and the iterates \(P^k\vec x_0\) converge to the steady state.
Diagram showing convergence of 2D stochastic vectors to a steady state.
Illustration of several probability vectors in \(\mathbb{R}^2\text{,}\) under repeated multiplication by a regular stochastic matrix, converging to a steady-state vector.
Β 

Example 4.7.

A rental company has three locations A, B, and C. Cars may be returned to any location. The table gives the weekly rental/return pattern:
Three-state Markov chain diagram with transitions between rental companies. The probabilities are as follows: A to A is 0.8, A to B is 0.2, A to C is 0, B to A is 0.1, B to B is 0.6, B to C is 0.3, C to A is 0.2, C to B is 0.3, C to C is 0.5.
There are 18 cars at each location today.
(a)
Construct the stochastic matrix \(P\text{.}\) Is \(P \) regular?
(b)
Determine what happens to the distribution of cars after a long time.