google.com, pub-8308647970737773, DIRECT, f08c47fec0942fa0

Markov Chain Stationary Distribution Calculator

Markov Chain Stationary Distribution Calculator

Calculate the stationary distribution of a 2-state or 3-state Markov chain given its transition probability matrix.

Choose number of states

Formulas Used

The stationary distribution \\( \pi \\) of a Markov chain satisfies \\( \pi P = \pi \\), where \\( P \\) is the transition matrix, and the sum of probabilities in \\( \pi \\) equals 1.

  1. Stationary Distribution Equation:

    \\[ \pi P = \pi \\]

    Where:

    • \\( \pi = [\pi_1, \pi_2, \dots, \pi_n] \\): Stationary distribution
    • \\( P \\): Transition probability matrix

  2. Normalization Condition:

    \\[ \pi_1 + \pi_2 + \dots + \pi_n = 1 \\]

  3. Solving for 2×2 Matrix:

    For \\( P = \begin{bmatrix} p_{11} & p_{12} \\ p_{21} & p_{22} \end{bmatrix} \\), solve:

    \\[ \pi_1 p_{11} + \pi_2 p_{21} = \pi_1 \\]

    \\[ \pi_1 p_{12} + \pi_2 p_{22} = \pi_2 \\]

    \\[ \pi_1 + \pi_2 = 1 \\]

    Result: \\( \pi_1 = \frac{p_{21}}{p_{12} + p_{21}}, \pi_2 = \frac{p_{12}}{p_{12} + p_{21}} \\)

  4. Solving for 3×3 Matrix:

    For a 3×3 matrix, solve the system \\( \pi (P – I) = 0 \\) with \\( \pi_1 + \pi_2 + \pi_3 = 1 \\).

Example Calculations

Example 1: 2×2 Matrix

Input: Transition Matrix = \\( \begin{bmatrix} 0.7 & 0.3 \\ 0.4 & 0.6 \end{bmatrix} \\)

Calculations:

  • Stationary distribution: \\[ \pi_1 = \frac{0.4}{0.3 + 0.4} = \frac{0.4}{0.7} \approx 0.5714 \\]
  • \\[ \pi_2 = \frac{0.3}{0.3 + 0.4} = \frac{0.3}{0.7} \approx 0.4286 \\]
  • Verification: \\[ 0.5714 + 0.4286 = 1 \\]

Result: Stationary Distribution = [0.5714, 0.4286]

Example 2: 3×3 Matrix

Input: Transition Matrix = \\( \begin{bmatrix} 0.5 & 0.3 & 0.2 \\ 0.3 & 0.4 & 0.3 \\ 0.2 & 0.3 & 0.5 \end{bmatrix} \\)

Calculations:

  • Solve: \\( \pi_1 = \pi_2 = \pi_3 = \frac{1}{3} \approx 0.3333 \\)
  • Verification: \\[ 0.3333 + 0.3333 + 0.3333 = 1 \\]

Result: Stationary Distribution = [0.3333, 0.3333, 0.3333]

How to Use the Calculator

Follow these steps to calculate the stationary distribution of a Markov chain:

  1. Select Matrix Size: Choose 2×2 or 3×3 for the number of states.
  2. Enter Transition Probabilities: Input probabilities (0 to 1) for each matrix element. Each row must sum to 1.
  3. Calculate: Click “Calculate Stationary Distribution” to see the result.
  4. Interpret Result: The result shows the stationary distribution with calculations.
  5. Share or Embed: Use the share buttons to post results on social media, copy the result, or get an embed code.

Note: Probabilities must be between 0 and 1, and each row must sum to 1 (within 0.01 tolerance). The chain is assumed to be irreducible and aperiodic. Invalid inputs will prompt an error.

Related Calculators

  1. Quadratic Residue Checker
  2. Diophantine Equation Solver
  3. Modular Exponentiation Solver
  4. Stokes Flow Simulator
  5. Determinant Calculator
  6. Mid-Point Calculator
  7. More Math Calculators