Paritian

Statistics

Two-State Markov Chain Calculator (Weather Model, Steady State)

The chance of being in each of two states after any number of steps, and the long-run share of time in each, from the two switching probabilities.

Results

Chance of being in state A after n steps 68.80 %
Chance of being in state B after n steps 31.20 %
Long-run share of time in state A 66.67 %
Long-run share of time in state B 33.33 %
Memory factor (1 − p − q) 0.4000
How it changes
Chance of being in state A after n stepsNumber of steps to look ahead 0 – 30. Chance of being in state A after n steps: 100 → 66.6667; Long-run share of time in state A: 66.6667 → 66.6667Chance of being in state A after n stepsLong-run share of time in state A020406080100051015202530Number of steps to look ahead

The dashed line marks the value you entered.

What this tool does

A two-state Markov chain — sunny and rainy, working and broken, subscribed and cancelled — forgets its past: tomorrow depends only on today. The long-run split is q ÷ (p + q) whatever you start with, and the factor 1 − p − q says how fast the start is forgotten: the closer it is to 0, the sooner the chain settles. A negative factor means the chain tends to alternate. Real weather or customers rarely switch with constant probabilities, so treat the result as a model, not a forecast.

Formula

steady state: π_A = q ÷ (p + q) · after n steps: P_A(n) = π_A + (P_A(0) − π_A)(1 − p − q)ⁿ

Variables

SymbolMeaningUnit
pChance of going from state A to B in one step%
qChance of going from state B to A in one step%
nNumber of steps to look ahead—
sChance of starting in state A%
PAChance of being in state A after n steps%
PBChance of being in state B after n steps%
SALong-run share of time in state A%
SBLong-run share of time in state B%
LAMemory factor (1 − p − q)—

Worked example

  • Chance of going from state A to B in one step20 %
  • Chance of going from state B to A in one step40 %
  • Number of steps to look ahead3
  • Chance of starting in state A100 %
  • Chance of being in state A after n steps68.80 %
  • Chance of being in state B after n steps31.20 %
  • Long-run share of time in state A66.67 %
  • Long-run share of time in state B33.33 %
  • Memory factor (1 − p − q)0.4000

Limitations

  • The formula assumes ideal conditions: no friction losses, no air resistance and no efficiency losses unless you enter them.
  • The result is an estimate based only on the values you type. Real situations often include factors this calculator does not know about.