Lab / Markov Chain Simulator

Markov Chain Simulator

Define states and transitions, simulate random walks step by step, and watch the empirical distribution converge to the theoretical stationary distribution.

Click: add state | Shift+drag: add transition | Right-click: remove | Drag: move
Distribution
Sunny
0.500
0.571
Rainy
0.500
0.429
EmpiricalStationary
Convergence
Run the simulation to see convergence
Presets
Transition Matrix
SunnyRainySum
Sunny1.00
Rainy1.00
Simulation
Start from:
Stationary Distribution (pi)
Sunny: 0.5714
Rainy: 0.4286
Chain Properties
Ergodic:Yes
Period:1
Absorbing states:None
Communication classes:1

All computations run entirely in your browser. Click on the canvas to add states, drag between states to create transitions, and use the controls to simulate the chain.