4.19 Transition matrices and Markov chainsIB Maths: Applications and Interpretation HL: Revision notes
Section 1
Transition matrices and diagrams
A system that moves between a fixed set of states, where the next state depends only on the current one, is described by a transition matrix . In this course is the probability of moving from state to state , so each column sums to 1. A transition diagram shows the same information: one node per state and an arrow for each move, labelled with its probability (a loop for staying put). Example: rain (R) or dry (D). After a rainy day, rain again with probability ; after a dry day, rain with probability . Column 1 is 'from R', column 2 is 'from D'. This has the same layout as an adjacency matrix for the diagram, except that the entries are probabilities rather than counts of edges.
Writing the matrix with rows summing to 1. Here the columns sum to 1, so check this every time.
Always write the order of the states next to the matrix, for example 'states ordered R, D'.
Section 2
State matrices and powers of
The initial state matrix is a column giving the probability (or number) in each state at the start. After one transition , and in general The entry is the probability of moving from state to state in exactly steps. Use your GDC for powers. Example: it is dry today, so . Then and : a probability of rain in two days.
Multiplying in the wrong order. With columns as 'from' states, the state matrix goes on the right: , not .
Check each state matrix still sums to 1 (or to the total population).
Section 3
Regular Markov chains and the steady state
A Markov chain is regular if some power of has all entries positive. Then approaches the same steady state whatever is, and settles to a matrix with identical columns. There are two methods.
- Repeated multiplication: calculate for a large on your GDC until the values stop changing.
- Solve together with the entries summing to 1 (use this when an exact answer is demanded). Example with the rain matrix: gives , so and . With : and . So in the long term it rains on of days.
Using only . The equations are dependent, so you must also use that the entries sum to 1.
Section 4
Steady state as an eigenvector
The equation says that is an eigenvector of with eigenvalue 1. A transition matrix always has the eigenvalue 1. To use this, solve , then scale so its entries sum to 1. For the rain matrix, gives or . For : , so , and scaling gives . The other eigenvalue has size less than 1, which is why its contribution fades as grows and tends to the steady state.
If a question asks for 'exact' steady-state values, solve the equations; otherwise a high power on the GDC is quicker.
Section 5
Modelling and exam technique
Markov chains model discrete dynamical systems: weather, customer loyalty, population movement, machine states. Read the question for the ordering of states and whether the state matrix is a count or a probability.
- Write with columns summing to 1 and check.
- Use for a specific time.
- For the long term, use a high power or solve with sum 1.
- Give answers in context, as probabilities or numbers of people, to 3 s.f.
- If contains an unknown , use the steady-state equations to find it.
Thinking the long-term answer depends on the starting state. In a regular chain the steady state is the same for every starting state.
That's the notes covered.
Carry on to the next subtopic.
Exam questions on 4.19 Transition matrices and Markov chains
- Each day a commuter either cycles (C) or takes the bus (B). If she cycles today, the probability that she cycles tomorrow is . If she takes the bus today, the probability that she cycles tomorrow is . On Monday she cycles. Order the states C, B.Find the long-term probability that she cycles on a given day.2 marks
- A machine is either working (W) or faulty (F) at the start of each day. A working machine is faulty the next day with probability . A faulty machine is working the next day with probability . The machine is working on day 0. Order the states W, F.Use your GDC to find the probability that the machine is faulty on day 3.2 marks
- A website has subscribers, each on one plan at the start of each month: Free (F), Standard (S) or Premium (P). Each month: a Free subscriber stays Free with probability and otherwise moves to Standard; a Standard subscriber moves to Free with probability , stays with probability and otherwise moves to Premium; a Premium subscriber stays with probability and otherwise moves to Standard. Initially are Free, are Standard and are Premium. Order the states F, S, P.Write down the transition matrix , and find the number of Premium subscribers after one month.3 marks
Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).