Transition matrices (higher powers), Markov chains, steady state and long term probabilities: notes and practice questions
- State: A mutually exclusive event that can change over time.
- Markov Chain: A mathematical model describing a sequence of states over discrete time steps.
- The probability of the next state depends only on the current state.
- Transition probabilities do not change over time.
- Regular Markov Chain (HL): A Markov chain where any state is reachable from any other in a fixed number of steps (). All IB AI HL Markov chains are regular.
- **Transition Matrix ():** A matrix representing transition probabilities.
- Columns represent current states; rows represent next states.
- Probabilities within any single column must sum to 1.
- Transition State Diagram: A visual representation where vertices are states and edges show transition probabilities; probabilities on arrows coming out of a state must sum to 1.
- Future State Probability (HL): The state probability vector after transitions is given by:
where is the initial state probability vector.
- **Steady State Vector () (HL):** A probability vector that does not change when multiplied by the transition matrix.
- Mathematically: .
- Regular Markov chains always have a unique steady state.
- It is the eigenvector of corresponding to the eigenvalue 1, scaled such that its elements sum to 1.
- Long-Term Probabilities (HL): As the number of transitions () becomes very large, tends towards a limit matrix () where all columns are identical and equal to the steady state vector .
- Calculating Matrix Powers (Diagonalisation, HL): A transition matrix raised to the power of can be calculated as:
where is a diagonal matrix of the eigenvalues of , and is a matrix whose columns are the corresponding eigenvectors of . Every transition matrix has exactly one eigenvalue equal to 1, and the absolute values of all other eigenvalues are less than 1.
- Finding Expected Populations (HL):
1. Determine the initial state probability vector .
2. Calculate the state probability vector for the desired time interval using .
3. Multiply the resulting state probability vector by the total population .
- Finding the Exact Steady State Vector (Algebraic, HL):
1. Set the steady state vector with entries .
2. Set up the matrix equation .
3. Form and solve the system of linear equations to find a proportional relationship between .
4. Scale the elements so that they sum to 1.
- GDC for Steady States (HL): Calculate for a very large value of (e.g., or ); the identical columns (when rounded) represent the steady state vector.
- Transition Matrices, Markov Chains, and Steady States are HL only topics.
- Exam Tip: Column Check (HL): Always double-check that all probabilities within each individual column of a transition matrix sum to 1.
- Exam Tip: Visualisation (HL): Drawing a transition state diagram can help in constructing the transition matrix.
- Exam Tip: Diagonalisation Care (HL): Remember that requires careful matrix multiplication, not element-wise multiplication.
How it is examined
The subtopic that ties topic 1, topic 3 and topic 4 together, which is why it turns up in Paper 3. Two routes to the steady state exist and the question tells you which one it wants: raise to a high power on the GDC for an approximate answer, or solve the linear system for an exact one. The scaling condition (the entries sum to 1) is a marking point students drop when they go the eigenvector route. The column convention has to be respected, since transposing silently produces a wrong answer that still looks like a probability.
.
- Transition matrices.
- Powers of transition matrices.
- Regular Markov chains.
- Initial state probability matrices.
Linking questions
- Other contexts: absorbing states for Markov chains, the gambler's ruin problem.
- Website: simulation for Markov chains, setosa.io/blog/2014/07/26/markov-chains/
- Enrichment only, so not examinable: Leslie matrices, which are used extensively in biology.
Practice questions
13 questions · 8 medium · 5 hardQuestion 1
MediumPaper 1 · calculator7 marksA market research company studies the customer loyalty between two competing streaming services, StreamSphere (S) and CineFlow (C), over a number of months.
Each month, customers either maintain their current subscription or switch to the other service.
In any given month, it is observed that the probability of a StreamSphere customer remaining with StreamSphere the following month is 0.85, and the probability of a CineFlow customer switching to StreamSphere the following month is 0.20.
This situation can be represented by the transition matrix
Interpret the value 0.15 in in terms of the changes in customer loyalty between the streaming services.
Find the eigenvalues of matrix .
One of the eigenvectors of is .
Find another, non-parallel, eigenvector and interpret it in context.
Consider what the rows and columns represent in the transition matrix. The first column represents transitions from StreamSphere, and the second column represents transitions from CineFlow.
To find the eigenvalues, you need to solve the characteristic equation , where is the identity matrix and represents the eigenvalues.
The eigenvector corresponding to the eigenvalue is often referred to as the steady-state vector, representing the long-term distribution of states.
Question 2
HardPaper 1 · calculator9 marksA new streaming service, CineStream (C), enters the market, competing with the established service, FilmFlick (F).
Market research shows that each month:
- 10% of CineStream subscribers switch to FilmFlick.
- 30% of FilmFlick subscribers switch to CineStream.
The transition matrix describing these changes, where the rows and columns are ordered (CineStream, FilmFlick), is given as .
The two eigenvalues for this matrix are and . An eigenvector corresponding to the eigenvalue of is .
Find an eigenvector corresponding to the eigenvalue of .
A diagonal matrix of eigenvalues is .
Write down an expression for , giving your answer as a matrix in terms of .
When CineStream and FilmFlick first launched, there were a total of users, all of whom initially subscribed to CineStream.
Assuming the total number of users remains constant, find an expression for the number of users who will favour FilmFlick after months.
To find an eigenvector for an eigenvalue , solve the equation , where is the identity matrix.
For a diagonal matrix, raising it to a power involves raising each diagonal element to that power.
The number of users after months can be found using the formula , where is the initial state vector, is the diagonal matrix of eigenvalues, and is the matrix whose columns are the corresponding eigenvectors. Ensure the order of eigenvectors in matches the order of eigenvalues in .
Question 3
MediumPaper 1 · calculator6 marks(a) A study models student engagement with two online learning platforms, LearnFlow (L) and EduQuest (E), using a Markov chain. The transition matrix describes the probability of a student moving between platforms each week:
where is the probability a student using LearnFlow stays on LearnFlow, and is the probability a student using EduQuest stays on EduQuest.
One of the eigenvalues for this matrix is equal to 1.
Find the eigenvector corresponding to the eigenvalue of 1.
(b) Hence, find an expression, in terms of and , for the long-term proportion of students using LearnFlow.
(c) Hence or otherwise, find the long-term proportion of students using LearnFlow when and .
For an eigenvalue , the eigenvector satisfies the equation , or , where is the identity matrix. Set up the system of linear equations and solve for the components of the eigenvector.
The long-term proportion (steady-state probability) is given by the normalized eigenvector corresponding to the eigenvalue of 1. Remember that the sum of the probabilities must be 1.
Substitute the given values of and into the expression derived in part (b).
Question 4
HardPaper 2 · calculator16 marks(a) A student's study habits are modelled by a Markov chain. If the student studies Mathematics (M) on a given day, the probability they study Mathematics the following day is . If the student studies Physics (P) on a given day, the probability they study Physics the following day is .
Write down a transition matrix, , that shows the movement of the student's study focus between Mathematics and Physics.
(b) On Monday, a student spent their study time on Mathematics. Find the probability that the student will be studying Physics on Friday.
(c) Write down the characteristic polynomial for the matrix . Give your answer in the form .
(d) Calculate the eigenvectors for the matrix .
(e) Write down matrices and such that , where is a diagonal matrix.
(f) Hence, find the long-term probability that the student is studying Physics.
The transition matrix should have rows and columns representing the states (Mathematics and Physics). The entry represents the probability of transitioning from state to state . Ensure the columns sum to 1.
Determine the number of transitions from Monday to Friday. Represent the initial state as a column vector and multiply it by the transition matrix raised to the power of the number of transitions.
The characteristic polynomial is found by calculating the determinant of , where is the identity matrix.
First, solve the characteristic polynomial to find the eigenvalues. Then, for each eigenvalue, solve the equation to find the corresponding eigenvector .
The diagonal matrix contains the eigenvalues of on its diagonal. The matrix is formed by using the corresponding eigenvectors as its columns.
The long-term probability distribution of a Markov chain is given by the normalized eigenvector corresponding to the eigenvalue .
Question 5
MediumPaper 2 · calculator13 marksA financial analyst models the daily price movement of a tech company's stock using a transition matrix. If the stock price increases on a particular day, the probability that it will increase the following day is . If the stock price decreases on a particular day, the probability that it will increase the following day is .
The transition matrix for this model is given by , where the rows/columns represent 'Increase' and 'Decrease' respectively.
(a) Given that the stock price increased today, calculate the probability that the stock price will increase in two days' time.
(b) Find the eigenvalues and corresponding eigenvectors of .
(c) The matrix can be written in the form , where is a diagonal matrix.
(i) Write down a possible matrix .
(ii) Write down the corresponding matrix .
(d) Hence, determine the long-term percentage of days that the stock price will increase.
To find the probability of a state after a certain number of days, you need to multiply the transition matrix by itself that many times and then multiply the result by the initial state vector.
To find eigenvalues, solve the characteristic equation . Once you have the eigenvalues, substitute each back into to find the corresponding eigenvectors.
The matrix is formed by using the eigenvectors as its columns.
The matrix is a diagonal matrix containing the eigenvalues on its diagonal, in the same order as their corresponding eigenvectors appear in .
For a transition matrix, the long-term probabilities are given by the eigenvector corresponding to the eigenvalue of 1, normalized so that its components sum to 1. Alternatively, consider what happens to as approaches infinity when calculating .
Question 6
HardPaper 2 · calculator27 marks(a) A single data packet can be transferred between three servers, S1, S2, and S3, in a network. The possible direct transfers are:
- From S1, the packet can be sent to S2 or stay in S1.
- From S2, the packet can be sent to S1 or S3.
- From S3, the packet can be sent to S2 or stay in S3.
Write down the adjacency matrix for the directed graph representing these possible direct data transfers, ordering the servers S1, S2, S3.
(b) Find the total number of distinct data paths of length 5 from server S1 to server S2.
(c.i) Every possible sequence of 5 data transfers has the same probability of occurring. State this probability.
(c.ii) Use your answer to part (b) to find the probability that if a data packet was initially on server S1, it will be on server S2 after 5 transfers.
(d.i) A network administrator monitors the movement of two data packets. The possible combined states of the two packets (assuming they occupy distinct servers) are (packets on S1 and S2), (packets on S1 and S3), and (packets on S2 and S3).
The transitions between these states are modelled by the following transition matrix , where rows represent the current state and columns represent the next state, in the order :
State the probability that if the packets are currently in state , they will be in state after one transfer.
(d.ii) Using the transition matrix from part (d.i), state the probability that if the packets are currently in state , they will be in state after one transfer.
(d.iii) Using the transition matrix from part (d.i), state the probability that if the packets are currently in state , they will be in state after one transfer.
(e) Given that the two data packets are initially in state (on servers S1 and S2), find the probability that they will be in state (on servers S2 and S3) after 5 transfers.
(f) The data packets continue this pattern of transfers for a long period. Find the server that is occupied least and the proportion of the time it is free.
An adjacency matrix for a directed graph has if there is an edge from node to node , and otherwise. Remember to consider self-loops.
The number of walks of length between two nodes can be found by raising the adjacency matrix to the power of . The entry in the resulting matrix gives the number of walks from node to node .
Consider the number of choices for each individual transfer and how probabilities combine for a sequence of independent events.
The probability is the number of successful paths divided by the total number of possible paths of that length.
Identify the correct entry in the transition matrix based on the given order of states.
Identify the correct entry in the transition matrix based on the given order of states.
Identify the correct entry in the transition matrix based on the given order of states.
To find the probabilities after multiple steps, you need to raise the transition matrix to the power corresponding to the number of transfers. Then, select the entry that corresponds to the initial and final states.
For a long period, the system reaches a steady state. Calculate the steady-state probability vector for the combined states. Then, use these probabilities to determine the proportion of time each individual server is occupied.
Question 7
MediumPaper 2 · calculator12 marksA market research firm models customer loyalty between two competing coffee shops, "The Daily Grind" (D) and "Bean There, Done That" (B), using a Markov chain. Each day, a customer may switch between the two shops.
The model is of the form
where is the probability a customer chooses "The Daily Grind" on day , and is the probability a customer chooses "Bean There, Done That" on day , where .
The transition matrix is found to be .
Write down the value of .
State what represents in this context.
Find the eigenvalues of .
Find the eigenvectors of .
A new customer initially chooses 'The Daily Grind'. Calculate the probability that this customer chooses 'The Daily Grind' after 3 days.
Calculate the probability that this customer chooses 'The Daily Grind' in the long term.
In a transition matrix for a Markov chain, the sum of probabilities in each column must be 1. Consider the second column of matrix .
Recall the meaning of each entry in a transition matrix. The entry in row , column represents the probability of transitioning from state to state .
To find the eigenvalues of a matrix , you need to solve the characteristic equation , where is the identity matrix and represents the eigenvalues.
For each eigenvalue , solve the equation to find the corresponding eigenvector . Remember that eigenvectors are typically expressed as a simple ratio.
The initial state vector represents the probabilities of being in each state at day 0. To find the state after days, multiply the transition matrix by itself times, and then multiply the result by the initial state vector.
The long-term probabilities (steady state) are given by the normalized eigenvector corresponding to the eigenvalue . Normalize the eigenvector so its components sum to 1.
Question 8
HardPaper 2 · calculator21 marksOn any given day, the probability that a customer buys a particular product depends only on which product they bought the previous day.
If a customer bought Product A on the previous day, the probability they buy Product A again today is .
If a customer bought Product B on the previous day, the probability they buy Product A today is .
On day this can be represented using the vector where
A Markov chain model is formed where
Matrix is of the form
Write down the value of
(i) .
Write down the value of
(ii) .
On day zero, a customer buys Product A. Find the probability
(i) that the customer buys Product A for all days from to .
On day zero, a customer buys Product A. Find the probability
(ii) that the customer buys Product A on day 4, when .
Demonstrate that, for all values of , one eigenvector of is and hence state the associated eigenvalue.
Find, in terms of , the steady state probability that a customer buys Product A on a given day.
In the long term, the company wants Product A to have at least 70% market share.
Find the minimum value of required for this to occur.
The matrix element represents the probability of transitioning from state A to state A.
The sum of probabilities for a customer who bought Product A on the previous day must be 1.
If a customer buys Product A on day zero, and continues to buy Product A, what is the probability of buying Product A on day 1? Then day 2? And so on.
Set up the initial state vector and the transition matrix. Then calculate .
To show that is an eigenvector of , you need to show that for some scalar (the eigenvalue).
For a steady state vector , it must satisfy and .
Use the steady state probability for Product A found in part (d) and set up an inequality.
Question 9
MediumPaper 2 · calculator17 marksA large university offers three primary study modes for its students: Online (O), Hybrid (H), and In-person (I). Each academic year, students may choose to switch between these modes based on their preferences and circumstances.
A study tracked student movement between these modes over a single academic year, revealing the following transition probabilities:
- Of students initially studying Online, 85% remained Online, 10% switched to Hybrid, and 5% switched to In-person.
- Of students initially studying Hybrid, 8% switched to Online, 80% remained Hybrid, and 12% switched to In-person.
- Of students initially studying In-person, 3% switched to Online, 7% switched to Hybrid, and 90% remained In-person.
Assume that these transition probabilities remain constant each year and that the total number of students in the university remains constant.
Represent this information in a transition matrix , ordering the states as Online, Hybrid, and In-person.
At the start of the study, the university had 5000 students studying Online, 8000 students studying Hybrid, and 7000 students studying In-person.
By using , find the expected number of students studying in the Hybrid mode 5 academic years after the start of the study.
For matrix there exists a steady state vector
,
where and are the proportions of the total student population in the Online, Hybrid, and In-person modes respectively, in the long term.
The steady state vector may be found by solving a system of equations.
Determine these equations that are to be solved.
By solving your system of equations, find .
Use your answer to part (c)(ii) to determine the long-term expected population of the In-person mode.
Suggest two reasons why your answer to part (d) is not likely to be accurate. You may comment on both the model and the situation in context.
A transition matrix has entries representing the probability of moving from state to state . Ensure that the columns sum to 1, as each column represents the probabilities of moving from a specific state to all possible states.
First, form the initial state vector . Then, calculate . Remember that each academic year corresponds to one application of the transition matrix . Use your GDC for matrix powers and multiplication.
The steady state vector satisfies the equation . Also, remember that are proportions, so their sum must be 1.
You can solve the system of linear equations using a GDC. Input the coefficients of and the constants into a matrix and use row reduction, or use the simultaneous equation solver.
Multiply the proportion of students in the In-person mode from your steady state vector by the total student population.
Consider the assumptions made in the model, such as constant transition probabilities and a fixed total population. Are these realistic in a university setting over a long period?
Question 10
HardPaper 2 · calculator14 marksA competitive market has two dominant smartphone brands, Aura and Zenith. Each year, it is observed that of Aura customers switch to Zenith, while of Zenith customers switch to Aura. All other customer movements are negligible.
Write down a transition matrix representing the customer movements between the two brands in a particular year. Assume the order of brands is Aura, then Zenith.
Find the eigenvalues and corresponding eigenvectors of .
Hence write down matrices and such that .
Initially, Brand Aura has customers and Brand Zenith has customers.
Find an expression for the number of customers Brand Aura has after years, where .
Hence write down the number of customers that Brand Aura can expect to have in the long term.
A transition matrix shows the probabilities of moving from one state to another. The columns should sum to 1, representing the total probability of customers from a given brand either staying or switching.
To find eigenvalues, solve the characteristic equation . For each eigenvalue, solve to find the corresponding eigenvector.
Matrix is formed by the eigenvectors as its columns, and matrix is a diagonal matrix with the corresponding eigenvalues on its diagonal.
The state vector after years is given by . Use the diagonalization and the initial state vector . Remember to find first.
Consider what happens to the term involving as approaches infinity.
Question 11
MediumPaper 1 · calculator7 marksA streaming service offers two subscription plans: Premium and Basic. The service has found that customers' choices follow a pattern. If a customer has the Premium plan in a given month, the probability they will keep the Premium plan the next month is 0.8. If a customer has the Basic plan in a given month, the probability they will upgrade to the Premium plan the next month is 0.1.
(a) Let the states be Premium (State 1) and Basic (State 2). Write down the transition matrix, T, for this Markov chain.
(b) A new customer subscribes to the Premium plan in their first month, January. Find the probability that this customer will have the Premium plan in March of the same year.
(c) Find the steady state probability vector for this Markov chain.
The columns of the transition matrix represent the current state (Premium, Basic) and the rows represent the next state (Premium, Basic). Remember that the probabilities in each column must sum to 1.
The initial state is that the customer has the Premium plan, so the initial state vector is . March is two months after January, so you need to calculate the state after two transitions.
The steady state vector, , is a probability vector that does not change from one state to the next. It must satisfy the equation . Let and solve for .
Question 12
MediumPaper 1 · calculator9 marksA marketing analyst models the monthly customer loyalty for two companies, Innovate Inc. and Legacy Corp., using the transition matrix , where and . `p` is the probability a customer of Innovate Inc. remains with them the next month, and `q` is the probability a customer of Legacy Corp. remains with them the next month.
(a) Find the eigenvalues of the matrix T in terms of `p` and `q`.
(b) In the long term, the market share for the two companies reaches a steady state. Find the proportion of customers that are with Innovate Inc. and Legacy Corp. at this steady state, in terms of `p` and `q`.
To find the eigenvalues (λ), you need to solve the characteristic equation, which is given by det(T - λI) = 0, where I is the identity matrix.
The steady state vector s is an eigenvector corresponding to the eigenvalue λ=1. So, you need to solve the equation Ts = s, along with the condition that the elements of s must sum to 1.
Question 13
MediumPaper 1 · calculator5 marksTwo coffee shops, Bean Buzz and Daily Grind, compete for customers in a small town. A market analysis shows that customer loyalty changes from month to month.
A customer who went to Bean Buzz in one month has a 60% probability of switching to Daily Grind the next month. A customer who went to Daily Grind in one month has a 30% probability of switching to Bean Buzz the next month.
This situation can be modelled by the transition matrix , where the first column represents the initial state of being a Bean Buzz customer and the second column represents the initial state of being a Daily Grind customer. The eigenvalues of are and .
(a) Find an eigenvector corresponding to the eigenvalue of . Give your answer in the form , where .
(b) Using your answer to part (a), or otherwise, find the long-term market share for Bean Buzz. Give your answer as a percentage to one decimal place.
To find an eigenvector for an eigenvalue , you need to solve the matrix equation , where is the identity matrix and is the zero vector. In this case, .
The long-term probabilities, or steady state, correspond to the eigenvector for the eigenvalue of 1. You need to scale this eigenvector so that its components sum to 1, representing 100% of the market.
No question on this page matches those filters. Try another difficulty or paper.
Every Transition matrices (higher powers), Markov chains, steady state and long term probabilities question, marked for you
Every answer is marked mark by mark, IB-style, and the AI tutor helps when you are stuck.
Where marks are lost
- Leaving an answer in calculator notation. Never accepted in a final answer, and AI's constant calculator use makes this the easiest slip in the whole subject.