Markov Chain Convergence Rate Calculator

Measure convergence strength, mixing time, and steady-state proximity precisely. Visualize distance decay with clear curves. Test matrices using reliable diagnostics and export concise summaries.

Calculator Input

Enter a square transition matrix. Use commas or spaces between values, and place each row on a new line.

Example: 0.7 0.2 0.1
Use one row such as: 1, 0, 0
Optional labels separated by commas or lines.
Common mixing targets are 0.1, 0.05, and 0.01.
More steps reveal slower convergence patterns.
Used for the stationary distribution solver.

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

  1. Enter a square transition matrix with non-negative probabilities.
  2. Provide the initial distribution for the starting state mix.
  3. Add matching labels for each state, or leave defaults.
  4. Choose epsilon to define your convergence threshold.
  5. Set simulation steps and stationary solver iterations.
  6. Enable normalization if your rows are close to one.
  7. Click Calculate Convergence to generate the report.
  8. Review steady-state values, contraction metrics, and the distance plot.
  9. 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.

Related Calculators

state transition diagram toolforward algorithm calculatorstationary distribution solverviterbi path calculatorgoogle matrix calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.