Stochastic Processes
Intermediate
8 min

Markov Chains

Discrete-state processes where the future depends only on the present, governed by a transition matrix.

1. The idea

A Markov chain moves between a finite set of states such that : the next state depends only on the current one, not the full history.

Collecting these one-step probabilities into a transition matrix lets you compute -step transitions as , and lets you find long-run behavior without simulating.

A stationary distribution satisfies with ; for an irreducible, aperiodic chain, the chain converges to regardless of the starting state.

2. Why it matters

Markov chains model state transitions in order books, credit ratings, and game states, and "find the stationary distribution" or "find the long-run fraction of time in state X" is a standard interview question type.

3. Core mathematics

Markov property

Transition matrix

-step transitions

Stationary distribution

Long-run behavior

for irreducible, aperiodic chains

4. How to recognize it

Think of this when…

  • A system with a discrete set of states and given transition probabilities between them
  • "Find the long-run proportion of time in state " — asks for the stationary distribution
  • Weather, credit rating, or game-state transition setups with the Markov (memoryless-in-state) property
  • Requests to solve or to find the -step transition probability

5. Worked example

Worked example

A two-state chain (Sunny , Rainy ) has , , , . Find the stationary distribution.

  1. 1

    Let with . Write componentwise.

  2. 2

    Rearrange the equation.

  3. 3

    Use the normalization constraint.

  4. Answer: : sunny days occur of the time in the long run.

6. Common mistakes

  • Writing instead of (row vector on the left, since acts on the left of )
  • Forgetting the normalization constraint , leaving an underdetermined system
  • Assuming a stationary distribution exists and is unique without checking irreducibility
  • Confusing the transition matrix's rows (from-state) with its columns (to-state)

7. Quick check

What two conditions define a stationary distribution of transition matrix ?

In a 2-state chain with and , what is ?

8. Practice

2 QuantSolve questions use this concept.

Practice this concept

9. Related methods