Absorbing Markov Chains
An absorbing Markov chain is a Markov chain with at least one absorbing state, a state the chain never leaves, where every state can reach an absorbing state. The fundamental matrix F = (I − Q)−1 gives the expected number of steps before absorption, and FR gives the probability of ending in each absorbing state.
Before this lesson: Markov Chains, Regular Markov Chains and Inverse Matrices
The idea
Some processes end. A gambler goes broke or reaches a goal. A help-desk ticket is resolved or abandoned. A student graduates or drops out. Once the process reaches one of these end states, it stays there forever.
A state i is absorbing if p_{ii} = 1: the chain moves from i back to i with certainty. The other states are transient. In an absorbing chain, the chain sooner or later lands in an absorbing state. The questions are which one, and how long it takes.
Fundamental matrix of an absorbing Markov chain
A Markov chain is an absorbing chain if it has at least one absorbing state and every state can reach some absorbing state, possibly in several steps.
- List the absorbing states first, then the transient states, and write P in standard form. Here I is an identity matrix, O is a zero matrix, R holds the one-step chances from transient to absorbing states, and Q holds the chances from transient to transient states.
- Find the fundamental matrix F = (I - Q)^{-1}.
- The entry of F in row i, column j is the expected number of times the chain is in transient state j before absorption, starting from transient state i. The sum of row i is the expected number of steps before absorption.
- The entry of FR in row i, column j is the probability that the chain, starting from transient state i, ends in absorbing state j.
P = \begin{bmatrix} I & O \\ R & Q \end{bmatrix} \qquad F = (I - Q)^{-1} \qquad \text{absorption probabilities} = FRAbsorbing Markov chain examples
Example 1: Is the chain absorbing?
Decide whether each chain is absorbing: (a) P = \begin{bmatrix} 1 & 0 & 0 \\ 0.3 & 0.5 & 0.2 \\ 0 & 0 & 1 \end{bmatrix} and (b) T = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0.5 & 0.5 \\ 0 & 0.5 & 0.5 \end{bmatrix}.
(a)
p_{11} = 1,\ p_{33} = 1States 1 and 3 have a 1 on the diagonal, so they are absorbing.
p_{21} = 0.3 \gt 0The only transient state, 2, can move straight to state 1.
(b)
t_{11} = 1State 1 is absorbing.
t_{21} = 0,\ t_{31} = 0States 2 and 3 only move between each other.
Answer: (a) is an absorbing chain. (b) is not: it has an absorbing state, but states 2 and 3 can never reach it.
Example 2: The fundamental matrix
A gambler bets $1 at a time and wins or loses each bet with probability 0.5. She stops when she has $0 or $3. Write the chain in standard form and find F.
\text{order: } \$0,\ \$3,\ \$1,\ \$2Put the absorbing states first.
R = \begin{bmatrix} 0.5 & 0 \\ 0 & 0.5 \end{bmatrix}From $1 she can drop to $0; from $2 she can reach $3.
Q = \begin{bmatrix} 0 & 0.5 \\ 0.5 & 0 \end{bmatrix}From $1 she can go to $2, and from $2 to $1.
I - Q = \begin{bmatrix} 1 & -0.5 \\ -0.5 & 1 \end{bmatrix}Subtract Q from the 2 × 2 identity matrix.
\det(I - Q) = 1(1) - (-0.5)(-0.5)
Use ad − bc (see determinant of a matrix).
= 1 - 0.25 = 0.75
Multiply, then subtract.
F = \frac{1}{0.75}\begin{bmatrix} 1 & 0.5 \\ 0.5 & 1 \end{bmatrix}Swap a and d, change the signs of b and c, divide by the determinant (see inverse matrices).
F = \begin{bmatrix} \frac{4}{3} & \frac{2}{3} \\ \frac{2}{3} & \frac{4}{3} \end{bmatrix}Divide each entry by 0.75, which is the same as multiplying by 4/3.
Answer: F = \begin{bmatrix} 4/3 & 2/3 \\ 2/3 & 4/3 \end{bmatrix} with rows and columns in the order $1, $2. Starting with $1, she expects to be at $1 about 4/3 times (counting the start) and at $2 about 2/3 times.
Example 3: Probability of ending in each absorbing state
For the gambler in Example 2, find the probability that she goes broke and the probability that she reaches $3.
FR = \begin{bmatrix} \frac{4}{3} & \frac{2}{3} \\ \frac{2}{3} & \frac{4}{3} \end{bmatrix}\begin{bmatrix} 0.5 & 0 \\ 0 & 0.5 \end{bmatrix}Multiply F by R (see matrix multiplication).
\tfrac{4}{3}(0.5) + \tfrac{2}{3}(0) = \tfrac{2}{3}Row $1 times column $0.
\tfrac{4}{3}(0) + \tfrac{2}{3}(0.5) = \tfrac{1}{3}Row $1 times column $3.
\tfrac{2}{3}(0.5) + \tfrac{4}{3}(0) = \tfrac{1}{3}Row $2 times column $0.
\tfrac{2}{3}(0) + \tfrac{4}{3}(0.5) = \tfrac{2}{3}Row $2 times column $3.
FR = \begin{bmatrix} \frac{2}{3} & \frac{1}{3} \\ \frac{1}{3} & \frac{2}{3} \end{bmatrix}Rows: start at $1, $2. Columns: end at $0, $3.
Answer: starting with $1, she goes broke with probability 2/3 and reaches $3 with probability 1/3. Starting with $2, the chances flip. Each row of FR adds to 1, because she is sure to stop sooner or later.
Example 4: Expected number of steps before absorption
How many bets does the gambler in Example 2 expect to make before she stops?
\tfrac{4}{3} + \tfrac{2}{3} = 2Add row $1 of F.
\tfrac{2}{3} + \tfrac{4}{3} = 2Add row $2 of F.
Answer: 2 bets on average, whether she starts with $1 or $2. Check from $1: she stops after 1 bet with probability 0.5, otherwise she is at $2, so the expected count is 1 + 0.5(expected bets from $2) = 1 + 0.5(2) = 2.
Example 5: Help-desk tickets (word problem)
Each hour, a ticket at Level 1 is resolved with probability 0.2, abandoned with probability 0.05, sent to Level 2 with probability 0.25, and otherwise stays at Level 1. A ticket at Level 2 is resolved with probability 0.4, abandoned with probability 0.1, and otherwise stays at Level 2. For a new ticket at Level 1, find the chance it is resolved and the expected number of hours until it closes.
1 - 0.2 - 0.05 - 0.25 = 0.5
Chance a Level 1 ticket stays at Level 1.
1 - 0.4 - 0.1 = 0.5
Chance a Level 2 ticket stays at Level 2.
Q = \begin{bmatrix} 0.5 & 0.25 \\ 0 & 0.5 \end{bmatrix},\ R = \begin{bmatrix} 0.2 & 0.05 \\ 0.4 & 0.1 \end{bmatrix}Transient order L1, L2; absorbing order Resolved, Abandoned.
I - Q = \begin{bmatrix} 0.5 & -0.25 \\ 0 & 0.5 \end{bmatrix}Subtract Q from I.
\det(I - Q) = 0.5(0.5) - (-0.25)(0) = 0.25
Use ad − bc.
F = \frac{1}{0.25}\begin{bmatrix} 0.5 & 0.25 \\ 0 & 0.5 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 0 & 2 \end{bmatrix}Swap, change signs, divide by 0.25.
2(0.2) + 1(0.4) = 0.4 + 0.4 = 0.8
Row L1 of F times column Resolved of R.
2(0.05) + 1(0.1) = 0.1 + 0.1 = 0.2
Row L1 of F times column Abandoned of R.
2 + 1 = 3
Add row L1 of F for the expected hours.
Answer: a new ticket is resolved with probability 0.8 (and abandoned with probability 0.2). It stays open 3 hours on average: about 2 hours at Level 1 and 1 hour at Level 2.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Calling any chain with an absorbing state absorbing | Calling T in Example 1(b) an absorbing chain | Every state must be able to reach an absorbing state. |
| Using Q in the wrong order | Taking the rows of Q in a different order than the rows of R | Keep one order for the transient states in Q, R and F. |
| Computing (I - Q)^{-1} as I - Q^{-1} | Inverting Q first | Subtract first, then take the inverse of the whole matrix I − Q. |
| Adding a column of F for expected steps | Adding column $1 of F | The expected number of steps from state i is the sum of row i of F. |
| Multiplying RF instead of FR | Computing R times F | Absorption probabilities are FR, with F on the left. |
| Forgetting that F counts the starting step | Expecting row sums of F to be the steps after the first move | Row sums of F count every step taken from a transient state, including the first one. |
Related ideas
Absorbing versus regular chains
A regular chain mixes forever and settles to a steady state that has every state in it. An absorbing chain ends up stuck. Its long-run distribution puts all the probability on the absorbing states, split as in FR. See regular Markov chains.
Why F works
The matrix Q^k gives the chances of being in each transient state after k steps. Adding over all k gives I + Q + Q^2 + \cdots, a matrix version of a geometric series, and that sum equals (I - Q)^{-1}. See infinite geometric series.
Gambler’s ruin
Example 2 is a small case of the classic gambler’s ruin problem. With fair bets, starting with k dollars and stopping at 0 or N, the chance of reaching N is k/N. The gambler with $1 out of $3 reaches $3 with probability 1/3.
Practice problems
- Name the absorbing states of \begin{bmatrix} 0.2 & 0.8 & 0 \\ 0 & 1 & 0 \\ 0.5 & 0 & 0.5 \end{bmatrix}. Is the chain absorbing?
- Is the chain \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0.4 & 0.6 \\ 0 & 0.7 & 0.3 \end{bmatrix} absorbing?
- From transient state T, a chain moves to absorbing state A with probability 0.3, to absorbing state B with probability 0.2, and stays at T otherwise. Find the probability of ending at A and the expected number of steps.
- Find F for Q = \begin{bmatrix} 0.4 & 0.2 \\ 0.2 & 0.4 \end{bmatrix}.
- Use Problem 4 to find the expected number of steps before absorption from each transient state.
- Use F from Problem 4 and R = \begin{bmatrix} 0.4 & 0 \\ 0 & 0.4 \end{bmatrix} to find FR.
- Find the expected number of steps from transient state 1 if Q = \begin{bmatrix} 0.5 & 0.5 \\ 0 & 0.5 \end{bmatrix}.
- Write P = \begin{bmatrix} 0.6 & 0.4 \\ 0 & 1 \end{bmatrix} in standard form and find the expected number of steps from state 1.
- In a two-year program, each year 10% of Year 1 students repeat, 80% move to Year 2 and 10% drop out. In Year 2, 10% repeat, 85% graduate and 5% drop out. Find the probability that a new student graduates and the expected number of years enrolled.
- In Example 2, what is the chance that the gambler reaches $3 if she starts with $2?
Show answers
1.
p_{22} = 1Only state 2 has a 1 on the diagonal.
p_{12} = 0.8 \gt 0,\ p_{31} = 0.5 \gt 0State 1 reaches 2 directly; state 3 reaches 2 through state 1.
Answer: state 2 is absorbing, and the chain is absorbing.
2.
p_{21} = 0,\ p_{31} = 0States 2 and 3 never move to state 1.
Answer: No. State 1 is absorbing, but states 2 and 3 can’t reach it.
3.
F = (1 - 0.5)^{-1} = 2Q is the 1 × 1 matrix [0.5].
FR = 2\begin{bmatrix} 0.3 & 0.2 \end{bmatrix} = \begin{bmatrix} 0.6 & 0.4 \end{bmatrix}Multiply F by R.
Answer: P(end at A) = 0.6, and the expected number of steps is 2.
4.
I - Q = \begin{bmatrix} 0.6 & -0.2 \\ -0.2 & 0.6 \end{bmatrix}Subtract Q from I.
0.6(0.6) - (-0.2)(-0.2) = 0.36 - 0.04 = 0.32
Find the determinant.
F = \frac{1}{0.32}\begin{bmatrix} 0.6 & 0.2 \\ 0.2 & 0.6 \end{bmatrix}Swap, change signs, divide by the determinant.
Answer: F = \begin{bmatrix} 1.875 & 0.625 \\ 0.625 & 1.875 \end{bmatrix}
5.
1.875 + 0.625 = 2.5
Add row 1 of F; row 2 has the same entries.
Answer: 2.5 steps from either transient state.
6.
1.875(0.4) + 0.625(0) = 0.75
Row 1 times column 1.
1.875(0) + 0.625(0.4) = 0.25
Row 1 times column 2.
0.625(0.4) + 1.875(0) = 0.25
Row 2 times column 1.
0.625(0) + 1.875(0.4) = 0.75
Row 2 times column 2.
Answer: FR = \begin{bmatrix} 0.75 & 0.25 \\ 0.25 & 0.75 \end{bmatrix}
7.
I - Q = \begin{bmatrix} 0.5 & -0.5 \\ 0 & 0.5 \end{bmatrix}Subtract Q from I.
0.5(0.5) - (-0.5)(0) = 0.25
Find the determinant.
F = \frac{1}{0.25}\begin{bmatrix} 0.5 & 0.5 \\ 0 & 0.5 \end{bmatrix} = \begin{bmatrix} 2 & 2 \\ 0 & 2 \end{bmatrix}Swap, change signs, divide by 0.25.
2 + 2 = 4
Add row 1 of F.
Answer: 4 steps
8.
\begin{bmatrix} 1 & 0 \\ 0.4 & 0.6 \end{bmatrix}List the absorbing state 2 first, then state 1.
F = (1 - 0.6)^{-1} = \frac{1}{0.4} = 2.5Q = [0.6] and R = [0.4].
Answer: standard form \begin{bmatrix} 1 & 0 \\ 0.4 & 0.6 \end{bmatrix}; 2.5 steps on average
9.
Q = \begin{bmatrix} 0.1 & 0.8 \\ 0 & 0.1 \end{bmatrix},\ R = \begin{bmatrix} 0 & 0.1 \\ 0.85 & 0.05 \end{bmatrix}Transient Y1, Y2; absorbing Graduate, Drop out.
I - Q = \begin{bmatrix} 0.9 & -0.8 \\ 0 & 0.9 \end{bmatrix},\ \det = 0.81Subtract, then 0.9(0.9) − (−0.8)(0).
F = \frac{1}{0.81}\begin{bmatrix} 0.9 & 0.8 \\ 0 & 0.9 \end{bmatrix} = \begin{bmatrix} \frac{10}{9} & \frac{80}{81} \\ 0 & \frac{10}{9} \end{bmatrix}Swap, change signs, divide by 0.81.
\tfrac{10}{9}(0) + \tfrac{80}{81}(0.85) = \tfrac{68}{81} \approx 0.840Row Y1 of F times column Graduate.
\tfrac{10}{9} + \tfrac{80}{81} = \tfrac{170}{81} \approx 2.10Add row Y1 of F.
Answer: a new student graduates with probability about 0.840 and is enrolled about 2.10 years on average.
10.
\tfrac{2}{3}(0) + \tfrac{4}{3}(0.5) = \tfrac{2}{3}Row $2 of F times column $3 of R (Example 3).
Answer: 2/3
Absorbing Markov chains FAQ
What is an absorbing state?
It is a state the chain never leaves: the probability of moving from it back to itself is 1, so its row of P has a 1 on the diagonal and 0s elsewhere.
What is the fundamental matrix of an absorbing Markov chain?
It is F = (I − Q)−1, where Q holds the transition probabilities among the transient states. Its entries are expected visit counts, and its row sums are expected steps before absorption.
How do you find absorption probabilities?
Write P in standard form, find F, and multiply FR. Row i of FR lists the chances of ending in each absorbing state when the chain starts in transient state i.
Is an absorbing Markov chain regular?
No. An absorbing state’s row stays (…, 1, …) with zeros in every power of P, so no power has all positive entries.
Summary
- A state is absorbing if p_{ii} = 1; a chain is absorbing if it has one and every state can reach one.
- Standard form lists absorbing states first: R goes from transient to absorbing states, and Q from transient to transient states.
- The fundamental matrix is F = (I - Q)^{-1}; its row sums are the expected steps before absorption.
- FR gives the probability of ending in each absorbing state.
- Each row of FR adds to 1, because absorption is certain.
Previous lesson: Regular Markov Chains
Next lesson: Strictly Determined Games
Back to the Finite Math and Business Calculus Index