Invariant Probability Calculator

Solve long-run probabilities from two or three states. Check normalization, convergence, and matrix validity automatically. Download clean outputs for analysis, teaching, audits, and planning.

Calculator Inputs

Use the responsive grid below for setup and matrix entry.

State Labels
Initial Distribution
Transition Row 1
Transition Row 2
Transition Row 3

Formula Used

An invariant probability vector is also called a stationary distribution. It satisfies the equation πP = π, where P is the transition matrix.

The vector must also satisfy the normalization rule Σπᵢ = 1. This page solves those equations and checks iterative convergence from the chosen starting distribution.

Invariant rule: πP = π
Normalization rule: π1 + π2 + π3 = 1
Iteration rule: v(k+1) = v(k)P

For a two-state chain with transition matrix [[1-a, a], [b, 1-b]], the invariant distribution becomes [b/(a+b), a/(a+b)] whenever a+b is positive.

How to Use This Calculator

  1. Select either 2 states or 3 states.
  2. Enter clear labels for each state.
  3. Provide an initial distribution. Any positive totals work.
  4. Enter the transition matrix values by row.
  5. Enable auto-normalize when rows are approximate.
  6. Set precision, tolerance, and iteration limit.
  7. Click the calculate button.
  8. Review the invariant vector, charts, diagnostics, and exports.

Example Data Table

Example Transition Matrix Invariant Distribution Notes
Two-state loyalty model [[0.80, 0.20], [0.40, 0.60]] [0.666667, 0.333333] State 1 keeps the larger long-run share.
Three-state balanced system [[0.50, 0.25, 0.25], [0.30, 0.40, 0.30], [0.20, 0.35, 0.45]] [0.333333, 0.333333, 0.333333] Each column also sums to one.
Three-state uneven system [[0.70, 0.20, 0.10], [0.10, 0.70, 0.20], [0.30, 0.20, 0.50]] Approximately [0.375000, 0.437500, 0.187500] State 2 dominates the long-run mix.

FAQs

1. What does invariant probability mean?

It is the long-run probability vector that remains unchanged after multiplication by the transition matrix. In Markov chain work, it is usually called the stationary distribution.

2. Why must each row sum to one?

Each row represents all possible next-state outcomes from one current state. Those outcomes must cover the full probability mass, so every row total should equal one.

3. Why does the tool normalize rows automatically?

Real inputs are often rounded. Auto-normalization rescales each row to a valid probability row while preserving the row’s relative proportions.

4. Why is an initial distribution required?

The exact solver does not need it, but the convergence plot does. The iterative path begins from your starting probabilities and shows how they move toward the stable pattern.

5. Can reducible chains have more than one invariant distribution?

Yes. Reducible systems may admit multiple invariant vectors. In that case, a unique long-run distribution is not guaranteed for every starting point.

6. What does the convergence chart show?

It tracks each state’s probability across repeated matrix multiplications. Flat lines near the end indicate that the iterative distribution has stabilized.

7. When should I increase iterations or lower tolerance?

Increase iterations when convergence is slow. Lower tolerance when you need tighter numerical agreement between successive iterations and the exact stationary solution.

8. What can I do with the CSV and PDF exports?

CSV is useful for audits, spreadsheets, and reproducible records. PDF is useful for reports, teaching notes, and stakeholder sharing.

Related Calculators

cox proportional hazards calculatordifference in differences calculatorintraclass correlation calculatorbayesian information criterion calculatorautoregressive model calculatorwald test calculatormarkov chain periodicity 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.