Markov chains and steady states
Move a probability vector one step with a stochastic matrix, find the steady state as the eigenvector for λ = 1 with entries summing to 1, and explain why a regular chain approaches it from any start.
It opens on
Each year 5% of city dwellers move to the suburbs and 3% of suburbanites move to the city. Today 60% of the region lives in the city. Does the city keep shrinking forever, or is there a share it settles to?
Why it matters
Population migration, customer switching, weather, queues and web ranking (PageRank) are Markov chains; their steady state is the long-run share in each state, found with one eigenvector instead of a long simulation.
Good to know first
- Discrete dynamical systems: xₖ = Aᵏx₀ and the eigenvector decomposition of x₀
- Diagonalizing a matrix: the eigenvector for λ = 1 of a Markov matrix as its steady state
- The characteristic polynomial: eigenvalues of a 2 × 2 from trace and determinant
Step by step
Stochastic matrices move probability vectors
Build the stochastic matrix from a state diagram and compute x₁ = Mx₀ for a probability vector x₀.
From the diagram, M = [[0.95, 0.03], [0.05, 0.97]], and next year's shares are xₖ₊₁ = Mxₖ.
A common mix-up
The rows of M should add to 1.
In fact: The columns do, because column j splits up the people in state j; the rows here add to 0.98 and 1.02.
The steady state is the eigenvector for 1
Show that λ = 1 is an eigenvalue of every stochastic matrix and find the steady state q with Mq = q and entries summing to 1.
(M − I)q = 0 reads −0.05q₁ + 0.03q₂ = 0, so q is a multiple of (3, 5).
A common mix-up
The long-run shares depend on where the population starts.
In fact: Every start has the same q part; only the fading 0.92ᵏ part carries the start.
Regular chains converge
Recognize a regular stochastic matrix, find a steady state of a three-state chain, and see a non-regular chain that never settles.
The bike chain M = [[0.8, 0.1, 0.2], [0.1, 0.8, 0.2], [0.1, 0.1, 0.6]] has all entries positive, so it is regular already at k = 1.
A common mix-up
Every Markov chain approaches its steady state.
In fact: Only when the other eigenvalues are below 1 in size, as for a regular chain; the swap chain has λ = −1 and bounces forever.
Try it
Compute x₂ = Mx₁ for x₁ = (0.582, 0.418).Answer
(0.5654, 0.4346), from 0.95·0.582 + 0.03·0.418 = 0.56544
Hint: The suburbs' share is 1 minus the city's
Find the steady state of M = [[0.7, 0.4], [0.3, 0.6]] and its second eigenvalue.Answer
q = (4/7, 3/7) ≈ (0.571, 0.429); λ₂ = 0.3
Hint: −0.3q₁ + 0.4q₂ = 0, and λ₂ = trace − 1
Is M = [[0, 0.5], [1, 0.5]] regular? If so, find its steady state.Answer
Yes: M² = [[0.5, 0.25], [0.5, 0.75]] is all positive; q = (1/3, 2/3)
Hint: −q₁ + 0.5q₂ = 0
Why must the entries of x₁ again add to 1?Answer
Each column of M adds to 1, so every person now in a state is sent somewhere: total share is kept
Scale (3, 5) to a probability vector.Answer
Divide by 3 + 5 = 8: q = (0.375, 0.625)
