Markov Chain Visualizer

Edit a transition matrix, run a simulation, and see distributions and the stationary distribution.

Model

Transition Matrix (row-stochastic)

Initial Distribution

Simulation

400 ms

Analysis

Notes
  • Rows must sum to 1. Use Normalize Rows if needed.
  • We model a discrete-time Markov chain where \(p_{t+1} = p_t P\).
  • If the chain is irreducible and aperiodic, the power method converges to the unique stationary distribution \(\pi\) with \(\pi = \pi P\).
  • Absorbing states have a row like [0, 0, ..., 1, ..., 0] with the 1 on the diagonal.

State Graph

Node fill ≈ current probability
Edge thickness ≈ transition probability

Distribution Over Time