Transition matrices

Transition matrices provide a method for modelling and analysing systems that change over time. They are applied in areas such as managing inventory and logistics, studying the impact of marketing on customer behaviour, monitoring population dynamics, and modelling transportation systems. By representing the transitions between different states, they allow us to forecast future states, which may include identifying long-term trends and recognising steady states within dynamic systems.


Use this page to revise the following concepts:


Definitions of Transition Matrices

Transition matrices are square matrices, with their order determined by the number of states in the system. Each row and column correspond to a state, representing the transitions between every pair of states within the system.

In transition matrices:

  • Columns typically represent the states from which the data is transitioning,
  • Rows typically represent the states to which the data is transitioning.

Each element in the matrix represents the proportion governing the transition from one state to another. As they are proportions, they must take a value between 0 and 1.

The sum of the elements in each column of a transition matrix which is pre-multiplied totals to 1, representing the total proportion from the initial state.

Transition matrices can be described in a matrix recurrence relation:

\(S_{0} =\) initial state matrix, \(S_{n+1} = TS_{n}\)

Where:

  • \(S_{n+1} =\) column matrix to represent the next state
  • \(S_{n} =\) column matrix to represent the current state
  • \(T=\) transition matrix
  • From   

    State 1
    State 2


    \(T\) \(=\) \(\left[\begin{align}& \Box\space\space\space \Box\\& \Box\space\space\space \Box\end{align}\right]\) \(\begin{align}& \textsf{State}\space 1\\& \textsf{State}\space 2\end{align}\) \(\textsf{ To}\)


    Steady State

    As transitions occur over an extended period, state matrices may reach a steady state. This occurs when the rate of transitions between states becomes equal, resulting in stable proportions that no longer change or has the minimal change over time. This equilibrium represents the system's long-term behaviour.

    This can be defined by equation:

    \[TS_{\infty} = S_{\infty}\]

    For example, let's consider a scenario where there are 100 boxes at warehouse A and 150 boxes at warehouse B. If 30% of the boxes from warehouse A move to warehouse B, and 20% of the boxes from warehouse B move to warehouse A, this means that 30 boxes are moving from each warehouse to the other. After each transition, there is no change in the total quantity of boxes at each warehouse. This is said to be in steady state or at equilibrium.


    Application of Transition Matrices

    Let’s consider a scenario where, on average, 150 students choose Mathematics, and 100 students choose Physics in their Year 12 course each year. The initial number of students in each course can be represented as:

    \(S_{0}\) \(=\) \(\left[\begin{align}& 100\\& 150\end{align}\right]\)  \(\begin{align}& \textrm{Physics}\\& \textrm{Maths}\end{align}\)

    From past trends, it is known that:

    • Each year, 30% of students move from Physics to Mathematics.
    • 10% of students switch from Mathematics to Physics.

    From    

    Physics
    Maths


    ​  

    \(T\) \(=\) \(\left[\begin{align}& \Box\space\space\space 0.1\\& 0.3\space\space\space \Box\end{align}\right]\) \(\begin{align}& \textrm{Physics}\space \\& \textrm{Maths}\space \end{align}\) \(\textsf{To}\)

    The probabilities for students remaining in Physics or Mathematics in the following year can be determined by ensuring that each column of the transition matrix sums to 1. This accounts for all students, including those who switch subjects and those who stay.

    From    

    Physics
    Maths


    ​  

    \(T\) \(=\) \(\left[\begin{align}& 0.7\space\space\space 0.1\\& 0.3\space\space\space 0.9\end{align}\right]\) \(\begin{align}& \textrm{Physics}\space \\& \textrm{Maths}\space \end{align}\) \(\textsf{To}\)

    The recurrence relation for transition matrices can be expressed by:

    \(S_{n+1}=TS_{n}\)

    To find the number of students after one year, we can calculate:

    \(S_{1}\) \(=\) \(\left[\begin{align}& 0.7\space\space\space 0.1\\& 0.3\space\space\space 0.9\end{align}\right]\) \(\left[\begin{align}& 100\\& 150\end{align}\right]\)

    \(\phantom{S_{1}}\) \(=\) \(\left[\begin{align}& 0.7\times 100+0.1\times 150\\& 0.3\times 100+0.9\times 150\end{align}\right]\)

    \(\phantom{S_{1}}\) \(=\) \(\left[\begin{align}& \space85\\& 165\end{align}\right]\) \(\begin{align}& \textrm{Physics}\\& \textrm{Maths}\end{align}\)

    This can continue to occur as a recurrence, but as there is a repeated multiplication occurring, we can express the number of students in each subject after \(n\) years as:

    \(S_{n}=T^{n}S_{0}\)

    This simplifies the calculation and eliminates the need to compute each step of the recurrence. For example, the number of students in each course after 5 years can be determined directly . This also makes it easier to determine the steady state of the matrix.

    \(S_{5}\) \(=\) \(\left[\begin{align}& 0.7\space\space\space 0.1\\& 0.3\space\space\space 0.9\end{align}\right]^{5}\) \(\left[\begin{align}& 100\\& 150\end{align}\right]\) \(=\) \(\left[\begin{align}&\space 65.416\\& 184.584\end{align}\right]\)

    Transition Diagrams

    Transition diagrams can be a helpful tool for visualising the changes between states in a system. These diagrams represent the states as nodes and the transitions between them as directed edges labelled with the transition rates. A transition diagram between two states might look like this:

    Transition diagram showing two nodes – one labelled Math, and one labelled Physics. There is a directed edge from Math to Physics that has a weight of 0.1, a directed edge from Physics to Math with a weight of 0.3, a loop from Math to itself with a weight of 0.9 and a loop from Physics to itself of 0.7

    A key feature of transition diagrams is that the total proportion of transitions from (arrow coming out of) any given node must equal 1.

    Leslie Matrices

    Leslie matrices are a specialised type of transition matrix used in population modelling to track age-specific reproduction and survival dynamics in populations. They describe how individuals transition between age classes over time, incorporating fertility rates in the first row and survival rates along the sub-diagonal (the diagonal immediately below the main diagonal).

    They can be described in a matrix recurrence relation like above, except instead of the use of \(T\) as a transition matrix, we can model it using \(L\) as a Leslie matrix.>

    \[L = \begin{bmatrix} F_1 & F_2 & F_3 \\ S_1 & 0 & 0 \\ 0 & S_2 & 0 \end{bmatrix}\]

    Where:

  • \(F_{n}=\) fertility rate for different age classes
  • \(S_{n}=\) survival rate from one age class to the next
  • For example, a population of rabbits on an island is divided into three age classes:

    • Juniors (0-6 months)
    • Intermediates (6-9 months)
    • Seniors (>9 months)

    The initial rabbit population at \(t=0\) years, is given by:

    \(S_{0}=\left[\begin{align}& 50\\& 30\\& 20\end{align}\right]\)

    The reproduction and survival rates of the age classes are as follows:

    • Each Intermediate rabbit produces 1.5 Junior rabbits.
    • Each Senior rabbit produces 2 Junior rabbits.
    • Junior rabbits have a 60% chance of surviving to Intermediate age.
    • Intermediate rabbits have a 50% chance of surviving to Senior age.
    • Seniors do not survive further.

    This can be constructed into a Leslie matrix:

    \(L=\left[\begin{align}& \space 0\space\space\space 1.5\space\space\space 2\\& 0.6\space\space\space 0\space\space\space\space 0\\& \space 0\space\space\space 0.5\space\space\space 0\end{align}\right]\)

    After 1 year, \(t=1\):

    \(S_{1}\) \(=\) \(LS_{0}\)

    \(\phantom{S_{1}}\) \(=\) \(\left[\begin{align}& \space 0\space\space\space 1.5\space\space\space 2\\& 0.6\space\space\space 0\space\space\space\space 0\\& \space 0\space\space\space 0.5\space\space\space 0\end{align}\right]\) \(\left[\begin{align}& 50\\& 30\\& 20\end{align}\right]\)

    \(\phantom{S_{1}}\) \(=\) \(\left[\begin{align}& 0\times 50+1.5\times 30+2\times 20\\& 0.6\times 50+0\times 30+0\times 20\\& 0\times 50+0.5\times 30+0\times 20\end{align}\right]\)

    \(\phantom{S_{1}}\) \(=\) \(\left[\begin{align}& 75\\& 30\\& 15\end{align}\right]\)

    After 1 year, there are 75 juniors, 30 intermediates and 20 seniors.