4.10.27 · D1Advanced Topics (Elite Level)

Foundations — Stochastic processes — Markov chains, steady-state, random walks

3,190 words15 min readBack to topic

Before you can read the parent note, you need to earn every symbol it uses. Below, each item is: plain words → the picture → why the topic needs it. They are ordered so each one only leans on the ones above it.


1. A "state" and the state space

The picture: think of lily pads floating on a pond. Each pad is a state. If there are pads, the frog is always sitting on exactly one of pads , , or — never between them, never on two at once.

The collection of all pads is the state space, written . The curly braces just mean "the set of all these things," and is however many there are.

Figure — Stochastic processes — Markov chains, steady-state, random walks
Figure s01 — three lily pads labelled 1, 2, 3 (the state space) with a single frog dot resting on pad 2, captioned "the frog sits on exactly one state now." If the image does not load: picture a pond with three numbered pads and one frog on the middle one.


2. Time steps and the sequence

The picture: film the hopping frog. Freeze frame : the frog is on some pad — call that value . Freeze frame : it's on some pad now — that's . Each freeze-frame gives one letter in the sequence

Why the funny capital ? Because at each frame the outcome is uncertain until it happens. A quantity whose value is decided by chance is called a random variable. The subscript is time, not a power.


3. Probability

The picture: a pie chart of possibilities. If the frog on pad 1 jumps to pad 2 half the time you watch it, the "jump to 2" slice fills half the pie: .

The vertical bar "" inside, as in , is read "given" — it means "the probability of , knowing that already happened." It narrows the pie down to only the cases where is true.


3b. The Law of Total Probability (stated here, in full)

We will need one law by name to build the update rule later, so let us state it now — self-contained, no clicking away.

In words: to get the total chance of , split into every possible starting situation , multiply "how likely that situation is" () by "how likely is from there" (), and add all the pieces.

The picture: the pie of "all ways to reach " is cut into slices, one slice per starting situation ; each slice's size is ; adding the slices rebuilds the whole -pie.

For the deeper treatment and proofs, see Law of Total Probability.


4. The Markov property (memorylessness)

Reading it left to right: the left side says "chance of landing on pad next, given the entire history — where I am now () and every pad I visited before." The right side throws all the old history away and keeps only . The equals sign claims: they are the same number.

The picture: cover up the whole film reel except the current frame. The Markov property says you can still predict the next frame just as well — the covered-up past told you nothing extra.


5. The transition matrix and the entry

The picture: a table. Rows are labelled "where I am now," columns "where I go next." To find the chance of going from pad 1 to pad 2, look down row 1, across to column 2.

Figure — Stochastic processes — Markov chains, steady-state, random walks
Figure s02 — a 3×3 grid of transition probabilities with rows labelled "from 1/2/3" and columns "to 1/2/3"; the cell is highlighted, and a note reminds "each row sums to 1." If the image does not load: imagine a table where reading across any row gives probabilities that add to 1.

Why every row must sum to 1

The big sigma is just shorthand for "add these up as runs from 1 to ": .

Why it equals 1: from pad the frog must land somewhere next step. "Somewhere" is certain, and certainty is probability . So the whole row (all destinations) adds to . A grid where every row sums to 1 is called row-stochastic.


6. The probability vector (and )

The picture: instead of pinning the frog to one pad, imagine a cloud of probability smeared across the pads — 60% chance on pad 1, 40% on pad 2 would be the row . The heights of these bars add to one full unit of certainty.

The Greek letter (say "pie") is just a name — here it has nothing to do with 3.14159. The superscript in brackets is a time label (again, not a power); when we drop it and write plain , we mean the special "settled" list from Section 8.

Figure — Stochastic processes — Markov chains, steady-state, random walks
Figure s03 — two bar charts side by side: the left one shows as three bars, an arrow labelled "×P" points right, and the right one shows the updated ; both sets of bars add to 1. If the image does not load: picture three probability bars being reshuffled into three new bars by multiplying by P.


7. Vector × matrix: what actually computes

Why this exact combination? It is the Law of Total Probability from Section 3b, applied with "in state next step" and "in state now": and , so . Sum over every possible "where you were" . That summing-and-weighting is what "row vector times matrix" means.

The picture: each column of is a set of "pipes" pouring probability into pad . Multiply each incoming pipe by how much probability sits at its source, pour it all into the bucket . The refilled buckets are the new vector.

Recall Why row × matrix and not matrix × column?

Because we summed over the current state , which is the row index of . Summing over a row index is exactly a left-multiplication .


8. The stationary distribution

The picture: the probability cloud finally stops sloshing. Every pad's height is exactly refilled by what pours in — the buckets look identical before and after a step. The frog still hops, but the cloud is frozen.


9. Eigenvalue / eigenvector — the deep reason exists

The picture: most vectors get both stretched and rotated by a matrix. An eigenvector is a rare arrow lying on a "special axis" — the matrix slides it along its own line, only lengthening or shrinking it by factor .

Look at the stationary equation again: it is . So is a left eigenvector of with eigenvalue — the direction leaves completely unchanged. That is why the topic reaches for eigenvectors at all: "unchanged by the step" is literally the eigenvalue-1 equation.

For the full machinery, see Linear Algebra — Eigenvalues and Eigenvectors; for why it's unique and reached, see the Perron–Frobenius Theorem.


10. Expected value, variance, and the spread (random walks)

Worked step for a single coin-flip step (value with prob , with prob ): using .

Why the square root shows up: in a coin-flip walk of steps, the average position is (left cancels right), but the variances add to (one unit per independent step). The natural "width" is the square root of the variance, — so after hops the frog typically strays a distance about , not . This slow spreading is the seed of the Central Limit Theorem and Diffusion and Brownian Motion.


Prerequisite map

States and state space

Time steps and X_t

Probability and given

Law of Total Probability

Markov property

Transition matrix P

Rows sum to 1

Probability vector pi

Vector times matrix pi P

Stationary pi equals pi P

Left eigenvector and eigenvalue

Expected value and variance

Random walk spread root n

Markov chains topic

Every arrow means "you need the box behind before the box ahead." This whole map feeds the parent topic the Markov chains topic, and its endpoints reach out to Google PageRank, which is just a stationary distribution on the web.


Equipment checklist

Cover the right side and answer aloud. If you stumble, reread that section above.

What is a state and what real-life picture matches it?
One possible situation the system can be in at a moment; a lily pad the frog can sit on.
In , what does the subscript mean?
The time step (step 2), not a power. is the random state at time .
Read in plain English.
The probability of given that has happened.
State the Law of Total Probability.
over mutually exclusive, exhaustive situations .
State the Markov property in one sentence.
The chance of the next state depends only on the current state, not on the past path.
In , which subscript is "from" and which is "to"?
(row) is from, (column) is to — "from is the row."
Why must each row of sum to 1?
From any state you must land somewhere next step, and "somewhere" is certain (probability 1).
Is a row or a column vector, and why does it matter?
A row vector; so the update is (left-multiply), not .
What does compute, and which law is it?
The new probability of state , via the Law of Total Probability (sum over where you were).
What is the difference between a left and a right eigenvector?
Right: column with . Left: row with is a left eigenvector.
What does the bold symbol mean and what is ?
A column vector of all ones; , so eigenvalue 1 exists.
Give the formulas for and .
and .
After random-walk steps (n = steps), is the typical stray distance or , and why?
: the mean is 0 (steps cancel) but variances add to , and width is .

Connections

  • Law of Total Probability — the "sum over where you were" behind .
  • Linear Algebra — Eigenvalues and Eigenvectors — the idea used for .
  • Perron–Frobenius Theorem — why eigenvalue 1 is special, unique, and reached.
  • Central Limit Theorem — where the spread leads.
  • Diffusion and Brownian Motion — the continuous cousin of the random walk.
  • Google PageRank — a giant stationary distribution in the wild.