AxoPrep

Mathematics: Applications and Interpretation

AHL 4.19 Transition matrices and Markov chains

Modelling movement between states with transition matrices, predicting future distributions and finding long-term steady states. Study guide, 1 practice questions with markschemes and 0 flashcards. Free.

Building a transition matrix and state diagram · Initial state vector and powers of the matrix · Regular Markov chains · Steady state and long-term probabilities · Finding the steady state with eigenvectors or equations

Practise all 1 questions

Study guide

States and transitions

A Markov chain describes a system that moves between a fixed set of states (gym A or gym B, sunny or rainy, brand X, Y or Z) in steps. The key assumption is that the probability of moving to the next state depends only on the current state, not on the history.

The transition matrix

Collect the probabilities in a square matrix \(T\). In the convention used in this course, each column represents where you come from and each row where you go to, so every column adds to 1.

A state diagram shows the same information: circles for states and arrows labelled with probabilities.

Predicting the future

Write the current distribution as a column vector \(s_0\) (proportions or numbers in each state). Then

\[s_1 = T s_0, \qquad s_n = T^{n} s_0\]

The entry in row \(i\), column \(j\) of \(T^n\) is the probability of being in state \(i\) after \(n\) steps, having started in state \(j\).

Worked example

Each month, 80% of gym A members stay and 20% switch to B; 70% of B members stay and 30% switch to A.

\[T = \begin{pmatrix} 0.8 & 0.3 \\ 0.2 & 0.7 \end{pmatrix}\]

(columns: from A, from B). If members start evenly split, \(s_0 = \begin{pmatrix} 0.5 \\ 0.5 \end{pmatrix}\) and

\[s_1 = \begin{pmatrix} 0.8(0.5) + 0.3(0.5) \\ 0.2(0.5) + 0.7(0.5) \end{pmatrix} = \begin{pmatrix} 0.55 \\ 0.45 \end{pmatrix}\]

Steady state. Look for \(s\) with \(Ts = s\) and entries adding to 1. With \(s = \begin{pmatrix} a \\ b \end{pmatrix}\): \(0.8a + 0.3b = a\), so \(0.3b = 0.2a\), and \(a + b = 1\). Hence \(a = 0.6\), \(b = 0.4\). In the long run 60% of members use gym A. Check: \(T\begin{pmatrix}0.6\\0.4\end{pmatrix} = \begin{pmatrix}0.48 + 0.12 \\ 0.12 + 0.28\end{pmatrix} = \begin{pmatrix}0.6\\0.4\end{pmatrix}\).

Three ways to find the steady state

  1. Equations: solve \(Ts = s\) together with "entries sum to 1".
  2. Eigenvector: the steady state is the eigenvector for eigenvalue 1, scaled so its entries add to 1. Here \(\begin{pmatrix} 3 \\ 2 \end{pmatrix}\) scales to \(\begin{pmatrix} 0.6 \\ 0.4 \end{pmatrix}\).
  3. High power: compute \(T^{50}\) on the GDC; every column becomes the steady-state vector.

Regular chains

A chain is regular if some power of \(T\) has all entries strictly positive. Regular chains have a single steady state that is reached whatever the starting vector, so the long-term answer does not depend on how the system starts.

Common mistakes

Exam tips

Cheat sheet

Key definitions

Markov chain

A process moving between states where the next-step probabilities depend only on the current state.

State

One of the possible conditions the system can be in at each step.

Transition matrix

A square matrix of step probabilities; with column vectors, each column gives the probabilities of moving from one state and sums to 1.

State vector

A column vector giving the proportion or number in each state at a given step.

Steady state

A state vector s with Ts = s, describing the long-term distribution.

Regular Markov chain

A chain for which some power of the transition matrix has all entries positive, guaranteeing a unique steady state.

Practice questions

HLPaper 2Challenging

Question 1

A town has two gyms, A and B. Each year 80% of A's members stay with A and the rest move to B; 70% of B's members stay with B and the rest move to A. This year A has 500 members and B has 500 members. The total stays constant.

(a) [2]

Write down the transition matrix \(T\), using column vectors \(\begin{pmatrix} A \\ B \end{pmatrix}\).

Markscheme
  • 2 \(T = \begin{pmatrix} 0.8 & 0.3 \\ 0.2 & 0.7 \end{pmatrix}\) (1 mark per correct column)
(b) [2]

Find the number of members at each gym after 2 years.

Markscheme
  • 1 \(T^2 \begin{pmatrix} 500 \\ 500 \end{pmatrix}\)
  • 1 A: 575, B: 425
(c) [2]

Find the long-term number of members at each gym.

Markscheme
  • 1 Solves \(T\mathbf{s} = \mathbf{s}\) with \(a + b = 1000\), or \(0.2a = 0.3b\)
  • 1 A: 600, B: 400