Probability & Counting
Markov Chains & Absorbing States
Overview
Markov chains are the Swiss Army knife of quant probability. They make any 'sequential process with states' tractable. The secret: instead of thinking about the full trajectory, you only need the CURRENT state — the future is independent of the past given the present. This memoryless property lets you write simple linear equations for expected hitting times and absorption probabilities.
How to Recognize
- →'How long until the process reaches state X?'
- →A system moves between discrete states based on probabilities
- →Expected time to ruin, expected time to win, probability of reaching a goal
Step-by-Step Approach
- 1.Define the states clearly — what information do you need to carry?
- 2.Write E[steps from state i] = 1 + Σⱼ Pᵢⱼ·E[steps from state j] (absorbing states: 0)
- 3.Write P(reach goal from state i) = Σⱼ Pᵢⱼ·P(reach goal from state j)
- 4.Solve the resulting system of linear equations
- 5.Stationary distribution: solve πP = π (or by detailed balance for reversible chains)
Key Formulas
Worked Examples
Problem
Flip a fair coin repeatedly. What is the expected number of flips to first see two consecutive heads (HH)?
Solution
States: S₀ = start (or just saw tails), S₁ = just saw one head, S₂ = HH (absorbing, done).
From S₀: flip → H (prob ½, go to S₁) or T (prob ½, stay in S₀). Cost = 1 flip.
From S₁: flip → H (prob ½, go to S₂ = done!) or T (prob ½, go back to S₀). Cost = 1 flip.
Equations: E₀ = 1 + ½E₁ + ½E₀ → E₀/2 = 1 + ½E₁ → E₀ = 2 + E₁.
E₁ = 1 + ½·0 + ½E₀ = 1 + E₀/2. Substitute: E₀ = 2 + 1 + E₀/2 → E₀/2 = 3 → E₀ = 6.
Answer
. Key insight: after a tail, you reset completely. After a head, you only need one more. The asymmetry creates the 6-step result.
Common Mistakes
- !
Forgetting to handle absorbing states correctly in the equations — they have value 0 in expected time equations and value 1 (or 0) in probability equations.
- !
Setting up the wrong states. The state must capture everything relevant to the future — missing information makes the Markov property fail.
- !
Solving the system incorrectly. For hitting time problems, always substitute back to verify your answer satisfies all equations.
- !
Confusing hitting time (expected steps) with absorption probability. These require separate equation systems.
Practice Problems
Click "Show Answer" to revealExpected flips to see HTH (heads-tails-heads)? Set up the Markov chain states.
A frog starts on lily pad 3 on a row of 5 lily pads (1,2,3,4,5). It jumps left or right uniformly. Pads 1 and 5 are exits. What is P(exit at pad 5)?
A lazy professor grades by randomly marking each question pass (P=0.7) or fail (P=0.3), independently. There are 10 questions. What is the stationary distribution not relevant here — but what is P(at least 7 pass)?