Transition diagrams and transition matrices
Model how people, animals or cars move between states with transition matrices in Year 12 VCE General Mathematics. Each week some Melbourne commuters swap the train for the car, and some drivers switch back. A transition diagram shows these moves as arrows with proportions, and a transition matrix stores the same numbers in a grid that technology can work with.
You will turn diagrams, written descriptions and tables of survey counts into transition matrices with this period as the columns and next period as the rows, check that every column adds to 1, and find missing elements. You will also read what each element means and count how many members move, ready to predict future states with matrix recurrence next.
Theory
A transition diagram and its transition matrix show how a group moves between states from one period to the next. This Year 12 General Mathematics guide for students in Victoria shows how to write the matrix with columns as from and rows as to, read its elements, find missing values and build a matrix from survey counts.
A transition diagram shows how the members of a group move between a set of states from one time period to the next. Each state is a circle. An arrow from one state to another carries the proportion (or percentage) that makes that move, and a loop shows the proportion that stays where it is.
The same information goes into a square transition matrix \(T\). Here the columns are the states this period (where members come from) and the rows are the states next period (where they go to). The element \(t_{ij}\), in row \(i\) and column \(j\), is the proportion of state \(j\) that moves to state \(i\).
Everyone in a state this period ends up in exactly one state next period, so the elements in every column add to \(1\) (or \(100\%\)), and no element is negative. The arrows leaving a state, including its loop, fill that state's column. A state with a loop of \(1\) and no arrows out keeps everyone who reaches it: its column is all \(0\) except a \(1\) on the leading diagonal (for example, animals that have left a reserve for good).
The element in row \(i\), column \(j\) of a transition matrix:
Every column adds to \(1\), so a missing element is \(1\) minus the rest of its column:
The expected number making one move:
From a table of counts (this period across the top), divide each count by its column total:
How to write a transition matrix
- Fix the order of the states and use it for both the columns (this period) and the rows (next period). Label the matrix with the state letters.
- Fill one column at a time. For each state, take the arrows leaving it (including its loop) and put each proportion in the row of the state it goes to. Change percentages to decimals.
- Fill any gaps using the column total: a missing element is \(1\) minus the other elements of its column. A state with no arrow to another state has a \(0\) there.
- Check that every column adds to \(1\) and that no element is negative.
How to read a transition matrix
- Find the column of the state the members are in now.
- Go down to the row of the state they move to. That element is the proportion.
- Multiply by the number in the starting state to find how many make that move.
Each state this weekend gives one column. “The rest” is \(1\) minus the given proportion.
| \(B \to B\) | \(=\) | \(0.6\) |
| \(B \to P\) | \(=\) | \(1 - 0.6\) |
| \(\) | \(=\) | \(0.4\) |
| \(P \to B\) | \(=\) | \(0.25\) |
| \(P \to P\) | \(=\) | \(1 - 0.25\) |
| \(\) | \(=\) | \(0.75\) |
| \(\text{park to beach}\) | \(=\) | \(0.25 \times 300\) |
| \(\) | \(=\) | \(75\) |
(i) \(T = \begin{bmatrix}0.6 & 0.25\\ 0.4 & 0.75\end{bmatrix}\). Check: \(0.6 + 0.4 = 1\) and \(0.25 + 0.75 = 1\). (ii) Park to beach is row \(B\), column \(P\): \(75\) families.
The arrows leaving each depot fill its column; the loop goes on the leading diagonal.
| \(\text{column } C\) | \(:\) | \(0.7,\ 0.1,\ 0.2\) |
| \(\text{column } D\) | \(:\) | \(0.15,\ 0.75,\ 0.1\) |
| \(\text{column } S\) | \(:\) | \(0.2,\ 0.1,\ 0.7\) |
| \(\text{check column } C\) | \(=\) | \(0.7 + 0.1 + 0.2\) |
| \(\) | \(=\) | \(1\) |
| \(t_{31}\) | \(=\) | \(0.2\) |
| \(\text{leave } D\) | \(=\) | \(1 - 0.75\) |
| \(\) | \(=\) | \(0.25\) |
(ii) \(t_{31} = 0.2\): row \(3\) is St Kilda tomorrow and column \(1\) is Carlton today, so \(20\%\) of the cars at Carlton today are at St Kilda tomorrow. (iii) \(0.25\) (check: \(0.15 + 0.1 = 0.25\)).
Every column adds to \(1\). Use the column that contains each unknown.
| \(\text{column } P\text{: } a + 0.7 + 0.2\) | \(=\) | \(1\) |
| \(a\) | \(=\) | \(1 - 0.9\) |
| \(\) | \(=\) | \(0.1\) |
| \(\text{column } X\text{: } 0.55 + b + 0.15\) | \(=\) | \(1\) |
| \(b\) | \(=\) | \(1 - 0.7\) |
| \(\) | \(=\) | \(0.3\) |
| \(\text{column } C\text{: } 0.1 + 0.3 + c\) | \(=\) | \(1\) |
| \(c\) | \(=\) | \(1 - 0.4\) |
| \(\) | \(=\) | \(0.6\) |
| \(\text{circuit to pilates}\) | \(=\) | \(0.3 \times 200\) |
| \(\) | \(=\) | \(60\) |
(i) \(a = 0.1\), \(b = 0.3\), \(c = 0.6\). (ii) Circuit to pilates is row \(P\), column \(C\): \(60\) members.
| Online this month | In store this month | |
|---|---|---|
| Online next month | 105 | 40 |
| In store next month | 45 | 210 |
| Total | 150 | 250 |
Divide each count by its column total, the number in that state this month.
| \(O \to O\) | \(=\) | \(\dfrac{105}{150}\) |
| \(\) | \(=\) | \(0.7\) |
| \(O \to S\) | \(=\) | \(\dfrac{45}{150}\) |
| \(\) | \(=\) | \(0.3\) |
| \(S \to O\) | \(=\) | \(\dfrac{40}{250}\) |
| \(\) | \(=\) | \(0.16\) |
| \(S \to S\) | \(=\) | \(\dfrac{210}{250}\) |
| \(\) | \(=\) | \(0.84\) |
| \(\text{online next month}\) | \(=\) | \(105 + 40\) |
| \(\) | \(=\) | \(145\) |
(i) \(T = \begin{bmatrix}0.7 & 0.16\\ 0.3 & 0.84\end{bmatrix}\). (ii) \(0.16 = 16\%\) of in-store shoppers switch to online. (iii) Add the online row of counts: \(145\) households.
Common pitfalls
Frequently asked questions
What is a transition matrix?
It is a square matrix that records the proportions of a group moving between states from one period to the next. Here the columns are the states this period, the rows are the states next period, and each column adds to 1.
Why does each column of a transition matrix add to 1?
A column lists where everyone in one state this period goes next period. Every member ends up in exactly one state, so the proportions in that column account for all of them and add to 1, or 100 percent.
How do you turn a transition diagram into a transition matrix?
Take one state at a time. The arrows leaving it, including its loop, give the elements of its column: each proportion goes in the row of the state the arrow points to. Then check that every column adds to 1.
What does the element in row 2, column 1 mean?
It is the proportion of the members in state 1 this period who are in state 2 next period. The column is where they start and the row is where they finish.
How do you find a missing value in a transition matrix?
Use the column that contains it. Add the known elements of that column and subtract the total from 1.