Markov Chain Simulator

Enter a discrete-time transition matrix, choose either an initial state or an initial distribution, and animate a sample path directly on the transition diagram.

Model Inputs
Initial Condition
Each row of the transition matrix should sum to 1. The simulation follows the same weighted random next-state selection used in `DTMC_simulate`.
The slider below the diagram lets you scrub through the path after simulation. The empirical bar chart shows the fraction of visits to each state up to the current step.
Current step
0
Current state
-
Visited states
0
Path length
0
Frame
0 / 0
Sample path
t State Transition
Empirical visit proportions
Estimated marginal probabilities over time