Thought Toys · Chance & inference · Exhibit 30

Markov chains

Two clouds of possibility, released from opposite corners of the same six-state ring, hop on identical fixed odds. There is one hair's-breadth setting that decides whether they chase each other forever or quietly become indistinguishable — the long run forgetting exactly where each one began.

Six states arranged on a ring, with an amber cloud released at the top state and a cyan cloud released at the opposite state. Each step, the mass at a state either stays (self-loop) or moves one step clockwise, in the fraction shown by the stickiness dial. Circle size at each state shows how much of each cloud's probability currently sits there. A strip below the ring plots how far apart the two clouds are over time.

Press play and watch.

your turn — drag stickiness down to 0 and watch them stop converging

What you're seeing

Six states sit on a ring. Each step, every bit of "possibility" at a state either stays put — with probability r, the stickiness dial — or hops one state clockwise, with probability 1−r. That's the whole rule: fixed odds, applied identically everywhere, forever.

Now release two clouds. Cloud A starts entirely at state 0; cloud B starts entirely at the opposite state, 3. Circle size at each state shows how much of that cloud is currently there — a big circle is a near-certainty, a tiny one is almost nothing. Watch what happens as they hop: with the dial above zero, both clouds spread out, wash over the whole ring, and settle down to exactly the same steady mix — one-sixth of the mass on every state, no matter that they began on opposite sides. The long run forgot where each one started.

Drag the dial down to exactly 0 and something different happens: nothing spreads at all. With no chance of staying, every step is a forced, perfect hop — the two clouds stay pinned as single dots, chasing each other around the ring in lockstep, forever the same distance apart. At r=0 the walk has a fixed period (it returns to where it started every 6 steps, on the nose), and a periodic chain — one where returns are only possible at multiples of some fixed number of steps can never settle into one steady distribution. The instant you nudge the dial off zero, even to 0.01, a tiny chance of staying breaks that rigid rhythm, and convergence — slow at first — becomes not just possible but certain.

The rule, exactly. A step multiplies the current probability vector v by the transition matrix P, where P(i,i) = r and P(ii+1 mod 6) = 1−r: vt+1 = vt · P Because every row and every column of P sums to 1, the uniform distribution (1/6 each) is always stationary — for every r, including 0. What changes at r=0 is not the stationary point but whether anything actually reaches it: at r=0, every eigenvalue of P has modulus exactly 1 (the signature of a periodic chain), so there is no decaying mode at all and the clouds orbit forever without merging. The instant r>0, the self-loop breaks the period, the second-largest eigenvalue modulus drops strictly below 1, and the total-variation distance between the two clouds decays geometrically toward 0. Verified in node (improve/verify/30-markov.js): rows and columns of P sum to 1 for every r; two clouds started at any of the 30 distinct opposite pairs converge to under 1e-5 apart within 300 steps at r=0.2; and mixing time is U-shaped — slow near both r=0 (periodic) and r→1 (almost frozen), fastest near the middle. Counter-examples: at r=0 the total-variation distance is pinned at exactly 1 for 500 straight steps — never dipping, confirming this isn't just "slow," it never converges at all. And even with plenty of stickiness, a reducible chain — one split into separate islands with no path between them keeps every cloud trapped in its own island forever: a shared stationary distribution needs the ring to be fully connected (irreducible), not just aperiodic.

Also in Chance & inference: Averages that never settle →

All 16 in Chance & inference
  1. 05The Galton board
  2. 06The Monty Hall problem
  3. 09Bayes' theorem
  4. 13Buffon's needle
  5. 14The central limit theorem
  6. 28Simpson's paradox
  7. 30Markov chains — you are here
  8. 31Averages that never settle
  9. 35The birthday paradox
  10. 38The drunkard's walk
  11. 39Zipf's law
  12. 40Benford's law
  13. 42The coupon collector's problem
  14. 48The wisdom of crowds
  15. 52Genetic drift
  16. 63The gaps are chaos. The count is law.

← the cabinet · Thought Toys — a cabinet of explorable explanations. Exhibit 30.