2-State Markov Chain Stationary Distribution (π₁, π₂) & Mixing Time Calculator

Solve πP = π for steady-state probabilities (π₁, π₂) and n-step transition probabilities.

Stationary Probability of State 1 (π₁)
70 %
Stationary Probability of State 2 (π₂) 30 %
n-Step Probability P(X_5=1 | X_0=1) 70.938 %
Second Eigenvalue Convergence Rate (λ₂) 0.5 λ₂
Inputs
⚡ Scenarios:
p(1→2)
Transition probability α from State 1 to State 2 per step (0.01 to 0.99).
p(2→1)
Transition probability β from State 2 to State 1 per step (0.01 to 0.99).
steps
Number of steps n to project P^n.
Results & Graph
Stationary Probability of State 1 (π₁)
70 %
Stationary Probability of State 2 (π₂)
30 %
n-Step Probability P(X_5=1 | X_0=1)
70.938 %
Second Eigenvalue Convergence Rate (λ₂)
0.5 λ₂

Stationary Probability of State 1 (π₁)

Graph 1 • Markov Stationary Distribution • Domain Architecture & Live Telemetry Maps Transition Prob1 To2 Alpha, Transition Prob2 To1 Beta, Steps To Project N through Markov Stationary Distribution Formula.
Stationary Probability of Stat: 70 % Markov Stationary Distribution • Invariants & Metrics Stationary Probability of St 70 % Stationary Probability of St 30 % n-Step Probability P(X_5=1 | 70.938 % Second Eigenvalue Convergenc 0.5 λ₂
Graph 2 • Stationary Probability of State 1 (π₁) Across Transition Prob1 To2 Alpha Sweep (40% → 160%) Evaluates π₁ = p_{2→1} / (p_{1→2} + p_{2→1}); π₂ = p_{1→2} / (p_{1→2} + p_{2→1}) across 7 operating points (current input highlighted).
0 % 46.95 % 93.90 % 85.37 0.0600 79.55 0.0900 74.47 0.120 70 0.150 66.04 0.180 62.50 0.210 59.32 0.240
Graph 3 • Joint Sensitivity: Transition Prob1 To2 Alpha × Transition Prob2 To1 Beta Compares Stationary Probability of State 1 (π₁) when Transition Prob2 To1 Beta is shifted +25% (solid) vs. −25% (dashed).
0 % 44.35 % 88.71 % --- Transition Prob2 To1 Beta @ 75% 80.64 -30% 77.43 -15% 74.47 +0% 71.72 +15% 69.17 +30%
Summary: Long-run stationary distribution is π₁ = 70% and π₂ = 30% (mean return times 1.43 and 3.33 steps; P₁₁(5) = 70.94%).
Summary: Long-run stationary distribution is π₁ = 70% and π₂ = 30% (mean return times 1.43 and 3.33 steps; P₁₁(5) = 70.94%).
Interactive chart & math engine powered by CalculatorGraph

Formula & Mathematical Methodology: Markov Stationary Distribution Formula

π₁ = p2→1 / (p1→2 + p2→1)
π₂ = p1→2 / (p1→2 + p2→1)
λ₂ = 1 − p1→2 − p2→1
π₁ = p_{2→1} / (p_{1→2} + p_{2→1}); π₂ = p_{1→2} / (p_{1→2} + p_{2→1}); λ₂ = 1 − p_{1→2} − p_{2→1}
  • transitionProb1To2Alpha: Transition Prob1 To2 Alpha (p(1→2))
  • transitionProb2To1Beta: Transition Prob2 To1 Beta (p(2→1))
  • stepsToProjectN: Steps To Project N (steps)

Rounding: Internal floating-point calculations run in 64-bit IEEE-754 double precision; display values round to 2–4 decimal places.

Worked Example: Worked Mathematical Example: Markov Stationary Distribution

Solve πP = π for steady-state probabilities (π₁, π₂) and n-step transition probabilities.

  1. Specify the function parameters, matrix entries, or confusion matrix counts.
  2. Apply the closed-form or iterative formula: π₁ = p_{2→1} / (p_{1→2} + p_{2→1}); π₂ = p_{1→2} / (p_{1→2} + p_{2→1}); λ₂ = 1 − p_{1→2} − p_{2→1}.
  3. Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Markov Stationary Distribution via π₁ = p_{2→1} / (p_{1→2} + p_{2→1}); π₂ = p_{1→2} / (p_{1→2} + p_{2→1}); λ₂ = 1 − p_{1→2} − p_{2→1}.

Frequently Asked Questions

How does the 2-State Markov Chain Stationary Distribution (π₁, π₂) & Mixing Time Calculator compute the solution?

It evaluates π₁ = p_{2→1} / (p_{1→2} + p_{2→1}); π₂ = p_{1→2} / (p_{1→2} + p_{2→1}); λ₂ = 1 − p_{1→2} − p_{2→1} directly in your browser and updates three custom SVG visualizations in real time.

Can I solve backwards for an input parameter using Goal Seek?

Yes. Click "🎯 Goal Seek" in the results toolbar to solve backwards for any numeric input field.

Does this calculator run locally offline?

Yes. All calculations run 100% locally in your browser and work offline via the CalculatorGraph PWA.

Mathematics & Statistics · Game Theory, Ratings & Stochastic Processes

2-State Markov Chain Stationary Distribution (π₁, π₂) & Mixing Time Calculator: inputs, method, and how to read the result

Solve πP = π for steady-state probabilities (π₁, π₂) and n-step transition probabilities.

Choose inputs for the case you are checking

The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.

  • Transition Prob1 To2 Alpha: Transition probability α from State 1 to State 2 per step (0.01 to 0.99).
  • Transition Prob2 To1 Beta: Transition probability β from State 2 to State 1 per step (0.01 to 0.99).
  • Steps To Project N: Number of steps n to project P^n.

What the calculation includes

With the default values shown, Stationary Probability of State 1 (π₁) is 70 %. The calculation follows Markov Stationary Distribution Formula; the formula and variable definitions above show how the inputs combine.

One-input check: With the other defaults held constant, changing Transition Prob1 To2 Alpha from 0.15 p(1→2) to 0.17 p(1→2) changes Stationary Probability of State 1 (π₁) from 70 % to 67.308 %. This is a comparison inside the calculator's stated model, not a prediction.

Where to use caution

  • Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
  • Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.

Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.

More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.