Calculator Input
Enter a square transition matrix. Use commas or spaces between values, and place each row on a new line.
Example Data Table
This sample demonstrates a three-state chain that gradually settles into its steady-state distribution.
| Item | Sample Value |
|---|---|
| States | A, B, C |
| Transition Matrix | [0.70, 0.20, 0.10] | [0.30, 0.40, 0.30] | [0.20, 0.30, 0.50] |
| Initial Distribution | [1.00, 0.00, 0.00] |
| Tolerance Epsilon | 0.0100 |
| Max Steps | 25 |
| Use Case | Estimating how fast the chain forgets its starting state. |
Formula Used
State update: If the current distribution is μn, then the next distribution is μn+1 = μnP.
Total variation distance: TV(n) = 0.5 × Σ |μn(i) - π(i)|, where π is the stationary distribution.
Dobrushin contraction coefficient: τ(P) = 0.5 × maxi,j Σk |Pik - Pjk|.
Convergence upper bound: TV(n) ≤ TV(0) × τ(P)n.
Empirical decay factor: The calculator estimates an observed rate from successive distance ratios, then uses it as a practical convergence proxy.
Mixing time estimate: The report returns the first simulated step where TV(n) ≤ ε. If it is not reached, an estimated step count is inferred from the empirical rate.
How to Use This Calculator
- Enter a square transition matrix with non-negative probabilities.
- Provide the initial distribution for the starting state mix.
- Add matching labels for each state, or leave defaults.
- Choose epsilon to define your convergence threshold.
- Set simulation steps and stationary solver iterations.
- Enable normalization if your rows are close to one.
- Click Calculate Convergence to generate the report.
- Review steady-state values, contraction metrics, and the distance plot.
- Use the export buttons to save CSV or PDF output.
Frequently Asked Questions
1. What does this calculator measure?
It measures how quickly a finite Markov chain approaches its stationary distribution from a chosen starting distribution. It reports observed distance decay, an upper contraction bound, and a practical mixing-time estimate.
2. Why is total variation distance used?
Total variation distance is a standard probability metric. It clearly shows how different the current distribution is from steady state, and it is easy to interpret on a scale from zero to one.
3. What is the Dobrushin coefficient?
It is a one-step contraction measure derived directly from the transition matrix. When it is below one, the chain contracts distances geometrically, giving a strong convergence guarantee.
4. Does the calculator compute exact eigenvalues?
No. This version uses a stationary solver, total variation distances, and empirical decay ratios. That keeps the tool reliable for web use while still providing strong practical convergence insight.
5. Why might convergence seem slow?
Chains with nearly separated states, weak communication paths, or very sticky transitions often mix slowly. In those cases, total variation distance decreases gradually, and more simulation steps are needed.
6. What if my rows do not sum exactly to one?
Enable automatic normalization. The calculator will rescale each row and the initial vector so the computation can proceed. Disable it only when you want strict validation.
7. Can this tool analyze absorbing chains?
Yes, but interpretation changes. Absorbing or reducible chains may not have a unique attracting stationary distribution for every start, so the diagnosis section should be read carefully.
8. What matrix size works best here?
Small and medium chains are best for readable reporting. This page supports two to eight states, which keeps the matrix, chart, and exported summaries practical for everyday analysis.