Mathematics · core
Random Walks & Markov Chains
Markov property, random walks, transition matrices — generative story behind market efficiency intuition.
Mental model
Markov: future depends only on present state. Random walk sums independent steps. If returns are unpredictable, momentum must demonstrate structure, not narrative.
How to study Random Walks & Markov Chains
Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use MIT 6.041SC — Probabilistic Systems Analysis (course), Grinstead & Snell, Introduction to Probability — Ch. 11: Markov Chains, Grinstead & Snell — Ch. 12: Random Walks to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.
Next, compare Random Walks & Markov Chains with Returns & Volatility, Stationarity & Autocorrelation. Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete Simulate a two-state Markov chain and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.
Proof of understanding
- Explain the mechanism from first principles and identify the state it reads or changes.
- Give one situation where the concept is the right choice and one where it is not.
- Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
- Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.
Where it matters
PageRank, HMMs, backtest skepticism.
Common mistakes
- Markov when volatility clusters
- Trending levels called random walk
- Confusing level walk with return predictability
Learn from primary sources
Practice and explain it back
Simulate a two-state Markov chain
Transition matrix P=[[0.9,0.1],[0.2,0.8]] on states {0,1}. Simulate 1000 steps from state 0. Estimate stationary proportion of time in state 1.
Expected evidence: ≈1/3 time in state 1 (solve πP=π → π=(2/3,1/3)). Simulation should be close.
Open the interactive drill →Review prompts
- What is the Markov property?
Build evidence
Simulate coin flips, dice, and random walks
Code simulators (no stats libraries): Bernoulli trials, dice sums, and a 1D random walk. Plot or print distributions and compare sample mean to theory.
- 10k coin flips: sample proportion within 0.02 of 0.5
- Dice sum histogram matches triangular shape qualitatively
- Random walk: report mean displacement and max |position| over T steps