Markov Chains

Learn to model processes that move between states in steps, such as weather from day to day, a machine that breaks and is repaired, or a surfer clicking through web pages. Build transition matrices, compute probabilities several steps ahead with matrix powers, and classify states as recurrent, transient, periodic or absorbing. Find stationary distributions, interpret them as long-run fractions of time and mean return times, and see when a chain converges to them. Finish with reversibility and detailed balance, random walks on networks, and how PageRank ranks web pages.

IntermediateLesson 9 of 9 in Probability Theory Course

What you will learn

  1. Describe a process that moves between states in steps, decide whether the Markov property fits it, and write the model as a transition matrix and a diagram.
    • State the Markov property and choose the states
      Define a discrete-time Markov chain, explain what the Markov property says and does not say, and choose a state that carries all the information the future needs.
    • Build and read transition matrices and diagrams
      Write the one-step probabilities of a chain as a transition matrix and a transition diagram, check that they form a valid model, and compute the probability of a path.
  2. Use powers of the transition matrix to find the probability of moving between states in several steps, and track the distribution of the chain over time.
    • Find n-step transition probabilities with matrix powers
      Derive the n-step transition probabilities by conditioning on intermediate states, compute them as matrix powers, and use the Chapman–Kolmogorov equations.
    • Track the distribution of the chain over time
      Compute the distribution of the state at a later step from the initial distribution, tell conditional from unconditional probabilities, and find expected values of quantities that depend on the state.
  3. Read the structure of a chain from its diagram: which states communicate, which are visited again and again, which are eventually left for good, how returns are spaced in time, and where an absorbing chain ends up.
    • Find communicating classes and test irreducibility
      Decide which states can reach which, split the states into communicating classes, and recognize closed classes, absorbing states and irreducible chains.
    • Tell recurrent states from transient states
      Define recurrence and transience through the probability of returning, describe how often each kind of state is visited, and classify the states of finite chains from their classes.
    • Find the period of a state
      Compute the period of a state from its possible return times, recognize aperiodic chains, and explain why periodic chains behave differently in the long run.
    • Compute absorption probabilities and expected steps by first-step analysis
      Set up and solve first-step equations for the probability of reaching a target and the expected number of steps it takes, including the gambler's ruin chain.
  4. Solve for the distributions that a chain leaves unchanged, know when such a distribution exists and is unique, and explain when and how fast the chain converges to it.
    • Solve for a stationary distribution
      Define a stationary distribution, set up and solve its balance equations, and check a proposed answer.
    • Know when a stationary distribution is unique and what it means
      State the existence and uniqueness results for finite chains, and interpret the stationary distribution through return times and long-run fractions of time.
    • Decide whether a chain converges to its stationary distribution
      State the convergence theorem for finite chains, recognize the cases where convergence fails, and describe how fast the distribution approaches equilibrium.
  5. Recognize reversible chains through detailed balance, find the stationary distribution of a random walk on a network, and compute and interpret PageRank as the stationary distribution of a modified random walk on the web.
    • Check reversibility with detailed balance
      Define detailed balance and reversibility, prove that detailed balance gives a stationary distribution, and use it to solve chains such as birth–death chains.
    • Analyze random walks on graphs
      Write the transition probabilities of a random walk on an undirected network, find its stationary distribution from the degrees, and decide whether the walk is irreducible and aperiodic.
    • Compute PageRank as a stationary distribution
      Model web browsing as a Markov chain, repair the problems of dangling pages and disconnected parts with teleportation, and compute PageRank by solving equations or by power iteration.

Markov Chains study guide

5 chapters

1

Model random processes with Markov chains

A useful chain begins with a state that holds the information needed for the next move. Choosing too little information changes the model, even if its matrix looks valid. Connect the Markov property to practical state choices, then turn one-step rules into matrices, diagrams, and path probabilities. The order of the states and the meaning of each conditional probability will carry through every later calculation.

1.1 What the present state needs to remember

A machine can be working today and broken tomorrow. A Markov chain describes this kind of change as a sequence of random states. The key modeling question is what information each state must carry.

The present screens off the past

Write the sequence as X0,X1,X2,…. The state space lists all possible values of each state. It can be a finite set, such as Working and Broken, or a countable set, such as all integers for a walk that moves one unit at a time.

The Markov property says that once the present state is known, earlier states add no information about the next state:

P(Xn+1=j∣Xn=i,Xn−1=in−1,…,X0=i0)=P(Xn+1=j∣Xn=i).

This equality applies to histories with positive probability. It is a statement about conditional information. It allows tomorrow to depend strongly on today. For example, a broken printer can be much more likely to be broken tomorrow than a working printer is. Unconditional independence would remove that dependence too.

A chain is time-homogeneous when its one-step probabilities stay the same from one step to the next. We then write them as qij without a time index. Time-homogeneity and the Markov property answer different questions: whether the transition rule changes with time, and whether older history matters once the state is known.

Build a state that holds the needed history

Suppose tomorrow's rain probability depends on the last two days. It is 0.7 after Rain–Rain, 0.5 after Rain–Dry or Dry–Rain, and 0.2 after Dry–Dry. Today's weather alone loses useful information. If today is rainy, yesterday being rainy gives probability 0.7 for tomorrow, while yesterday being dry gives 0.5.

Use the pair Yn=(Xn−1,Xn) as the state. Its four values are Rain–Rain, Rain–Dry, Dry–Rain, and Dry–Dry. From Rain–Rain, tomorrow gives Rain–Rain with probability 0.7 or Rain–Dry with probability 0.3. The new pair begins with the old pair's second entry. A direct move from Rain–Rain to Dry–Dry is impossible.

This construction works because the weather rule needs exactly those two days. Adding the relevant history makes the next pair depend only on the current pair. For a printer whose failure rate depends on whether it was repaired yesterday, the state likewise needs a repair-history flag as well as its current working condition.

Recognize other chains

A simple random walk has Sn+1=Sn+1 with probability p and Sn+1=Sn−1 with probability 1−p. The current position determines the distribution of the next position. A player's token count or a token's square on a game board can serve the same role when the next move depends only on that recorded state.

Independent, identically distributed draws also form a Markov chain: their next-state distribution ignores even the present. For a real machine or weather record, justify why the chosen state contains the predictive information. Naming a process a chain cannot make missing information disappear.

Key Takeaways

  • The Markov property removes the extra predictive value of the past once the present state is known.
  • Time-homogeneity means that one-step probabilities stay constant over time.
  • Enlarge a state when older information still changes the next-step distribution.
  • Independent draws are a special case of a Markov chain.

1.2 From transition rules to matrices and paths

A transition matrix collects the one-step rules in one place. A diagram shows the same rules as arrows, making possible routes easier to see. Both representations require a fixed state order.

Read a row as a starting state

With states Working, Broken in that order, a working printer breaks with probability 0.1 and a broken printer is repaired with probability 0.6. The matrix is

Q=(0.90.10.60.4).

The first row describes tomorrow given Working today. Its 0.9 includes staying Working. The second row describes tomorrow given Broken today. In general,

qij=P(Xn+1=j∣Xn=i).

Every entry is nonnegative and every row sums to 1. Such a matrix is stochastic. Columns need not sum to 1: the printer's first column sums to 1.5, which is harmless because its two entries condition on different current states. When columns also sum to 1, the matrix is doubly stochastic.

Draw one node per state. Put an arrow from Working to Broken labeled 0.1 and an arrow back labeled 0.6. Add loops labeled 0.9 and 0.4. Leave out zero-probability arrows. The labels leaving each node must total 1.

Specify how the process begins

The initial distribution is a row vector μ0. Its entry μ0(i) is the probability of starting in state i. A known working printer has μ0=(1,0); a printer working with probability 0.8 has μ0=(0.8,0.2). The matrix gives the same future rule for both, but their early behavior differs.

For a longer example, use states Sunny, Cloudy, Rainy in that order:

Q=(0.60.30.10.30.40.30.20.40.4).

Here qSR=0.1 means rain tomorrow given sunshine today. It does not mean sunshine today given rain tomorrow. Reversing a conditional probability generally changes it.

Multiply along one specified path

Given sunshine today, the probability that the next three days are Sunny, Cloudy, Rainy is

qSSqSCqCR=0.6×0.3×0.3=0.054.

Each factor starts where the previous move ended. The multiplication rule supplies conditional probabilities; the Markov property reduces each one to a one-step transition. For a path that also specifies a random starting state, include its starting probability:

P(X0=i0,…,Xn=in)=μ0(i0)∏t=0n−1qitit+1.

If sunshine initially has probability 0.5, the same complete four-day path has probability 0.027. A conditional path probability leaves out that initial factor because the start is already known.

Check meaning as well as totals

Row totals catch missing loops and many copying errors. They cannot catch every reversed entry: a transposed doubly stochastic matrix still has row sums 1. Read a few entries aloud against the original transition rules. Some references use column distributions and the transposed matrix, so check the convention before multiplying.

To simulate a chain, sample the next state from the row of the current state, then repeat from the new row. For a working printer, choose Broken with probability 0.1 and Working with probability 0.9.

Key Takeaways

  • Row i gives the next-state probabilities conditional on current state i.
  • Entries are nonnegative and each row totals 1, including the chance of staying put.
  • A diagram retains exactly the positive-probability arrows.
  • The initial distribution supplies the starting probabilities.
  • Multiply transition probabilities along a specified path; include the initial probability for a joint path event.
2

Compute probabilities several steps ahead

One-step rules can answer questions many steps into the future, provided every possible route is included. Conditioning on intermediate states turns this task into matrix multiplication. Move from a known start to an uncertain initial distribution, then use the resulting state probabilities to calculate events at several times, expected outputs, and expected visit counts.

2.1 Several steps are sums over possible routes

A probability two steps ahead must account for every possible state in between. Matrix multiplication organizes that sum. Taking an ordinary power of one entry cannot do the same job.

Condition on the intermediate state

Let qij(n) be the probability of being in state j exactly n steps after starting in i. In a time-homogeneous chain it is independent of the calendar starting time. For two steps,

qij(2)=∑kqikqkj=(Q2)ij.

Each product is a route through one intermediate state. The routes are mutually exclusive, so add their probabilities. For the weather matrix with rows (0.6,0.3,0.1), (0.3,0.4,0.3), and (0.2,0.4,0.4), the chance of rain two days after sunshine is

qSR(2)=0.6(0.1)+0.3(0.3)+0.1(0.4)=0.06+0.09+0.04=0.19.

The three terms correspond to tomorrow being sunny, cloudy, or rainy. Squaring 0.1 would apply a sunny-to-rainy move twice, even though the first move has already left the chain in Rainy. It describes no valid two-step path.

The whole two-step matrix is

Q2=(0.470.340.190.360.370.270.320.380.30).

Its rows still sum to 1: after two steps, the chain must be somewhere. Every power of a stochastic matrix is stochastic.

Split a longer journey at any time

The Chapman–Kolmogorov equations extend the same reasoning:

qij(m+n)=∑kqik(m)qkj(n),Qm+n=QmQn.

Look at the state after the first block of steps, then continue for the second block. In particular, the full collection of n-step probabilities is Qn. The zero-step matrix is Q0=I because no move leaves the state unchanged with probability 1.

For the printer matrix with rows (0.9,0.1) and (0.6,0.4),

Q2=(0.870.130.780.22).

One more step gives qWB(3)=0.87(0.1)+0.13(0.4)=0.087+0.052=0.139. Being broken at step 3 allows repairs and failures along the way. It does not require being broken at every earlier step.

Compute larger powers

For two states with move probabilities q12=a and q21=b, where a+b>0,

Qn=1a+b(baba)+(1−a−b)na+b(a−a−bb).

The first matrix has identical rows; the second carries the remaining effect of the starting state. For the printer, qWB(n)=(1−0.3n)/7. Substituting 2 gives 0.13, agreeing with multiplication.

For larger matrices, repeated multiplication or software gives the powers. If Q=VDV−1 is a diagonalization, then Qn=VDnV−1. A diagram can answer whether an entry is positive without computing it: qij(n)>0 exactly when a route of exactly n positive-probability arrows goes from i to j.

Key Takeaways

  • An n-step probability is an entry of Qn.
  • Multiply along each route and add over intermediate states.
  • Chapman–Kolmogorov splits a journey into two blocks of steps.
  • Every matrix power has nonnegative entries and row sums 1.
  • Positive entries of Qn correspond to routes of exactly n arrows.
  • A diagonalization can turn a matrix power into powers of eigenvalues.

2.2 Move a whole distribution forward

A known start selects one row of a matrix power. An uncertain start uses a weighted average of those rows. Keeping these two situations separate prevents many conditional-probability errors.

Update the probability vector

Write μn(j)=P(Xn=j). To reach state j next, the chain can start the step in any state i. The law of total probability gives

μn+1(j)=∑iμn(i)qij,μn+1=μnQ.

Repeating the update gives μn=μ0Qn. All distributions here are row vectors. With a column representation, transpose the matrix too: the corresponding update is μn+1T=QTμnT. Using QμnT mixes conventions.

For the weather chain, the rows in Sunny, Cloudy, Rainy order are (0.6,0.3,0.1), (0.3,0.4,0.3), and (0.2,0.4,0.4). Suppose today is sunny or cloudy with equal probabilities. Then

μ0=(0.5,0.5,0),μ1=(0.45,0.35,0.20).

For example, tomorrow's rain probability is 0.5(0.1)+0.5(0.3)=0.20. This differs from 0.1, the rain probability conditional on a known sunny start. One more update gives

μ2=(0.415,0.355,0.23).

Its sunny entry is 0.45(0.6)+0.35(0.3)+0.20(0.2)=0.27+0.105+0.04=0.415.

Combine information from different times

If the start is known to be i, μ0 puts all mass on i and μn is row i of Qn. With an uncertain start,

P(Xn=j)=∑iμ0(i)qij(n).

For a joint event at steps 2 and 5, first reach j at step 2, then take three more steps to k:

P(X2=j,X5=k)=μ2(j)qjk(3).

The gap is three steps, not five. If step 2's state is already known, an additional observation at step 1 changes nothing about the future transition from step 2. The Markov property gives P(X5=k∣X2=j,X1=i)=qjk(3) whenever the conditioning event has positive probability.

Turn state probabilities into expected values

If a reward or output f(j) belongs to state j, use

E[f(Xn)]=∑jμn(j)f(j).

For a count over several times, define an indicator for being in the state at each time. Linearity of expectation adds their probabilities even though the indicators are dependent:

E[visits to j during steps 1 through n]=∑t=1nμt(j).

A printer working at day 0 has broken-day probabilities 0.1, 0.13, and 0.139 on days 1–3. Its expected number of broken days over that period is 0.369. This is an average over possible paths, so it need not be a whole number.

A distribution describes uncertainty about the state. A nearly unchanged weather distribution can coexist with a path that keeps changing weather. An absorbing path, in contrast, can enter a state and remain there.

Key Takeaways

  • With row distributions, μn=μ0Qn.
  • A known start selects one row; an uncertain start averages rows with the initial probabilities.
  • For events at two times, use the transition matrix power for the time gap.
  • Expected state rewards use probability-weighted values.
  • Expected visit counts add the probabilities at each time, without requiring independence.
3

Classify the states of a Markov chain

The arrangement of positive-probability arrows controls where a chain can go and whether it can return. Separate mutual accessibility from one-way escape, then examine the timing of returns. For chains with absorbing outcomes, first-step equations turn questions about eventual destinations and waiting times into linear systems with carefully chosen boundary values.

3.1 Which states can reach one another?

The arrows of a chain reveal where it can travel, where it can get trapped, and which starting states can ever meet. For these structural questions, only positive versus zero probabilities matter.

Accessibility is directional

State j is accessible from i if a positive-probability route leads from i to j in some number of steps. Write i→j. A route can pass through other states; a direct arrow is unnecessary. We allow a zero-step route from a state to itself.

Two states communicate when each is accessible from the other. Write i↔j. Communication is reflexive, symmetric, and transitive: a route through an intermediate state can be joined to another route. Therefore it partitions the state space into disjoint communicating classes.

To find the classes, choose a state, list the states reachable from it, and keep those that can also get back. Repeat with an unassigned state. A singleton counts as a class even if it has no loop, because the zero-step convention makes it communicate with itself.

Identify closed classes

Consider

Q=(0.50.5000.30.7000.200.40.40001).

States 1 and 2 reach each other. Their rows have no positive entries in columns 3 or 4, so no route can leave their pair. They form a closed class, {1,2}.

State 3 can move to 1 or 4 and can stay at 3. No arrow from any other state comes back to 3. Thus {3} is its own communicating class, and it is not closed. In particular, the arrow from 3 to 4 does not put those states in the same class.

State 4 stays at 4 with probability 1. It is absorbing, and {4} is a closed singleton class. Absorbing states are special closed classes; a larger closed class can keep moving internally forever.

ClassCan leave the class?Internal movement
1 and 2NoBoth directions are possible
3YesCan stay or exit
4NoRemains at 4
Decide whether the chain is irreducible

A chain is irreducible when it has one communicating class containing all its states. Every state can then reach every other, using as many steps as needed. The four-state chain is reducible because its three classes cannot all reach one another.

Both the printer and weather examples are irreducible. Their matrices have every entry positive, which is more than irreducibility requires. A directed cycle is also irreducible even though most one-step transitions have probability zero.

For an irreducibility test, changing a positive arrow's probability without removing it leaves accessibility unchanged, as long as the matrix remains stochastic. Conversely, removing even a very small arrow can split a class if it was the only return route. Follow the directions carefully: a chain that can leave a region but cannot reenter it has a one-way structural boundary.

Key Takeaways

  • Accessibility needs a route in one direction; communication needs routes in both.
  • Communicating classes partition the state space.
  • A closed class has no outgoing arrow to a state outside it.
  • An absorbing state is a closed singleton with a probability-1 loop.
  • Irreducibility means one communicating class, not direct arrows between every pair.

3.2 Returns, escape, and recurrence

A chain can stay near a state for a long time yet eventually leave it forever. Recurrence concerns whether a return is certain, not whether the state looks common during a short simulation.

Start at the state being tested

Let fi be the probability of ever returning to i at a positive time, given X0=i. The state is recurrent if fi=1 and transient if fi<1. The starting visit at time 0 is not a return.

At each return, the Markov property starts the same return experiment again. For a transient state, the number K of returns has probabilities

P(K=k)=fik(1−fi),k=0,1,2,… .

Thus E[K]=fi/(1−fi). Counting the initial visit as well gives an expected total of 1/(1−fi) visits. For a recurrent state, returns repeat infinitely often with probability 1.

Another test adds the probabilities of being back at every positive time:

∑n=1∞qii(n).

This sum is the expected number of returns, by indicator variables and linearity of expectation. It is infinite exactly for recurrent states.

Use closed classes for a finite chain

Recurrence is a class property: communicating states are either all recurrent or all transient. In a finite chain, a communicating class is recurrent exactly when it is closed. Inside a finite closed class there are only finitely many states among which to keep moving. An exit from a nonclosed class creates a genuine chance of leaving that class for good.

For the matrix with rows (0.5,0.5,0,0), (0.3,0.7,0,0), (0.2,0,0.4,0.4), and (0,0,0,1), the classes 1–2 and 4 are closed, so all their states are recurrent. State 3 is transient. Once it exits to 1 or 4, it cannot return.

Starting at 3, a return occurs only if the very next step stays at 3. Hence f3=0.4 and

E[K]=0.40.6=23.

A return at time 1 counts even though the chain never visibly moved away. The expected total number of visits, including time 0, is 5/3.

Every finite chain has at least one closed class and therefore a recurrent class. Every state of a finite irreducible chain is recurrent. A large self-loop by itself is insufficient: a state with a 0.99 chance of staying and a 0.01 chance of entering an inescapable region is still transient.

Infinite spaces change the result

For the simple walk on all integers with up-probability 0<p<1, the whole space is one closed communicating class. The walk is recurrent when p=1/2 and transient when p≠1/2. A persistent drift can carry it away despite the absence of an exit from the state space.

The symmetric walk on the integers returns with probability 1 but has infinite expected return time. This is null recurrence. A recurrent state with finite mean return time is positive recurrent; finite recurrent classes have this stronger property. For symmetric nearest-neighbor walks, Pólya's theorem gives recurrence in one and two dimensions and transience in three or more dimensions.

Key Takeaways

  • Recurrence means certain eventual return from the state itself.
  • A transient state has finitely many visits with probability 1.
  • For a transient state, expected returns exclude time 0 and equal fi/(1−fi).
  • In finite chains, closed communicating classes are exactly the recurrent classes.
  • Closedness alone is insufficient for recurrence on an infinite space.
  • Null recurrence means certain return with infinite mean return time.

3.3 Find the rhythm of possible returns

Some chains can return only on even steps, or only on multiples of three. The period describes this timing restriction. It depends on possible return lengths, not on the probabilities assigned to them.

Take the greatest common divisor

For a state with possible positive-time returns, its period is

d(i)=gcd⁡{n≥1:qii(n)>0}.

The state is aperiodic when this gcd is 1 and periodic when it is greater than 1. All states in a communicating class have the same period. An irreducible chain therefore has a single shared period.

In the deterministic cycle 1→2→3→1, state 1 can return after 3, 6, 9, and so on. The gcd is 3. The same restriction holds at states 2 and 3, even though their routes begin at different positions.

A loop is sufficient, not necessary

A positive self-loop gives a one-step return, so its state's period is 1. In an irreducible chain, one such loop makes every state aperiodic because the period is shared across the class.

Now modify the three-state cycle: from 2, go to 1 or 3 with probability one half each; from 1 go to 2, and from 3 go to 1. State 1 can return in two steps through 1→2→1 or three through 1→2→3→1. Since gcd⁡(2,3)=1, this chain is aperiodic with no loops at all.

The shortest return here takes two steps, but the period is 1. Aperiodicity also does not require a one-step return. The gcd combines the timing information from all return routes.

Understand the flip chain

For

Q=(0110),

a return takes an even number of steps. The period is 2, and

Q2n=I,Q2n+1=Q.

Started at state 1, the probability of being at state 1 alternates between 1 and 0. It cannot approach a single limit. A walk on a connected bipartite undirected graph has the same parity problem: every move switches sides, so a return must use an even number of edges.

Connect period to matrix powers

For a finite irreducible chain, aperiodicity is equivalent to some power of Q having every entry strictly positive. Such a chain is often called regular. The term “ergodic” varies between books: some use it for irreducibility and others require aperiodicity too. Check the definition attached to the term.

A finite irreducible periodic chain has no limiting matrix Qn. This does not prevent a stationary distribution from existing. In the flip chain, starting with equal probability on the two states keeps that distribution unchanged at every step. What fails is convergence from every initial distribution, particularly from a fixed starting state. Period is the condition that separates these two long-run claims.

Key Takeaways

  • The period is the gcd of possible positive return times.
  • Period is shared within a communicating class.
  • A self-loop ensures period 1, but loops are not necessary.
  • The shortest return time can differ from the period.
  • For a finite irreducible chain, aperiodicity is equivalent to a strictly positive matrix power.
  • A periodic chain can have a stationary distribution while its matrix powers fail to converge.

3.4 Solve absorption problems from the first move

First-step analysis turns a future event or waiting time into equations for the current state. The unknown after one move is the same kind of unknown, evaluated at the new state.

Fix boundary values before solving

Let hi be the probability of ever reaching a target set A from i. Put hi=1 in A and hi=0 at states from which A cannot be reached. At every remaining state,

hi=∑jqijhj.

For the four-state chain with closed classes 1–2 and 4, targeting state 4 gives h1=h2=0 and h4=1. At state 3, the row (0.2,0,0.4,0.4) gives h3=0.4h3+0.4, so h3=2/3. The probability of entering class 1–2 is the remaining 1/3. Without the unreachable-state boundary, equations inside class 1–2 would only say the two unknowns are equal.

Work through gambler's ruin

A player gains one token with probability 0.4 and loses one with probability 0.6, stopping at 0 or 3. For the probability of reaching 3, the boundaries are h0=0 and h3=1. The unknowns satisfy

h1=0.4h2,h2=0.4+0.6h1.

Substitute the second into the first: h1=0.16+0.24h1. Hence 0.76h1=0.16, giving h1=4/19 and h2=10/19.

For general boundaries 0 and N and 0<p<1, write q=1−p. The upper-boundary probability is

hi=1−(q/p)i1−(q/p)N(p≠1/2),hi=iN(p=1/2).

In the example, q/p=1.5 and h1=(1−1.5)/(1−3.375)=4/19.

Count the steps themselves

For the expected time to a target reached with probability 1 in a finite chain, put mi=0 at the target and write

mi=1+∑jqijmj

outside it. The 1 counts the move just taken. For the same game, the target is either boundary, so

m1=1+0.4m2,m2=1+0.6m1.

Then m1=1.4+0.24m1, giving m1=35/19 and m2=40/19 rounds. In the fair game the general expected duration is i(N−i). If there is a positive chance of never reaching the target, the unconditional expected hitting time is infinite.

Collect the equations in a matrix

A finite absorbing chain has absorbing states reachable from every state. It is absorbed with probability 1. Order its transient states first. Let T contain transitions among transient states and R transitions from transient to absorbing states. The fundamental matrix is

N=(I−T)−1=I+T+T2+⋯ .

Entry Nij counts expected visits to transient j from i, including time 0. Row sums give expected steps to absorption; NR gives absorption probabilities. For the game,

T=(00.40.60),N=2519(10.40.61).

Key Takeaways

  • Hitting probabilities have boundary value 1 at the target and 0 where the target is unreachable.
  • Expected-time equations add 1 for the first move and have value 0 at the target.
  • In a finite absorbing chain, absorption occurs with probability 1.
  • The fundamental matrix counts transient visits, including the starting visit.
  • Row sums of the fundamental matrix give mean absorption times; multiplying by R gives absorption probabilities.
  • A positive chance of never hitting the target makes its unconditional expected hitting time infinite.
4

Find stationary distributions and describe long-run behavior

A probability distribution can remain unchanged while individual paths continue moving. Balance equations find these stationary distributions; the communicating classes tell you whether the answer is unique. Relate stationary mass to visit frequencies and return times, then check the extra conditions that make the distribution at a distant time approach the same limit from every start.

4.1 Find a distribution that one step leaves unchanged

A stationary distribution gives the same state probabilities before and after a transition. It describes a balance of probability across the states, even while individual paths move.

Set up the balance equations

A probability row vector π is stationary when

πQ=π,∑jπj=1,πj≥0.

For each state j, the balance equation is πj=∑iπiqij. The right side adds the incoming probability from all current states. Stationary distributions are also called invariant or equilibrium distributions.

If μ0=π, then μn=πQn=π at every time. This claim concerns the distribution. It allows a path to move from state to state and allows neighboring times to be dependent.

The balance equations are linearly dependent. Because each row of Q sums to 1, adding all balance equations gives the same identity on both sides. Replace one equation with normalization, solve the remaining system, and check the result in the full equation πQ=π. A reducible chain can leave free parameters; keep only nonnegative normalized solutions.

Solve the printer example

The printer has rows (0.9,0.1) and (0.6,0.4) in Working, Broken order. Balance for Working gives

πW=0.9πW+0.6πB,

so 0.1πW=0.6πB and πW=6πB. Normalization gives 7πB=1, hence

π=(6/7,1/7).

The second component checks as 0.1(6/7)+0.4(1/7)=1/7. In general, for two states with q12=a and q21=b and a+b>0,

π=(ba+b,aa+b).

The entry for state 1 has b in its numerator: faster movement back from state 2 increases the stationary share at state 1.

Extend the calculation to three states

For the weather chain, use the Sunny and Cloudy equations plus normalization:

0.6πS+0.3πC+0.2πR=πS, 0.3πS+0.4πC+0.4πR=πC, πS+πC+πR=1.

Solving gives π=(24,22,15)/61, approximately (0.393,0.361,0.246). Check the first component before rounding: 0.6(24)+0.3(22)+0.2(15)=14.4+6.6+3=24. Dividing by 61 verifies Sunny's balance.

Use the right eigenvector convention

In linear algebra, π is a left eigenvector of Q for eigenvalue 1, normalized as a probability vector. Equivalently, its transpose is an eigenvector of QT. Every stochastic matrix has eigenvalue 1, since multiplying Q by the all-ones column leaves it unchanged; every eigenvalue has absolute value at most 1.

Solving QπT=πT uses the wrong side for these row-stochastic matrices. The all-ones column solves that equation but usually cannot give the stationary shares by simple normalization. A useful valid shortcut is that a doubly stochastic matrix has a uniform stationary distribution. Detailed balance, when it applies, supplies another shortcut. Always finish by checking nonnegativity, a total of 1, and invariance under the actual matrix.

Key Takeaways

  • Stationarity requires invariance, nonnegativity, and normalization.
  • A stationary start keeps the same distribution at every time.
  • Replace one dependent balance equation with normalization.
  • The stationary row vector is a left eigenvector for eigenvalue 1.
  • A doubly stochastic matrix admits the uniform stationary distribution.

4.2 Interpret stationary probabilities over a long run

Finite chains always have a stationary distribution, but the chain's class structure determines whether it is unique. Within an irreducible finite chain, its entries also describe visit frequencies and return times.

Existence and uniqueness

Every finite chain has at least one stationary distribution. A finite irreducible chain has exactly one, with all entries strictly positive. More generally, a finite chain has a unique stationary distribution exactly when it has one closed communicating class. Transient states receive stationary probability zero.

With several closed classes, each supports its own stationary distribution. Mixing these class distributions gives more stationary distributions. For the four-state chain, class 1–2 has stationary shares (3/8,5/8), while state 4 is absorbing. Every vector

c(3/8,5/8,0,0)+(1−c)(0,0,0,1),0≤c≤1,

is stationary. The parameter chooses how much probability to place in each closed class. No transition transfers that mass between the two classes.

Read entries as fractions of time

In a finite irreducible chain, the fraction of steps spent at j converges with probability 1 to πj, from any start. Aperiodicity is unnecessary for this time-average result. The flip chain alternates between two states, spending half its time at each, even though its distribution from a known start oscillates.

For the weather chain, the long-run sunny fraction is 24/61≈39.3%.

If a reward f(j) is attached to state j, the path's average reward converges to ∑jπjf(j). A printer producing 700 pages on working days and zero on broken days has long-run output 700(6/7)=600 pages per day.

Return times use the reciprocal

The first return time to i is Ti=min⁡{n≥1:Xn=i}, starting from i. For a finite irreducible chain,

E[Ti∣X0=i]=1πi.

This includes a return at the very next step when the chain stays at i. It measures the time between successive visits, not the waiting time from an arbitrary other state.

For the printer, πB=1/7, so the mean return time to Broken is 7 days. Check directly: with probability 0.4 it is broken tomorrow, a return time of 1. Otherwise it is repaired after one day and waits a geometric number of days, mean 10, until it breaks again. Thus

E[TB]=0.4(1)+0.6(1+10)=7.

A sunny day has mean return time 61/24≈2.54 days in the weather model.

Keep three long-run claims separate

Existence of a stationary distribution, time-average convergence, and convergence of the state distribution are different claims. The finite flip chain has a unique stationary distribution and stable visit fractions, yet no limiting distribution from a fixed start.

Infinite chains need further care. The symmetric walk on all integers is recurrent but has no stationary probability distribution. A candidate would need equal weights on all integers, which cannot be normalized to total 1. Its mean return time is infinite, consistent with null recurrence and the absence of a positive stationary mass at a state.

Key Takeaways

  • Every finite chain admits a stationary distribution.
  • Exactly one closed communicating class gives uniqueness in a finite chain.
  • Stationary distributions give zero mass to transient states.
  • In finite irreducible chains, visit fractions converge even when the chain is periodic.
  • The mean return time to i from i is 1/πi.
  • Infinite recurrent chains need not have a stationary probability distribution.

4.3 When the distribution forgets the starting state

Stationarity describes an unchanged probability vector. Convergence asks whether other starting distributions approach that vector. The key finite-chain conditions are irreducibility and aperiodicity.

Apply the convergence theorem

For a finite irreducible aperiodic chain with stationary distribution π,

μ0Qn⟶π

for every initial distribution. Equivalently, every row of Qn approaches the same vector. The matrix eventually loses the effect of a particular starting state.

The printer is irreducible and has loops, so it satisfies the theorem. Starting Working,

P(Xn=B)=17(1−0.3n).

The broken probabilities at steps 1, 2, and 3 are 0.1, 0.13, and 0.139. At step 5 the value is about 0.14251, and at step 10 it is about 0.142856, approaching 1/7. The error is exactly 0.3n/7 for this start.

For the weather chain, a Rainy start gives approximately (0.390,0.362,0.249) at day 5. By day 10, all rows are within 0.0001 of (24,22,15)/61. Rounded entries can total slightly more or less than 1; compute with the unrounded values.

Recognize what can fail

The flip matrix alternates between itself and the identity. It has a stationary vector (1/2,1/2), which remains unchanged when used as the start. From a known state, however, its distribution alternates forever. Irreducibility alone therefore cannot ensure convergence.

Reducibility can preserve information about where the chain began. In the four-state chain, starting in class 1–2 gives limit (3/8,5/8,0,0); starting at 4 gives (0,0,0,1). From 3, entry probabilities into those classes are 1/3 and 2/3, so the limit is

13(3/8,5/8,0,0)+23(0,0,0,1)=(1/8,5/24,0,2/3).

This chain's matrix powers converge, but their rows differ. Reducibility does not always produce different limits: if all states eventually enter one absorbing state, every start has the same limiting point mass.

Describe the speed

For a diagonalizable finite irreducible aperiodic Q, write deviations from stationarity in terms of its eigenvalues. The largest absolute eigenvalue other than 1 controls the slowest possible decaying component, roughly ∣λ2∣n. A particular initial distribution may have no component in that direction and converge faster.

The printer's other eigenvalue is 0.3. The weather matrix's other eigenvalues are (2+3)/10≈0.373 and (2−3)/10≈0.027. Their magnitudes describe how quickly starting-state information fades.

Remove a timing obstruction

The lazy version uses L=(I+Q)/2: stay with probability one half and otherwise take an ordinary step. It preserves stationarity since πL=(π+πQ)/2=π and gives every state a loop. For a finite irreducible chain this ensures convergence. It does not join separate communicating classes.

Convergence concerns probabilities across possible paths. A path in an irreducible chain with several states keeps moving; it need not settle at the state with the largest stationary share.

Key Takeaways

  • Finite irreducibility and aperiodicity ensure convergence from every start.
  • A periodic chain can keep a stationary start unchanged while other starts oscillate.
  • Multiple closed classes can produce different limits for different starts.
  • For diagonalizable chains, nonunit eigenvalues describe decaying deviations.
  • Laziness preserves stationarity and removes periodicity without repairing reducibility.
5

Use reversibility, random walks on graphs and PageRank

Networks give concrete ways to understand stationary probability flow. Detailed balance compares opposite directions along each connection, providing a shortcut for reversible chains and undirected walks. Directed web links need a different construction: repair missing outgoing transitions, add teleportation, and use stationary probabilities to rank pages through equations or repeated updates.

5.1 Balance each pair of opposite flows

Stationarity balances total probability at each state. Reversibility asks for a stronger balance: the stationary traffic along each arrow matches the traffic in the reverse direction.

Detailed balance proves stationarity

A distribution satisfies detailed balance when

πiqij=πjqji

for every pair. The quantity on the left is the probability of a step from i to j in a stationary chain. Equality means no net flow between that pair. A chain admitting such a distribution is reversible.

Sum these equations over i for a fixed j:

∑iπiqij=πj∑iqji=πj.

The final sum is row j of Q, so it is 1. The result is precisely j's stationary equation. For a reversible chain started in its stationary distribution, any finite path and its reversal have the same probability. Multiplying the pairwise equalities along the path explains that symmetry.

Stationarity can allow circulation

On a three-state circle, move clockwise with probability 2/3 and counterclockwise with probability 1/3. Each column as well as each row sums to 1, so the uniform vector is stationary. Yet the stationary clockwise flow along one edge is 2/9 and the reverse flow is 1/9. Probability circulates around the circle even though each state's total share stays constant.

Thus failure of detailed balance for a candidate does not reject stationarity. Test πQ=π for that question. For a finite irreducible chain, a one-way positive arrow is enough to rule out reversibility: stationary masses are positive, so its flow cannot equal a zero reverse flow.

Kolmogorov's cycle criterion gives a complete reversibility test for finite irreducible chains. Every cycle's product of forward transition probabilities must equal its reversed product. In the circle, (2/3)3=8/27 differs from (1/3)3=1/27. One failed cycle rules out reversibility; one successful cycle alone is insufficient in a graph with other independent cycles.

Use neighboring-state ratios

A birth–death chain on 0,1,…,N moves only up one state, down one state, or stays. A finite irreducible chain of this form is reversible. Balance between neighbors gives

πk+1=πkqk,k+1qk+1,k.

For

Q=(0.50.500.250.50.2500.50.5),

we obtain π1=2π0 and π2=π1/2=π0. The weights are 1, 2, 1, so normalization gives (1/4,1/2,1/4). Self-pairs satisfy detailed balance automatically, and nonneighbor pairs have zero flow in both directions.

Every two-state chain with a stationary distribution satisfies detailed balance because there is only one pair's flow to match. For the printer, (6/7)(0.1)=(1/7)(0.6)=6/70. For a larger chain, the extra routes can carry a circulation, which is why global balance alone is weaker.

Key Takeaways

  • Detailed balance equates stationary flows in each pair of opposite directions.
  • Summing detailed balance proves stationarity.
  • Stationarity can hold without reversibility.
  • In a finite irreducible chain, reversibility is equivalent to equality of forward and reverse products on every cycle.
  • Birth–death chains can be solved through adjacent-state ratios and normalization.

5.2 Read stationary weights from a network

A random walk on an undirected graph chooses a neighbor at each step. Nodes with more incident edges receive a larger stationary share, even though each individual outgoing edge is chosen less often there.

Normalize degrees

For a finite connected graph without loops and with at least one edge, let di be the degree of vertex i and E the number of edges. The simple walk uses qij=1/di for neighbors and zero otherwise. Its stationary distribution is

πi=di∑kdk=di2E.

Each edge has two ends, so the degrees sum to twice the edge count. Detailed balance gives the reason for the formula. Along any edge,

πiqij=di2E1di=12E=πjqji.

The stationary traffic in either direction is the same.

For edges A–B, A–C, B–C, and C–D, the degrees are 2, 2, 3, 1, totaling 8. Thus

π=(1/4,1/4,3/8,1/8).

C has the largest stationary share; D has the smallest. The mean return time to D is 8 steps. Dividing each degree by four vertices would produce entries totaling 2, not a probability distribution.

Check connectivity and timing separately

The walk is irreducible exactly when the graph is connected. On a connected loop-free graph, walking along an edge and back always gives a two-step return. Its period must therefore divide 2.

A bipartite graph splits into two groups with every edge crossing between groups. Every return has even length, so its period is 2. A square is an example. A nonbipartite connected graph has an odd cycle; odd and even return lengths together give period 1. The A–B–C triangle in the example ensures convergence to the degree distribution.

The lazy walk stays put with probability one half and otherwise makes a simple-walk move. It keeps the same stationary distribution but adds loops. On a finite connected graph, it converges even if the original graph was bipartite. On a disconnected graph, staying put cannot create routes between components.

Extend degrees to weights

Assign symmetric weights wij=wji to edges, with zero for absent edges. Loops can be included. Define wi=∑jwij and use

qij=wijwi,πi=wi∑kwk.

In this convention a loop contributes once to the row weight. For example, a two-vertex weighted graph with edge weight 2 and loop weight 1 at each vertex has row weights 3 and 3. Each row stays with probability 1/3 and crosses with probability 2/3; the stationary vector is uniform.

Conversely, every finite irreducible reversible chain has a weighted-graph representation. Set wij=πiqij. Detailed balance makes the weights symmetric and wi=πi, so dividing by the row weight recovers Q.

Uniform stationarity for a connected simple graph occurs when all degrees are equal. For directed links, neither this degree shortcut nor symmetric-edge reasoning generally applies; solve the stationary equations for the actual directed transition matrix.

Key Takeaways

  • The simple undirected walk has stationary mass proportional to degree.
  • The sum of degrees is twice the number of edges.
  • Connectivity gives irreducibility; bipartiteness gives period 2 for the connected simple walk.
  • Laziness preserves stationary weights and removes periodicity.
  • Symmetric edge weights give stationary mass proportional to total weight at each vertex.
  • The undirected degree formula generally fails for directed graphs.

5.3 Build and compute a PageRank model

PageRank treats a web page's importance as the share of time a random surfer spends there. Incoming links matter through the probability they carry, so a raw count of links cannot determine the ranking.

Repair the link walk

Pages are vertices and links are directed arrows. On a page with outgoing links, the surfer chooses one uniformly. A dangling page has no outgoing links, producing a zero row. Replace that row with a uniform distribution over all pages to obtain a stochastic link matrix S.

Closed groups can still trap a pure link walk. With n pages and damping factor 0≤α<1, introduce uniform teleportation:

G=αS+1−αnJ,

where J is the all-ones matrix. With probability α the surfer takes a link-walk step; otherwise it chooses a page uniformly. Brin and Page reported usually using 0.85. That is a historical model choice, not a mathematical requirement.

Every entry of G is at least (1−α)/n>0. Thus G is irreducible and aperiodic and has one stationary distribution r. The normalized PageRank vector satisfies

rG=r,∑jrj=1,

or rj=(1−α)/n+α∑irisij for each page.

Follow a four-page calculation

A links to B and C; B links to C; C links to A and D; D is dangling. After repairing D, the rows of S are

S=(01/21/2000101/2001/21/41/41/41/4).

With α=0.85, each page receives a teleportation contribution 0.15/4=0.0375. Row A of G is therefore (3/80,37/80,37/80,3/80). Row D stays uniform because both parts of its mixture are uniform.

Solving the balance equations gives

r=16107(1429,1140,2109,1429)≈(0.234,0.187,0.345,0.234).

C ranks first. A sends half its link contribution to C, and B sends all its link contribution there. A and D tie because each receives C's same half-contribution, with equal contributions from teleportation and D's uniform row.

Iterate without solving a large linear system

Power iteration starts with any probability row vector and repeats rk+1=rkG. Starting uniformly in the example gives approximately

r1=(0.197,0.197,0.409,0.197), r2=(0.253,0.163,0.330,0.253),r3=(0.232,0.199,0.338,0.232).

The values need not approach each entry monotonically. The total absolute error contracts by at most α per iteration, so it is at most αk times its starting value after k steps. Every eigenvalue other than 1 has absolute value at most α.

Directed link walks are generally not reversible. Use the balance equations or iteration, not undirected degrees. Without teleportation this particular repaired example already converges to (4,3,6,4)/17, with the same ordering. Teleportation ensures uniqueness and convergence for any repaired finite link graph. A column-vector source transposes G; a source scaling scores to sum to n changes their size but not their ranking.

Key Takeaways

  • Replace a dangling row with a probability distribution before adding teleportation.
  • Uniform teleportation with 0≤α<1 makes every Google-matrix entry positive.
  • PageRank is the stationary probability vector of the Google matrix.
  • An incoming link carries its source page’s rank divided across that page’s outgoing links.
  • Power iteration converges from any starting distribution.
  • The damping factor bounds the contraction of total absolute error.
  • Score scaling changes values but preserves their ordering.

Markov Chains examples

5 Walkthroughs

1

Build a chain from a changing system

11 steps
Choose states, translate next-step rules, and calculate the probability of a specified path.
  1. 1
    IntroductionStart with the information that matters

    A printer’s condition changes from day to day. To predict tomorrow, first decide what today’s state must record: given it, older history should add nothing (the Markov property). Then assign the possible next-day probabilities. We will build a model in Working, Broken order and use it to describe individual paths. Keeping the state definitions fixed makes every later entry readable.

  2. 2
    ExplanationSeparate the present from older history

    The Markov property says that, given the present state, older states add no information about the next state’s distribution. Tomorrow can still depend strongly on today. For a printer, knowing whether it works today may matter; knowing last week’s path adds nothing once today’s full state is known.

  3. 3
    ExampleA missing detail can change the model

    Suppose a recently repaired printer fails at a different rate from one that has run for many days. “Working” alone then hides useful information. Add a flag recording whether it was repaired yesterday. Two printers with the same expanded state should have the same next-state probabilities, regardless of their earlier histories.

  4. 4
    ChallengeShift the weather pair

    Tomorrow’s weather depends on the last two days. If the pair state is (Rain, Dry), what must the first entry of the next pair be?

    ---reveal---

    It must be Dry, today’s weather. The next state is (Dry, Rain) or (Dry, Dry). Pair states preserve the two days the rule needs, and shift the older day out after each step.

  5. 5
    Key InsightTime and memory are different questions

    A time-homogeneous chain uses the same one-step rule at every time. The Markov property concerns which history the rule needs. A state can retain the right information even when a rule changes with the calendar; constant probabilities are an additional property. Our transition matrices use probabilities that remain fixed across steps.

  6. 6
    ExampleFill the Working row

    A working printer breaks by tomorrow with probability 0.1. In Working, Broken order, the row is (0.9,0.1). The 0.9 is the probability of staying Working. A row must account for every next state, so keeping only the failure probability would leave most of the probability unassigned.

  7. 7
    ExampleAdd repair and read the matrix

    A broken printer is repaired by tomorrow with probability 0.6. Its row is (0.6,0.4), giving

    Q=(0.90.10.60.4).

    The entry 0.6 means Working tomorrow given Broken today. It does not reverse that conditional statement. Each row is a separate probability distribution.

  8. 8
    ConnectionDraw the same rule as arrows

    Draw Working and Broken as two nodes. Add arrows Working → Broken labeled 0.1 and Broken → Working labeled 0.6. Add loops labeled 0.9 and 0.4. The outgoing labels total 1 at either node. A matrix entry of zero would have no arrow, so the diagram makes impossible moves visible.

  9. 9
    ExampleAttach the starting probability

    Suppose the printer starts Working with probability 0.8. The complete path Working → Broken → Working has probability

    0.8(0.1)(0.6)=0.048.

    If Working at the start were already given, the conditional path probability would be 0.1(0.6)=0.06. The initial distribution matters when the event includes an uncertain starting state.

  10. 10
    ChallengeCheck the model and its path

    A printer starts Broken. What is the probability of the path Broken → Working → Working, and does a row total of 1 alone verify the matrix’s state meanings?

    ---reveal---

    The path probability is 0.6(0.9)=0.54. Row totals check complete probability allocation, but entries can still be reversed or assigned to the wrong states. Read each entry against its stated current-state row and destination column.

  11. 11
    RecapA complete one-step model

    Check a model in this order: the state retains the needed information, the one-step probabilities match the row and column meanings, and every row totals 1. Add an initial distribution to specify the start. A diagram displays possible moves; multiplying the probabilities along one specified route gives its path probability.

2

Follow probabilities through several steps

12 steps
Sum routes with matrix powers, update distributions, and count expected visits.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionPredict beyond tomorrow
  2. 2
    ExampleSeparate the two intermediate states
  3. 3
    ExplanationAdd routes to the same endpoint
  4. 4
    ChallengeInclude the returning route
  5. 5
    ConnectionSplit a journey into blocks
  6. 6
    TipCheck powers without recomputing every entry
  7. 7
    ExplanationAn uncertain start mixes rows
  8. 8
    ExampleAdvance the mixture again
  9. 9
    ExampleUse the gap between observations
  10. 10
    ConnectionExpected visits do not need independence
  11. 11
    ChallengeTurn a distribution into output
  12. 12
    RecapMatch the probability to the question
3

Read a chain’s routes and solve its stopping questions

19 steps
Find classes, recurrence, and period, then build first-step equations for absorption.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionRead structure before calculating
  2. 2
    ExplanationLook for routes in both directions
  3. 3
    ExampleSeparate three classes
  4. 4
    ChallengeA return arrow changes class membership
  5. 5
    ExplanationAsk whether a return is certain
  6. 6
    ExampleCount returns without counting the start
  7. 7
    ChallengeA long stay can end permanently
  8. 8
    ConnectionInfinite space permits a different outcome
  9. 9
    ExplanationUse all possible return lengths
  10. 10
    ChallengeAperiodic without any loop
  11. 11
    Key InsightPeriod obstructs a common limiting row
  12. 12
    ExplanationSet the target values first
  13. 13
    ExampleSolve the class-entry probability
  14. 14
    ExampleStart the token-game equations
  15. 15
    ExampleSubstitute and solve
  16. 16
    ExplanationWaiting time adds the move just taken
  17. 17
    ConnectionCollect transient visits in one matrix
  18. 18
    ChallengeA destination and a departure time
  19. 19
    RecapChoose the right structural test
4

Find equilibrium and decide whether it is approached

14 steps
Solve balance equations, interpret visit fractions, and test convergence.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionAn unchanged distribution can hide movement
  2. 2
    ExplanationWrite the invariant-vector condition
  3. 3
    ExampleSolve the printer ratio
  4. 4
    ExampleNormalize and check
  5. 5
    ChallengeCheck which side of the matrix to use
  6. 6
    ExplanationCount closed classes for uniqueness
  7. 7
    ExampleInterpret a return interval
  8. 8
    ConnectionAverage one long path
  9. 9
    ChallengeSeparate average visits from fixed-time chances
  10. 10
    ExplanationUse the finite convergence conditions
  11. 11
    ExampleWatch the starting-state error fade
  12. 12
    ConnectionLaziness removes a timing barrier
  13. 13
    ChallengeA unique stationary vector without irreducibility
  14. 14
    RecapKeep the long-run claims distinct
5

Connect probability flow to networks and PageRank

18 steps
Use detailed balance for undirected walks, then construct a convergent ranking for directed links.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionCompare traffic in opposite directions
  2. 2
    ExplanationBalance each pair separately
  3. 3
    ExampleCirculation can preserve the state shares
  4. 4
    ChallengeA failed shortcut does not reject equilibrium
  5. 5
    ExampleUse ratios along neighboring states
  6. 6
    TipA cycle can rule reversibility out
  7. 7
    ExplanationDegrees supply the stationary weights
  8. 8
    ExampleNormalize a small graph
  9. 9
    ConnectionA triangle changes the return timing
  10. 10
    ChallengeMake the square lazy
  11. 11
    Key InsightReplace degrees by symmetric weights
  12. 12
    ExplanationRepair pages that have nowhere to go
  13. 13
    ExplanationMix links with uniform jumps
  14. 14
    ExampleBuild one Google-matrix row
  15. 15
    ExampleUpdate all pages at once
  16. 16
    Key InsightIteration has a contraction guarantee
  17. 17
    ChallengeChoose the right network shortcut
  18. 18
    RecapMatch the network to its balance rule

Markov Chains practice questions

50 Practice Questions in 5 sets

Set 1: States, transitions, and long-run shares10 Practice Questions

Question 1 of 10

A finite irreducible chain has stationary probability 0.125 at state H. Starting at H, what is the mean first positive return time to H?
  1. 8 steps
  2. 0.125 steps
  3. 7 steps
  4. 4 steps
Show answerHide answer
Answer: A
The mean first positive return time is the reciprocal of stationary mass, so it is 1/0.125=8 steps. Subtracting one would incorrectly remove part of the interval between visits. A self-loop, when present, counts as a return after one step.

Question 2 of 10

A sensor’s next reading depends on its current reading but not on any earlier reading once the current one is known. What property does this describe?
  1. Independent readings
  2. The Markov property
  3. A stationary start
  4. Equiprobable readings
Show answerHide answer
Answer: B
The Markov property says that the present reading supplies all the history needed to predict the next reading. Neighboring readings may still be dependent. Independence would also remove the stated dependence on the current reading, so it is a stronger condition.

Question 3 of 10

A device is Active or Idle. An active device becomes idle with probability 0.25, and an idle device becomes active with probability 0.4. What is its row-stochastic matrix in Active, Idle order?
  1. (0.250.750.40.6)
  2. (0.750.40.250.6)
  3. (0.750.250.60.4)
  4. (0.750.250.40.6)
Show answerHide answer
Answer: D
The Active row puts 0.25 in the Idle column and the remaining 0.75 on its diagonal. The Idle row puts 0.4 in the Active column and 0.6 on its diagonal. Transposing the entries would mix the current-state rows with destination columns.

Question 4 of 10

A chain on L, R has matrix Q=(0.80.20.50.5). Starting at L, what is the probability of being at R after two steps?
  1. 0.26
  2. 0.04
  3. 0.20
  4. 0.10
Show answerHide answer
Answer: A
The two possible routes are L–L–R and L–R–R, with probabilities 0.16 and 0.10. Adding them gives 0.26. Squaring 0.2 to obtain 0.04 fails because the second transition must begin at the state reached by the first transition.

Question 5 of 10

A system starts in A with probability 0.25 and B otherwise. Its matrix is Q=(0.80.20.40.6). At step 1, output is 12 units in A and 4 units in B. What is the expected output?
  1. 6 units
  2. 10 units
  3. 8 units
  4. 9.6 units
Show answerHide answer
Answer: C
The next-step probability of A is 0.25(0.8)+0.75(0.4)=0.5, so B also has probability 0.5. The expected output is 0.5(12)+0.5(4)=8 units. Using the initial weights would give 6 units, which describes time 0 rather than the requested time 1.

Question 6 of 10

A three-state chain has rows (0,1,0), (0.6,0.4,0), and (0,0.2,0.8). What are its communicating classes and which are closed?
  1. One closed class containing all three states
  2. Three singleton classes, all closed
  3. Classes {1,2} and {3}; only {1,2} is closed
  4. Classes {1,2} and {3}; both are closed
Show answerHide answer
Answer: C
States 1 and 2 reach each other and cannot reach 3, so they form a closed class. State 3 can reach that class but has no return route from it. Its positive self-loop does not make its singleton class closed, since its row also has an exit to state 2.

Question 7 of 10

At state U, a chain stays at U with probability 0.7 and moves to an absorbing state V otherwise. Starting at U, what is the expected number of returns to U, excluding time 0?
  1. 10/3
  2. 7/3
  3. 3/7
  4. 1/0.7
Show answerHide answer
Answer: B
A positive-time return is possible only by staying immediately, so its probability is 0.7. Expected returns are 0.7/(1−0.7)=7/3. The value 10/3 counts all visits including the starting visit, which this question excludes.

Question 8 of 10

A two-state chain has qAB=0.3 and qBA=0.2. What is its stationary distribution in A, B order?
  1. (0.6,0.4)
  2. (0.5,0.5)
  3. (0.3,0.7)
  4. (0.4,0.6)
Show answerHide answer
Answer: D
Balance between the states requires 0.3πA=0.2πB, so their weights are 2 and 3. Normalizing gives (0.4,0.6). Swapping the entries would put more stationary mass at the state that is left faster, and it fails the balance equation.

Question 9 of 10

A simple random walk runs on the path A–B–C–D–E. It produces 8 units of output at C and zero elsewhere. What are its long-run average output and mean positive return time to C?
  1. 1.6 units and 5 steps
  2. 2 units and 4 steps
  3. 4 units and 2 steps
  4. 1 unit and 8 steps
Show answerHide answer
Answer: B
The four edges give degree sum 8, and C has degree 2, so its stationary share is 1/4. Its mean return time is therefore 4 steps, and the stationary weighted output is 2 units per step. Uniform weighting would wrongly give 1.6 units and 5 steps because the endpoint degrees differ.

Question 10 of 10

A five-page link graph has no dangling pages. Page Z has no incoming links. With uniform teleportation and damping factor 0.8, what is Z’s stationary PageRank?
  1. 0.20
  2. 0.16
  3. 0.80
  4. 0.04
Show answerHide answer
Answer: D
The link contribution to Z is zero because no page links to it. Its stationary balance therefore contains only the uniform teleportation mass, (1−0.8)/5=0.04. The value 0.20 is the probability of teleporting somewhere, which must be split among all five pages.
Set 2: Routes, returns, and balanced flows10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A connected weighted graph has edges A–B of weight 2 and B–C of weight 1, with no loops. What is the stationary distribution of its weighted walk in A, B, C order?
  1. (1/3,1/3,1/3)
  2. (1/3,1/2,1/6)
  3. (2/3,0,1/3)
  4. (1/4,1/2,1/4)
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

Tomorrow’s traffic category depends only on today’s and yesterday’s categories. With pair states ordered as (yesterday, today), what destinations can follow (Low, High)?
  1. (Low, Low) and (High, Low)
  2. (High, Low) and (High, High)
  3. (Low, High) and (Low, Low)
  4. (Low, Low) and (High, High)
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A chain on A, B has initial distribution (0.6,0.4) and matrix Q=(0.70.30.20.8). What is P(X0=B,X1=A,X2=A)?
  1. 0.14
  2. 0.084
  3. 0.224
  4. 0.056
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

For a two-state chain, Q2=(0.700.300.450.55) and Q3=(0.650.350.5250.475). What is the five-step probability from state 1 to state 2?
  1. 0.3875
  2. 0.1050
  3. 0.3500
  4. 0.4575
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A chain on A, B has Q=(0.60.40.30.7) and starts at A. What is P(X1=B,X3=A)?
  1. 0.12
  2. 0.39
  3. 0.156
  4. 0.24
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A state can return precisely at positive lengths 4, 8, 12, 16, and so on. What is its period?
  1. 1
  2. 2
  3. 8
  4. 4
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

From U, a chain moves to absorbing Success with probability 0.3, absorbing Failure with probability 0.2, and stays at U otherwise. What is the chance of eventual Success from U?
  1. 0.30
  2. 0.60
  3. 0.50
  4. 0.75
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A three-state transition matrix is doubly stochastic. What stationary distribution can be identified without solving its equations?
  1. (1/2,1/4,1/4)
  2. (1,0,0)
  3. (1/4,1/2,1/4)
  4. (1/3,1/3,1/3)
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A finite chain is irreducible and one state has a positive self-loop. What follows about convergence from every initial distribution?
  1. It converges to its unique stationary distribution.
  2. It cycles unless every state has a self-loop.
  3. It has several limits because the start is arbitrary.
  4. It converges only if its matrix is symmetric.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A three-state circle moves clockwise with probability 0.7 and counterclockwise with probability 0.3, without loops. What are its stationarity and reversibility properties?
  1. Uniformly stationary and reversible
  2. Nonuniformly stationary and reversible
  3. Uniformly stationary and nonreversible
  4. Without any stationary distribution
Show answerHide answer

Save this lesson to see this answer.

Set 3: Combine state structure with probability calculations10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A battery’s next working status depends on its current status and whether it is in its first cycle after charging. Only current status is recorded. How should the state be changed to support the stated rule?
  1. Keep only the previous working status.
  2. Add a flag for the first cycle after charging.
  3. Replace status with the total cycle count.
  4. Replace status with a random starting label.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A chain has Q=(0.40.60.20.8). Starting at state 1, what is the chance of being at state 1 after three steps?
  1. 0.232
  2. 0.280
  3. 0.064
  4. 0.256
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A chain starts at A and has Q=(0.50.50.20.8). What is the expected number of visits to B during steps 1, 2, and 3?
  1. 0.695
  2. 1.300
  3. 1.845
  4. 2.085
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A chain has a directed route from every state to every other state, but some pairs have no direct arrow. What is its reducibility classification?
  1. Irreducible because all states communicate
  2. Reducible because some direct arrows are absent
  3. Reducible because routes use intermediate states
  4. Irreducible only if all rows are identical
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A connected loop-free undirected graph contains a cycle of length 5. What is the period of its simple random walk?
  1. 5
  2. 2
  3. 1
  4. 10
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A token game gains one token with probability 0.25 and loses one otherwise, stopping at 0 or 3. Starting at 1, what are the chance of finishing at 3 and the expected duration?
  1. 1/4 and 20/13 rounds
  2. 3/13 and 20/13 rounds
  3. 1/13 and 28/13 rounds
  4. 1/13 and 20/13 rounds
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A finite chain has two closed communicating classes and two transient states. What can be said about its stationary distributions?
  1. Infinitely many exist, all zero on transient states.
  2. Two distributions exist, with no mixtures allowed.
  3. No stationary distribution exists until a start is chosen.
  4. One unique distribution gives all states positive mass.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A chain alternates deterministically between U and V. If its initial distribution is (0.3,0.7), what is its distribution at steps 1 and 2?
  1. (0.5,0.5) then (0.5,0.5)
  2. (0.3,0.7) then (0.3,0.7)
  3. (0.7,0.3) then (0.3,0.7)
  4. (0.7,0.3) then (0.7,0.3)
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A finite irreducible birth–death chain on 0, 1, 2 has q01=0.6, q10=0.3, q12=0.2, and q21=0.4. Remaining probability stays at each state. What is its stationary distribution?
  1. (1/3,1/3,1/3)
  2. (1/4,1/2,1/4)
  3. (1/5,2/5,2/5)
  4. (1/2,1/4,1/4)
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

Three pages have links A → B and B → A; C is dangling. Use a uniform dangling-row repair and damping factor 0.6 with uniform teleportation. What is C’s stationary PageRank?
  1. 2/15
  2. 1/3
  3. 1/5
  4. 1/6
Show answerHide answer

Save this lesson to see this answer.

Set 4: Diagnose models and explain their limits10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A chain has Q=(0.20.80.60.4) and μ0=(0.5,0.5). A learner transposes Q without changing the row-vector update. What first-step vector does this produce, and is it a distribution?
  1. (0.5,0.5); it is a distribution.
  2. (0.4,0.6); it is a distribution.
  3. (0.4,0.6); it is not a distribution.
  4. (0.5,0.5); it is not a distribution.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A chain on A, B starts with distribution (0.4,0.6) and has Q=(0.90.10.30.7). Given that X2=A, what is the probability that X0=B?
  1. 17/30
  2. 7/16
  3. 6/13
  4. 3/5
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A finite chain has classes C and D that are closed, and a class T that can reach both but cannot be reached from either. What happens to a path started in T?
  1. It eventually enters C or D with probability 1.
  2. It eventually visits all three classes repeatedly.
  3. It remains in T because T communicates internally.
  4. It can move between C and D after leaving T.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A symmetric nearest-neighbor walk runs on all integers. What are its return probability and mean positive return time to its starting point?
  1. Less than 1 and finite
  2. 1 and finite
  3. Less than 1 and infinite
  4. 1 and infinite
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A finite chain has absorbing outcomes S and F. From U it goes to S with probability 0.2 and V with probability 0.8. From V it goes to F with probability 0.5 and U with probability 0.5. What is the probability of eventual S from U?
  1. 1/5
  2. 1/3
  3. 2/5
  4. 1/2
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

For Q=(0.60.40.10.9), a learner normalizes the all-ones right eigenvector to (0.5,0.5). What stationary vector should replace it?
  1. (0.8,0.2)
  2. (0.5,0.5)
  3. (0.2,0.8)
  4. (0.4,0.6)
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A finite irreducible chain spends long-run fractions 0.2, 0.3, and 0.5 at A, B, C. At A, B, C its per-step outputs are 0, 4, and 10 units. What are its mean return time to B and long-run average output?
  1. 3 steps and 14/3 units
  2. 10/3 steps and 6.2 units
  3. 3 steps and 6.2 units
  4. 10/3 steps and 14/3 units
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A finite chain has transient state T and closed aperiodic classes C and D. From T, each step stays at T with probability 0.4, enters C with probability 0.45, or enters D with probability 0.15. Class C’s stationary vector is (0.2,0.8). Starting at T, what is the limiting probability of C’s first state?
  1. 0.09
  2. 0.20
  3. 0.12
  4. 0.15
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A finite irreducible chain has a stationary vector with positive entries. One transition has qAB=0.2 and qBA=0. What does this show?
  1. The chain is not reversible.
  2. The chain has no stationary distribution.
  3. The chain must be periodic.
  4. The stationary vector must be uniform.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

In a three-page PageRank model, A links only to B, B links only to C, and C links only to B. Use damping factor 0.5 and uniform teleportation. What is the stationary vector in A, B, C order?
  1. (1/6,1/3,1/2)
  2. (1/3,1/3,1/3)
  3. (1/6,4/9,7/18)
  4. (1/6,5/12,5/12)
Show answerHide answer

Save this lesson to see this answer.

Set 5: Transfer the methods to unfamiliar chains10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A binary process obeys Xn+1=Xn−1. Both histories (Xn−1,Xn)=(0,1) and (1,1) have positive probability. What model correctly describes it?
  1. The current bit alone is Markov because the rule is deterministic.
  2. The next bit is independent of all earlier bits.
  3. The current bit alone is Markov with a time-varying matrix.
  4. The last-two-bit pair is Markov; the current bit alone is not.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A two-state chain has cross-probabilities qAB=0.2 and qBA=0.3. Starting at A, what is the smallest n for which P(Xn=B)>0.39?
  1. 5
  2. 6
  3. 4
  4. 3
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A chain has transient states U, V and absorbing Z. From U it goes to V with probability 0.5 and Z otherwise; from V it goes to U with probability 0.4 and Z otherwise. Starting at U, what is the expected total number of visits to U, including time 0?
  1. 1/4
  2. 3/2
  3. 5/4
  4. 5/3
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

An irreducible three-state diagram has arrows A → B, B → A, B → C, and C → A, all with positive probability and no other arrows. What is its period?
  1. 1
  2. 2
  3. 3
  4. 6
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A token game gains one token with probability 0.6 and loses one with probability 0.4, stopping at 0 or 4. Starting at 2, what is the probability of reaching 4?
  1. 1/2
  2. 4/13
  3. 3/5
  4. 9/13
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A finite absorbing chain has transient block T=(0.20.40.10.5); all remaining probability goes to one absorbing state. What is the expected number of steps to absorption from the first transient state?
  1. 5/3
  2. 5/2
  3. 10/3
  4. 20/9
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A chain moves deterministically around a cycle of length 4. Replace its matrix Q with (I+Q)/2. What happens to its stationary distribution and convergence?
  1. The uniform vector stays stationary and every start converges to it.
  2. The uniform vector changes and every start converges to the new one.
  3. The uniform vector stays stationary but period 4 prevents convergence.
  4. The uniform vector changes and separate closed classes appear.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A finite irreducible chain on A, B, C has qAB=0.4,qBA=0.2,qBC=0.3,qCB=0.1,qAC=0.2,qCA=0.1, with remaining probability on loops. Can it be reversible?
  1. Yes, because each arrow has a reverse.
  2. Yes, with stationary weights 1, 2, 6.
  3. No, because the cycle products differ.
  4. No, because the diagonal entries differ.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A simple walk runs on a finite connected undirected graph where every vertex has degree 3. What is its stationary distribution?
  1. Proportional to degree squared
  2. Concentrated at the start
  3. Weighted by inverse degree
  4. Uniform across all vertices
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A four-page link graph has every page linking only to itself and has no dangling pages. Use damping factor 0.75 and uniform teleportation. What is the stationary PageRank vector?
  1. (0.75,0.25,0,0)
  2. (0.25,0.25,0.25,0.25)
  3. (1,0,0,0)
  4. Any probability vector is stationary.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

67 Key Terms, each with its definition

A

Absorbing chain
An absorbing chain has an absorbing state reachable from every state; in a finite such chain, eventual absorption has probability 1.
Gambler’s ruin is an absorbing chain when reaching either token boundary ends the game.
Absorbing state
An absorbing state has self-transition probability 1, so the chain stays there forever after entering that state.
A token game’s zero-token outcome is an absorbing state when play stops at that boundary.
Accessibility
Accessibility is the existence of a positive-probability route from one state to another, allowing a zero-step route to the same state.
Accessibility from 3 to 4 holds in a four-state chain even when no route leads from 4 back to 3.
Aperiodicity
Aperiodicity means that a state or communicating class has period 1, so possible return lengths have no larger common divisor.
Aperiodicity can follow from returns of lengths 2 and 3 even when the chain has no self-loops.

B

Balance equations
Balance equations equate each state’s stationary probability to the total probability flowing into it from all states during one transition.
For a printer that fails with probability 0.1 and is repaired with probability 0.6, the balance equations give 0.1π_W = 0.6π_B before normalization.
Bipartite graph
A bipartite graph splits its vertices into two groups with every edge crossing between the groups, forcing a simple walk to alternate sides.
A square is a bipartite graph, so its connected simple random walk has period 2.
Birth–death chain
A birth–death chain moves only between neighboring ordered states or stays put; a finite irreducible one is reversible.
A birth–death chain on token counts can use adjacent detailed-balance ratios to find stationary weights.

C

Chapman–Kolmogorov equations
The Chapman–Kolmogorov equations combine transition probabilities for two time blocks by summing over the state between them.
The Chapman–Kolmogorov equations let a five-step calculation be split into two steps followed by three.
Closed class
A closed class is a communicating class with no positive-probability transition to a state outside it, so entry prevents later exit.
A closed class containing states 1 and 2 can keep moving internally without ever reaching a state 4 outside it.
Communicating class
A communicating class is a maximal group of states that all reach one another; the classes partition the state space.
The communicating class containing state 4 is a singleton when state 4 is absorbing.
Communication
Communication is mutual accessibility: two states communicate when each can reach the other by positive-probability transitions.
Communication groups states 1 and 2 together because both directions can be traveled.
Conditional independence
Conditional independence means that, once specified information is known, learning one variable adds no information about another.
The Markov property gives conditional independence of the next state and older history given the present.
Convergence to stationarity
Convergence to stationarity means that the distribution at a growing time approaches a stationary vector from the specified start.
Finite irreducibility and aperiodicity ensure convergence to stationarity from every initial distribution.

D

Damping factor
A damping factor α is the probability of taking the repaired link-walk step in PageRank, leaving probability 1 − α for teleportation.
A damping factor of 0.85 mixes 85% link-walk behavior with 15% uniform teleportation.
Dangling page
A dangling page has no outgoing links, so its link-walk row must be replaced by a probability row before the matrix can represent a chain.
In the uniform repair of a PageRank link matrix, a dangling page receives a uniform outgoing row.
Degree
The degree of a vertex in a loop-free undirected graph is the number of incident edges; it determines that vertex’s simple-walk stationary weight.
A degree of 3 gives stationary mass 3/8 in a connected undirected graph with four edges.
Detailed balance
Detailed balance equates the stationary flow from each state to another with the reverse flow, through πᵢqᵢⱼ = πⱼqⱼᵢ for every pair.
Detailed balance holds for a printer with stationary chances 6/7 and 1/7, failure chance 0.1 and repair chance 0.6, because (6/7)(0.1) equals (1/7)(0.6).
Diagonalization
A diagonalization expresses a matrix as VDV⁻¹, with D diagonal, so its powers can be computed by raising the diagonal entries to powers.
A diagonalization of a two-state printer matrix with eigenvalues 1 and 0.3 describes its powers through those two eigenvalues.
Doubly stochastic matrix
A doubly stochastic matrix has nonnegative entries and has every row and every column summing to 1.
A doubly stochastic matrix admits equal stationary probabilities on its finite state space.

F

First return time
A first return time is the first positive step at which a chain revisits its starting state, so a self-loop gives return time 1.
The printer’s first return time to Broken can be one day if it remains broken tomorrow.
First-step analysis
First-step analysis conditions on the next move and relates a future probability or mean waiting time to the same unknowns at the next state.
First-step analysis gives one equation for each interior token count in a stopping game.
Fundamental matrix
The fundamental matrix N = (I − T)⁻¹ of a finite absorbing chain records expected visits among transient states, counting time 0.
A row sum of the fundamental matrix gives the expected number of steps before absorption.

G

Gambler’s ruin
Gambler’s ruin is a token walk that gains or loses one token per round and stops at a lower or upper boundary.
In fair gambler’s ruin, starting halfway between the boundaries gives equal chances of reaching them.
Google matrix
The Google matrix combines a repaired stochastic link matrix with teleportation; with uniform teleportation it is G = αS + (1 − α)J/n.
Every entry of the Google matrix is positive when the uniform teleportation probability is positive.

H

Hitting probability
A hitting probability is the chance of ever reaching a specified target set from a given start, including time 0 when already in the set.
The hitting probability for the upper boundary is zero at the absorbing lower boundary.
Hitting time
A hitting time is the first step at which a path reaches a specified target set, with value zero when it starts in that set.
The hitting time of either token boundary counts the last round that ends the game.

I

Initial distribution
An initial distribution is the probability vector specifying the state at time 0, before any transitions have been taken.
For a printer with states Working and Broken, the initial distribution (1, 0) says that it is certainly Working at the start.
Irreducibility
Irreducibility means that the whole state space forms one communicating class, so every state can reach every other in some number of steps.
A directed cycle has irreducibility even though it lacks direct arrows between most pairs of states.

K

Kolmogorov’s cycle criterion
Kolmogorov’s cycle criterion tests finite irreducible reversibility by equality of forward and reverse transition products on every cycle.
Kolmogorov’s cycle criterion rejects a circle whose clockwise product exceeds its reverse product.

L

Lazy chain
A lazy chain replaces Q by (I + Q)/2, staying put with probability one half and otherwise using the original transition rule.
A lazy chain built from a chain that flips between two states every step preserves the uniform stationary vector and removes oscillation.
Left eigenvector
A left eigenvector is a nonzero row vector v satisfying vQ = λv; a stationary distribution uses eigenvalue 1 and total mass 1.
If a printer’s transition matrix has left eigenvector (6, 1) for eigenvalue 1, that vector can be normalized to its stationary distribution.
Limiting distribution
A limiting distribution is the probability vector approached by the state distribution as time grows from a specified initial distribution.
A chain that flips between two states every step has no limiting distribution from a fixed state, though its uniform vector is stationary.
Long-run average reward
A long-run average reward is the limiting reward per step along a path; for a finite irreducible chain it equals the stationary weighted average.
A printer that produces 700 pages on each working day has a long-run average reward of 600 pages per day.
Long-run visit fraction
A long-run visit fraction is the limiting share of observation times spent at a state along a path; in finite irreducible chains it equals πᵢ.
In a three-state weather model whose stationary probability at Sunny is 24/61, the long-run visit fraction at Sunny is 24/61.

M

Markov property
The Markov property says that, given the present state, the older history adds no information about the next state’s distribution.
The Markov property fits a token game when the next move depends only on the current token count.
Matrix power
A matrix power multiplies a square matrix by itself repeatedly; for a transition matrix, it collects probabilities over several steps.
The matrix power Q² adds two-step routes through every possible intermediate state.

N

n-step transition probability
An n-step transition probability is the chance of ending in a specified state exactly n steps after a specified starting state.
The n-step transition probability from Working to Broken allows repairs and failures along the way.
Normalization
Normalization scales nonnegative weights to total 1 so that they form a probability distribution without changing their relative proportions.
Normalization turns stationary weights 6 and 1 into probabilities 6/7 and 1/7.
Null recurrence
Null recurrence means that return is certain but its expected waiting time is infinite, which can happen on an infinite state space.
The symmetric walk on all integers has null recurrence despite returning to its starting point with probability 1.

P

PageRank
PageRank is the normalized stationary probability of each page in a repaired link walk with teleportation, measuring long-run visits by a random surfer.
PageRank can favor a page with fewer incoming links if those links carry more stationary probability.
Path probability
A path probability is the probability of a specified sequence of states, found by multiplying its initial and successive transition chances.
A conditional path probability for Sunny–Cloudy–Rainy uses the two arrows after the given Sunny start.
Period
The period of a state with possible returns is the greatest common divisor of all positive step counts with positive return probability.
The period of a deterministic three-state cycle is 3 because returns occur at multiples of three steps.
Positive recurrence
Positive recurrence means that return is certain and the expected first positive return time is finite, as in finite recurrent classes.
Positive recurrence gives a finite mean interval between successive Broken days in the printer model.
Power iteration
Power iteration repeatedly multiplies a probability vector by a transition matrix to approach its stationary vector when convergence holds.
PageRank power iteration can start uniformly and update the row vector without solving the full linear system.

R

Recurrence
Recurrence means that, starting at a state, the probability of returning at some positive time is 1; repeated returns then occur forever.
Recurrence holds at every state of a finite irreducible printer model, including the rarely visited Broken state.
Regular chain
A regular chain, in the finite-chain convention used here, has some transition-matrix power with every entry strictly positive.
A weather model whose one-step matrix already has all entries positive is a regular chain.
Return probability
A return probability is the chance of ever visiting the starting state again after time 0, including a next-step self-loop as a return.
If state 3 has self-loop probability 0.4 and staying immediately is its only way to visit again, its return probability is 0.4.
Reversibility
Reversibility means a chain admits a distribution satisfying detailed balance; in that distribution a path and its reversal are equally likely.
A three-state walk biased clockwise fails reversibility even though it has a uniform stationary vector.
Row-vector convention
The row-vector convention places state probabilities in a row and advances them by multiplying the transition matrix on the right.
The row-vector convention gives the update μ₁ = μ₀Q for the printer’s next-day distribution.

S

Self-loop
A self-loop is a positive-probability one-step transition from a state to itself; it supplies a return of length 1.
One self-loop makes an irreducible chain aperiodic because the whole class shares the same period.
Simple random walk on a graph
A simple random walk on a graph moves from its current vertex to a uniformly chosen neighbor, with probability 1/dᵢ along each outgoing edge.
A simple random walk on a graph with a degree-three vertex takes each of its three edges with probability 1/3.
State distribution
A state distribution is the vector of probabilities of occupying each state at one specified time, before observing that time’s state.
The weather state distribution can stay nearly constant even as one weather path keeps changing.
State reward
A state reward is a numerical value assigned to a state, such as daily output, whose expectation weights the values by state probabilities.
A printer’s state reward is 700 pages when Working and zero pages when Broken.
State space
A state space is the set of all possible values of a process’s state, with each value holding the information used by its transition rule.
A two-day weather state space has four ordered pairs, from Rain–Rain through Dry–Dry.
Stationary distribution
A stationary distribution is a nonnegative probability vector that a transition step leaves unchanged, satisfying πQ = π in the row convention.
When a printer chain’s stationary distribution is (6/7, 1/7) in Working, Broken order, one transition step leaves those chances unchanged.
Stationary flow
A stationary flow is the probability πᵢqᵢⱼ of observing one specified directed transition when the starting state has distribution π.
Opposite stationary flows match in a reversible walk but can differ in a circulating chain.
Stationary mixture
A stationary mixture combines stationary distributions using nonnegative weights totaling 1 and remains stationary under the same matrix.
A stationary mixture can place one third of its mass on a closed class of states 1 and 2 and two thirds at another closed class, state 4.
Stochastic matrix
A stochastic matrix in the row convention has nonnegative entries with every row summing to 1, describing a full set of next-state chances.
A printer’s transition matrix with rows summing to 1 is a stochastic matrix even when its first column sums to 1.5.
Stochastic process
A stochastic process is a sequence or collection of random variables describing how a random system changes over time.
The stochastic process recording a printer’s condition each day takes values Working and Broken.
Subdominant eigenvalue
A subdominant eigenvalue has the largest absolute value among eigenvalues other than 1 and describes the slowest possible decaying mode.
A two-state printer chain with subdominant eigenvalue 0.3 shrinks its gap to stationarity by that factor at each step.

T

Teleportation
Teleportation is a step that chooses a new page directly instead of following a link, giving every page positive access under a uniform choice.
Teleportation occurs with probability 0.15 when the damping factor is 0.85.
Time-homogeneous chain
A time-homogeneous chain has one-step transition probabilities that stay constant over time for each pair of states.
A time-homogeneous chain uses the same failure and repair probabilities on every simulated day.
Transience
Transience means that a state’s eventual positive-time return probability is less than 1; visits to it are finite with probability 1.
Transience applies to state 3 once every exit from it leads to a region with no return route.
Transition diagram
A transition diagram shows states as nodes and positive one-step probabilities as directed, labeled arrows, including possible self-loops.
A transition diagram omits an arrow when the corresponding one-step move has probability zero.
Transition matrix
A transition matrix is a square array of one-step probabilities whose row names the current state and column names the next state.
In a printer’s transition matrix, the Working row lists both tomorrow’s working and broken probabilities.

V

Visit count
A visit count is the number of observation times at which a path occupies a specified state, within a stated time interval.
The expected visit count for Broken over days 1–3 is the sum of those three broken-day probabilities.

W

Weighted random walk
A weighted random walk on an undirected graph chooses a next vertex with probability proportional to the symmetric weight of the joining edge.
A weighted random walk uses total incident row weights in place of degrees for its stationary distribution.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started