Finite Math

Markov Chain Calculator

Enter the row-stochastic transition matrix P and an initial distribution p₀. The calculator left-multiplies p₀ by P at each step to track how the distribution evolves, then solves (Pᵀ − I)·π = 0 with Σ πᵢ = 1 to find the steady-state distribution.

Markov Chain Calculator

Iterate the distribution and find the steady-state vector π.

Try:
Answerp5 = (0.57247, 0.42753); π = (0.571429, 0.428571)
  1. Transition matrix2×2 [0.7, 0.3; 0.4, 0.6]
  2. Initial distributionp₀ = (1, 0)
  3. Step 1p1 = (0.7, 0.3)
  4. Step 2p2 = (0.61, 0.39)
  5. Step 3p3 = (0.583, 0.417)
  6. Step 4p4 = (0.5749, 0.4251)
  7. Step 5p5 = (0.57247, 0.42753)
  8. Steady-state distributionπ = (0.571429, 0.428571)

Worked examples

Frequently asked questions

What does row-stochastic mean?

Each row of P is a probability distribution: every entry is between 0 and 1, and the row sums to 1.

Why might the steady state not be unique?

If the chain is periodic or reducible, the steady-state equation has more than one solution. The calculator flags this when it cannot solve uniquely.

How is the distribution updated?

By left-multiplication: pₖ₊₁ⱼ = Σᵢ pₖᵢ · Pᵢⱼ. The new entry in column j is the dot product of the current distribution with column j of P.