This is a free textbook suitable for a one-semester course on Markov chains, covering basics of finite-state chains, many classical models, asymptotic behavior and mixing times, Monte Carlo methods, and martingales and harmonic functions. It is designed to fill a gap in the literature by being suitable for undergraduates; much of the theory is thus built from the ground up, with only basic probability and linear algebra assumed. We take as our basic framework the first four chapters of the classic Levin-Peres text "Markov Chains and Mixing Times," generously expanding to make an exposition suitable for an undergraduate audience. We also incorporate over a hundred exercises and problems, along with a rich set of accompanying illustrations. Suggested homework sets are found in an appendix.
Updated editions will periodically appear as new versions of this submission.
Finite Markov Chains and Monte-Carlo Methods: An Undergraduate Introduction
- Paper ID: 2510.14165
- Title: Finite Markov Chains and Monte-Carlo Methods: An Undergraduate Introduction
- Authors: Soumik Pal (University of Washington), Tim Mesikepp
- Classification: math.PR (Probability Theory)
- Publication Date: October 17, 2025
- Paper Link: https://arxiv.org/abs/2510.14165
This is a free textbook suitable for a one-semester course on Markov chains, covering fundamentals of finite-state chains, classical models, asymptotic behavior and mixing times, Monte Carlo methods, martingales, and harmonic functions. The material aims to fill a gap in existing literature by making the subject accessible to undergraduate students. The theory is built from first principles, assuming only basic knowledge of probability theory and linear algebra. Based on the first four chapters of the classical Levin-Peres textbook Markov Chains and Mixing Times, the material has been substantially expanded to suit an undergraduate audience. The textbook contains over 100 exercises and problems with abundant illustrations, and suggested problem sets are provided in the appendices.
- Textbook Gap: Existing Markov chain textbooks are either outdated and insufficiently cover Monte Carlo methods (such as Feller, Hoel-Port-Stone), or are too advanced for undergraduates (such as Aldous-Fill, Diaconis, Levin-Peres)
- Teaching Needs: The University of Washington Department of Mathematics/Statistics introduced a new undergraduate course math/stat 396 in 2018, requiring appropriate instructional materials
- Theory-Practice Integration: A textbook is needed that covers both theoretical foundations and includes abundant exercises
- Provides undergraduate students with a systematic textbook for learning finite Markov chains and Monte Carlo methods
- Fills an important gap in probability theory education
- Promotes the dissemination of Markov chain theory at the undergraduate level
- Systematic Textbook: Provides the first comprehensive textbook on finite Markov chains specifically designed for undergraduates
- Rich Problem Library: Contains over 100 exercises and problems, many of which are original
- Progressive Theory Development: Builds complete Markov chain theory starting from random walks on graphs
- Practical Monte Carlo Methods: Provides detailed coverage of MCMC methods important in modern statistics
- Complete Proof System: Offers self-contained proofs, including some original proofs (e.g., Theorem 1.8)
The textbook adopts a five-chapter structure, each with clear learning objectives:
- Starting Point: Begins with random walks on graphs, providing intuitive geometric understanding
- Core Concepts:
- Transition matrices and the Markov property
- Irreducibility and aperiodicity
- Stationary distribution π
- Hitting times and return times
- Time reversibility and detailed balance equations
Key Formulas:
- Markov property: P(Xk+1=y∣X0=j0,…,Xk=x)=P(Xk+1=y∣Xk=x)=Pxy
- Stationary distribution: πP=π
- Stationary distribution for simple symmetric random walk: πv=2∣E∣deg(v)
Covers important concrete examples:
- Gambler's Ruin Problem: Boundary hitting probability formula Pk(Xτ=n)=nk
- Ehrenfest Urn Model: Presented as a projection of random walk on hypercube
- Pólya Urn Model: Demonstrates positive feedback mechanism with proportion converging to uniform distribution
- Convergence Theorems:
- Exponential convergence to π: ∥Pn(x,⋅)−π∥TV≤Cαn
- Ergodic theorem: limn→∞n1∑j=0n−1f(Xj)=Eπ(f)
- Mixing Time: Convergence rate computed via spectral analysis
- Relaxation Time: trel=1−λ∗1, where λ∗ is the second-largest eigenvalue
- Sampling Algorithms: Inverse CDF method, rejection sampling
- MCMC: Metropolis-Hastings algorithm
- Gibbs Sampling: Conditional distribution sampling
- Stochastic Optimization: Simulated annealing
- Martingale Definition: E(Yn+1∣X0,…,Xn)=Yn
- Harmonic Functions: (Ph)(x)=h(x)
- Optional Stopping Theorem: E(Yτ)=E(Y0)
- Concrete to Abstract: Begins with random walks on graphs, avoiding difficulties of abstract definitions
- Complete Proof Chain: Includes self-contained proofs, such as the original proof of Theorem 1.8
- Rich Examples: Each concept is accompanied by detailed examples and exercises
- Strong Practicality: Chapter 4 specifically introduces practical methods used in modern statistics
The textbook includes numerous computational examples:
- Random walk on 6-cycle: P50≈(0.333⋮00.33300.3330)
- Mixing time on hypercube: tmix(ϵ)≤N2log(ϵ2N)
- In-Chapter Exercises: Provide immediate reinforcement of understanding
- End-of-Chapter Problems: More challenging, with hints provided
- Suggested Problem Sets: Seven sets of recommended assignments provided in appendices
- Suitable for one-semester (or one-quarter) course: Chapters 1-4 recommended
- Full semester can cover all five chapters
- Validated through years of use at the University of Washington
- 5-Cycle Mixing Time: Approximately 30 steps needed to reach near-uniform distribution
- Hypercube Convergence: In 3-dimensional case, 10−6 precision achieved within 48 steps
- Ehrenfest Urn: Stationary distribution is Bin(N,1/2)
- Feller (1950s): Pioneering but outdated, does not cover Monte Carlo methods
- Hoel-Port-Stone: Similar limitations
- Aldous-Fill: Excellent but too advanced for undergraduates
- Levin-Peres: Modern standard but requires more background knowledge
- Undergraduate-Appropriate: Built from foundations with minimal prerequisites
- Comprehensive Coverage: From basic theory to modern applications
- Rich Exercises: Over 100 problems combining theory and practice
- Successfully constructed a complete Markov chain textbook system suitable for undergraduates
- Effectively combines theoretical depth with pedagogical accessibility
- Provides valuable resources for probability theory education
- Scope Restriction: Covers only finite state spaces, not countable state spaces
- Concept Omissions: Does not discuss recurrence and transience concepts
- Measure Theory: Deliberately avoids measure-theoretic approaches
- Regular version updates
- Possible extension to continuous-time Markov chains
- Addition of more modern application examples
- Teaching-Oriented: Specifically designed for undergraduate instruction, filling an important gap
- Theoretical Completeness: Provides self-contained proof system
- Strong Practicality: Includes modern Monte Carlo methods
- Rich Resources: Abundant exercises and illustrations
- Empirically Validated: Tested through years of teaching experience
- Limited Innovation: Primarily an instructional compilation with limited theoretical novelty
- Restricted Scope: Limitation to finite state spaces
- Depth-Accessibility Trade-off: Some theoretical depth sacrificed for undergraduate accessibility
- Educational Value: Significant contribution to undergraduate probability theory education
- Dissemination Effect: Helps popularize Markov chain theory
- Reference Value: Provides a model for other textbook authors
- Undergraduate probability theory courses
- Graduate introductory courses
- Self-study of Markov chain theory
- Monte Carlo methods learning
The textbook cites important literature in the field:
- Feller, W. An Introduction to Probability Theory and Its Applications
- Levin, D. A., and Peres, Y. Markov chains and mixing times
- Aldous, D., and Fill, J. A. Reversible Markov Chains and Random Walks on Graphs
- Diaconis, P. Group Representations in Probability and Statistics
Overall Assessment: This is a high-quality probability theory textbook that successfully presents profound mathematical theory in a manner comprehensible to undergraduate students. While its contribution to theoretical innovation is limited, its educational value and practicality make it an important contribution to the field. The textbook's systematicity, completeness, and rich exercise design all reflect the authors' dedication and professional expertise.