Skip to content
OneKitly

After Eight Steps the Chain Has Forgotten Where It Started

Published 11/27/2026 · 3 min read · Developer tools

Lena Hoffmann

Lena Hoffmann — Science & education writer at OneKitly

Mathematics · Physics

Checked against 2 sources

View profile →
In short

Give the calculator a transition matrix where sunny stays sunny 80% of the time, cloudy returns to sunny 40% and rain returns to sunny 30%, and it converges to a single distribution: 65.1% sunny, 25.3% cloudy, 9.6% rain. Start from certain sunshine and after one day the chain reads 80/15/5, after four days 66/25/9, after eight days 65.1/25.3/9.6. Start from certain rain instead and it arrives at the same three numbers. The starting state changes the first few days and nothing after that.

Advertisement

Start sunny, start rainy or start undecided: the same three-state weather chain settles on 65%, 25%, 10% every time, and most of the way there in a week.

The steady state is a rate, not a forecast

It says that in the long run 9.6% of days are rainy, not that any particular day has a 9.6% chance once you know today's weather. It also gives the mean return time for free: the average gap between rainy days is one over 0.096, about 10.4 days, and between sunny days one over 0.651, about 1.5. That inverse relationship holds for every state of every irreducible chain and is often the number people actually want — how long until this happens again.

Two conditions, and both can fail quietly

A unique steady state requires that every state can reach every other, and that the chain is not locked into a cycle. Add an absorbing state — a customer who cancels and never returns — and the long-run answer becomes trivially "everyone ends up there". Build a chain that alternates strictly between two groups and the distribution oscillates forever instead of settling. The calculator iterates the matrix until it stops moving, so a chain that does not converge shows up as a result that keeps changing, which is the honest signal that the model, not the arithmetic, needs attention.

Sunny
Starting from a certain sunny day
DaySunnyRain
180.0%5.0%
466.3%9.2%
865.1%9.6%
Steady state65.1%9.6%
Markov chain steady state calculatorThe long-run distribution of a Markov chain: the probabilities the system settles into no matter where it starts. Enter the transition matrix (each row a state's outgoing probabilities) and it solves π·P = π by power iteration, showing the steady-state probability of each state.Try the tool →
Advertisement

Frequently asked questions

Where do the transition numbers come from?
From counting. Take a history of states, count how many times each state was followed by each other state, and divide each row by its own total. The quality of the model is entirely the quality of that counting: a rare state observed twice gives a row of transition probabilities that is mostly noise, and the steady state inherits that noise without warning. Rows with few observations should be widened or merged rather than reported to three decimals.
Is real weather a Markov chain?
Not really, and the example is a teaching device rather than a forecast. A Markov chain assumes the next state depends only on the current one, and weather depends on pressure systems that have been moving for days. Where the assumption genuinely holds is in queues, machine states, page navigation, credit ratings and text prediction — anywhere the present summarises the past well enough that the history adds little.

Articles you may find interesting

All guides →

Related tools

Sources

Spotted a mistake in this article?