A machine switches between modes A and B from one hourly inspection to the next, with known one-step probabilities. What is the chance that it is in mode A three inspections from now, and what is the chance that it is in mode B at least once along the way? Each answer collects many possible paths. This lesson shows how to multiply along a path and add over disjoint paths, how matrix powers and row vectors organize that work, and why the probability of ending in a state differs from the probability of visiting it.
Key terms
The n-step transition probability
Definition Let be the transition matrix of a time-homogeneous Markov chain on a finite or countable state space . For and states , the -step transition probability is the probability that the chain, started in state , is in state after steps. For any initial distribution and every with ,
For it is when and otherwise, and for it is . For it is the sum, over every list of intermediate states, of the product of the one-step probabilities along the path. For two steps,
By the Markov property and time homogeneity, each path probability is a product of conditional one-step probabilities, and the paths add because different lists of intermediate states are disjoint events.
In plain words To go from to in steps, the chain passes through some sequence of intermediate states. Multiply along each possible route, then add over the routes.
Example Use the constructed two-mode machine with states in the order A, B and
Starting from A, two steps end in A by the route A, A, A with probability or by the route A, B, A with probability , so . The four two-step probabilities, each written as a sum over the middle state, are
| Start | End in A | End in B |
|---|---|---|
| A | ||
| B |
Each row adds to , since after two steps the chain is in exactly one state.
Matrix power
Definition For the matrix power is the matrix product with factors, and is the identity matrix. For a time-homogeneous chain on a finite state space,
for all states and all , so is the -step transition matrix. Every is again row-stochastic. A power of a matrix means repeated matrix multiplication, not the matrix of powers of the entries. If the rule changes over time, with a matrix for the step from time to time , the -step matrix from time is the product in time order, and in general no single power describes it.
In plain words An entry of a matrix product adds products of a row entry and a column entry. For times , that sum runs over the intermediate state, which is exactly the path calculation. So multiplying by itself performs every two-step path sum at once.
Example For the two-mode machine,
which is the table of the previous card. Squaring each entry of instead gives the rows and , with row sums and . The A to A entry of that matrix counts only the route A, A, A and misses the route through B. One more multiplication gives
Row vector of state probabilities
Definition The row vector lists the probabilities for , in the order of the rows of , so is the initial distribution. For a time-homogeneous chain with transition matrix and every ,
The distribution stands on the left of the matrix, and the order of the factors matters. Under the column convention every matrix and vector is transposed, and the two conventions must not be mixed. Each has nonnegative entries that add to . That check often exposes a slip such as a transposed matrix, but passing it does not prove that every entry is right.
In plain words The row vector is the chain’s distribution at one time. Multiplying by moves it forward one step, and multiplying by moves it forward steps at once. The two routes agree because matrix multiplication is associative, so .
Example From , one step gives . A second step gives the A coordinate and the B coordinate , so . Directly from , the A coordinate of is
the same answer. Multiplying by the transpose of by mistake would give , whose entries add to although it is not .
Chapman-Kolmogorov relation
Definition For a time-homogeneous Markov chain on a finite or countable state space, all and all states ,
In matrix form, . The index runs over the possible states at the intermediate time . The relation follows by conditioning on , with the law of total probability and the Markov property.
In plain words Every route of steps is in some state at time . Group the routes by that state, multiply the chance of reaching it in steps by the chance of finishing from it in steps, and add over the possible middle states.
Example Starting from A, split three steps at time . After two steps the chain is in A with probability and in B with probability , so
Listing the paths confirms it. The paths A, A, A, A and A, B, A, A are in A at time , with probabilities and , which add to . The paths A, A, B, A and A, B, B, A are in B at time , with probabilities and , which add to .
Endpoint probability
Definition An endpoint probability is the probability that the chain is in a given state at a given time, such as , or for a chain started in . It is the coordinate of . It depends only on the state at time , so every path that ends in counts, whatever states it passed through.
In plain words An endpoint question asks where the chain is at the deadline, not how it got there.
Example Starting from A, the probability of being in B at step is , from the path A, A, B with probability and the path A, B, B with probability . With instead, the endpoint probability is , so the answer depends on the initial distribution as well as on .
Visiting probability
Definition For a chain started in state , a state and , the probability of visiting by step is the conditional probability, given , that for at least one time with . It equals minus the total probability of the paths that avoid at every time . The event is contained in this event, so the visiting probability is at least the endpoint probability , and in general it is not an entry of . For it equals the endpoint probability of after steps in a modified chain in which is absorbing, that is, in which the row of is replaced by staying in with probability .
In plain words A visiting question asks whether the chain was ever in along the way. A chain can enter and leave again, so having visited by step can be more likely than being in at step .
Example Starting from A, the only two-step path that avoids B stays in A twice, with probability . So the probability of visiting B by step is , while the endpoint probability is . The difference is the path A, B, A, which visits B and leaves. Making B absorbing gives the same answer,
Check yourself
- The two-mode machine starts in B. Find the probability that it is in B after two steps, and the probability of the particular path B, A, B.
Show the answer
Two paths end in B. The path B, A, B has probability , and the path B, B, B has probability . They are disjoint, so
the B to B entry of . The path B, A, B is one of the two routes, with probability .
- Starting in B, find the probability of visiting A at least once in the first two steps, and compare it with the probability of being in A at step .
Show the answer
The only two-step path that avoids A stays in B twice, with probability . So the visiting probability is . The endpoint probability is . The difference is the path B, A, B, which visits A but ends in B. Reporting as the visiting probability would leave that path out.
- Starting in B, find the probability of being in A at step by splitting at time . A classmate instead cubes the one-step entry and reports . What is wrong with that?
Show the answer
After two steps from B the chain is in A with probability and in B with probability . So
the B to A entry of . The four paths from B that end in A at step are B, A, A, A with probability , B, A, B, A with , B, B, A, A with and B, B, B, A with , and they add to . The classmate’s product uses the move from B to A three times in a row, which no path makes, since after moving to A the next step starts from A. Cubing an entry is an entrywise power, not the matrix power .