2.5 Markov Chains: Transition Matrices, Steady-State Probabilities & Absorbing States

Key Takeaways

  • A Markov chain's next state depends only on its current state, and each row of the transition matrix P sums to 1.

  • The state distribution after n periods is the starting distribution times P raised to the n-th power.

  • Steady-state probabilities solve π = πP with the probabilities summing to 1; the mean time between visits to state i is 1 ÷ π_i.

  • For an absorbing chain, the fundamental matrix N = (I − Q)^-1 gives expected visits to transient states, and B = NR gives absorption probabilities.

  • Markov models support maintenance policy, quality yield, brand switching, and inventory decisions by attaching costs to long-run state probabilities.

Last updated: October 2026

2.5 Markov Chains

Markov chains model systems that move among a set of states at regular time steps, such as a machine that is good, degraded, or failed each shift. The specification lists Markov chains as a modeling technique, and they also support maintenance and reliability decisions.


1. The Markov Property and the Transition Matrix

A discrete-time Markov chain satisfies the Markov property: the probability of the next state depends only on the current state, not on how the system got there.

P(Xt+1=j∣Xt=i,Xt−1,…,X0)=P(Xt+1=j∣Xt=i)=pijP(X_{t+1} = j \mid X_t = i, X_{t-1}, \dots, X_0) = P(X_{t+1} = j \mid X_t = i) = p_{ij}

The probabilities pijp_{ij} form the transition matrix P\mathbf{P}. Row ii lists where the system goes from state ii, so every row sums to 1.

Machine-condition example. A packaging machine is inspected each shift and classified as Good (G), Degraded (D), or Failed (F). A failed machine is repaired during the next shift and returns to Good.

From \ ToGDF
G0.800.150.05
D00.700.30
F1.0000

2. n-Step Probabilities

If π(0)\boldsymbol{\pi}^{(0)} is the row vector of starting probabilities, the distribution after nn steps is:

π(n)=π(n−1)P=π(0)Pn\boldsymbol{\pi}^{(n)} = \boldsymbol{\pi}^{(n-1)} \mathbf{P} = \boldsymbol{\pi}^{(0)} \mathbf{P}^n

Starting from a newly repaired machine, π(0)=[1,0,0]\boldsymbol{\pi}^{(0)} = [1, 0, 0]:

  • After one shift: π(1)=[0.80,0.15,0.05]\boldsymbol{\pi}^{(1)} = [0.80, 0.15, 0.05].
  • After two shifts:
    • P(G)=0.80(0.80)+0.15(0)+0.05(1.00)=0.69P(G) = 0.80(0.80) + 0.15(0) + 0.05(1.00) = 0.69
    • P(D)=0.80(0.15)+0.15(0.70)+0.05(0)=0.225P(D) = 0.80(0.15) + 0.15(0.70) + 0.05(0) = 0.225
    • P(F)=0.80(0.05)+0.15(0.30)+0.05(0)=0.085P(F) = 0.80(0.05) + 0.15(0.30) + 0.05(0) = 0.085

The three values sum to 1, which is a quick check on the arithmetic. On the exam, multiply row vector by matrix one step at a time rather than computing Pn\mathbf{P}^n.


3. Steady-State (Long-Run) Probabilities

For a chain in which every state can reach every other state and the chain is not periodic, the distribution settles to a unique steady state π\boldsymbol{\pi} regardless of the starting state:

π=πP,∑iπi=1\boldsymbol{\pi} = \boldsymbol{\pi}\mathbf{P}, \qquad \sum_i \pi_i = 1

Write one balance equation per state, drop any one of them (they are redundant), and add the normalization equation.

Machine example:

  • From the D column: πD=0.15πG+0.70πD\pi_D = 0.15\pi_G + 0.70\pi_D, so 0.30πD=0.15πG0.30\pi_D = 0.15\pi_G and πD=0.5πG\pi_D = 0.5\pi_G.
  • From the F column: πF=0.05πG+0.30πD=0.05πG+0.15πG=0.2πG\pi_F = 0.05\pi_G + 0.30\pi_D = 0.05\pi_G + 0.15\pi_G = 0.2\pi_G.
  • Normalize: πG(1+0.5+0.2)=1\pi_G(1 + 0.5 + 0.2) = 1, so πG=0.588\pi_G = 0.588, πD=0.294\pi_D = 0.294, and πF=0.118\pi_F = 0.118.

Check with the G column: 0.80(0.588)+1.00(0.118)=0.5880.80(0.588) + 1.00(0.118) = 0.588. ✓

Using the result.

  • The machine is failed about 11.8% of shifts, and the mean recurrence time of the failed state is 1/πF=8.51/\pi_F = 8.5 shifts between failures.
  • With costs of $1,000 per degraded shift (scrap) and $5,000 per failed shift (repair and lost output), the long-run expected cost is 0.294(1,000)+0.118(5,000)≈$8820.294(1{,}000) + 0.118(5{,}000) \approx \text{\textdollar}882 per shift.
  • A preventive policy, such as repairing whenever the machine is found degraded, changes the matrix. Compare policies by recomputing π\boldsymbol{\pi} and the expected cost.

4. Absorbing Markov Chains

A state is absorbing if the chain can never leave it (pii=1p_{ii} = 1). Arrange the matrix with transient states first:

P=[QR0I]\mathbf{P} = \begin{bmatrix} \mathbf{Q} & \mathbf{R} \\ \mathbf{0} & \mathbf{I} \end{bmatrix}

where Q\mathbf{Q} holds transitions among transient states and R\mathbf{R} holds transitions from transient to absorbing states.

  • Fundamental matrix: N=(I−Q)−1\mathbf{N} = (\mathbf{I} - \mathbf{Q})^{-1}. Entry nijn_{ij} is the expected number of visits to transient state jj when starting in transient state ii.
  • Expected steps before absorption: t=N1\mathbf{t} = \mathbf{N}\mathbf{1} (row sums of N\mathbf{N}).
  • Absorption probabilities: B=NR\mathbf{B} = \mathbf{N}\mathbf{R}.

Rework loop example. Parts leave machining (state P) and go to Good stock 85% of the time, to Rework (state W) 10%, or to Scrap 5%. Reworked parts become Good 70% of the time, are scrapped 20%, and need rework again 10%.

Q=[00.1000.10],R=[0.850.050.700.20],N=(I−Q)−1=[10.11101.111]\mathbf{Q} = \begin{bmatrix} 0 & 0.10 \\ 0 & 0.10 \end{bmatrix}, \quad \mathbf{R} = \begin{bmatrix} 0.85 & 0.05 \\ 0.70 & 0.20 \end{bmatrix}, \quad \mathbf{N} = (\mathbf{I} - \mathbf{Q})^{-1} = \begin{bmatrix} 1 & 0.111 \\ 0 & 1.111 \end{bmatrix}

For a part starting in machining:

  • P(Good)=1(0.85)+0.111(0.70)=0.928P(\text{Good}) = 1(0.85) + 0.111(0.70) = 0.928
  • P(Scrap)=1(0.05)+0.111(0.20)=0.072P(\text{Scrap}) = 1(0.05) + 0.111(0.20) = 0.072
  • Expected rework operations per part =nPW=0.111= n_{PW} = 0.111

For 10,000 parts started, expect about 9,278 good parts, 722 scrapped, and 1,111 rework operations. That rework load is what the capacity plan must cover.


5. Common Applications and Exam Traps

ApplicationStatesDecision supported
Machine maintenanceCondition levelsRepair or replace policy
Brand switchingProduct a customer buysLong-run market share
InventoryStock on hand at reviewOrdering policy cost
Quality yieldProcess, rework, good, scrapYield and rework capacity
Accounts receivableAge of account, paid, bad debtExpected collections

Traps:

  • Columns, not rows, are used when writing balance equations for πj\pi_j, because πj=∑iπipij\pi_j = \sum_i \pi_i p_{ij} sums down column jj.
  • Probabilities must be per time step; convert rates to per-shift or per-period probabilities first.
  • Steady-state results do not apply to absorbing chains, because those chains end in an absorbing state.
Test Your Knowledge

A two-state Markov chain models whether a production line is Running (R) or Down (D) at the start of each hour. The transition probabilities are P(R→R) = 0.90, P(R→D) = 0.10, P(D→R) = 0.40, and P(D→D) = 0.60. What is the long-run fraction of hours the line is running?

A

0.60

B

0.75

C

0.80

D

0.90

Test Your Knowledge

Using the machine-condition matrix in this section, a machine is Good now. What is the probability that it is Degraded two shifts from now?

A

0.150

B

0.225

C

0.105

D

0.290

Test Your Knowledge

For an absorbing Markov chain, an analyst computes the fundamental matrix N = (I − Q)^-1. What does the entry n_ij represent?

A

The probability of being absorbed in state j when starting in state i

B

The long-run steady-state probability of being in state j

C

The one-step transition probability from transient state i to state j

D

The expected visits to transient state j before absorption, starting in state i

Sections you finish are checked off in the contents.