Tutorials › Stochastic Processes › Transition Probabilities by Path Enumeration

Chapman-Kolmogorov Equations and n-Step Transitions · Tutorial 114 of 994

Transition Probabilities by Path Enumeration

Learn to list, weight, and check the state paths that contribute to a specified multi-step transition probability.

Intermediate 10 min read

What You'll Learn

  • State the probability of a specified finite path in a discrete-time Markov chain.
  • Enumerate all intermediate states that can contribute to a two- or three-step transition.
  • Add path probabilities to obtain a transition probability between fixed endpoints.
  • Check an enumeration by grouping paths according to an intermediate state.
  • Avoid conditioning on a path prefix whose probability is zero.

From One-Step Moves to Multi-Step Probabilities

A transition probability over several steps collects the probabilities of all possible ways the chain can travel between its starting and ending states. The calculation is finite when the state space is finite, and it can be organized even when the state space is countable: specify the intermediate states, multiply the one-step probabilities along each path, and add the results. Keeping the paths visible is especially useful when different routes contribute substantially or when some routes have probability zero.

Let \((X_n)_{n\ge0}\) be a discrete-time Markov chain on a finite or countable state space \(S\), defined on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Write \(P=(p_{ij})\) for its row-stochastic transition matrix, so \(p_{ij}=\mathbb{P}(X_{n+1}=j\mid X_n=i)\) under the Markov transition rule and \(\sum_{j\in S}p_{ij}=1\) for each \(i\in S\). Let \(\mathcal{F}_n=\sigma(X_0,\ldots,X_n)\). The Markov property means that, conditional on \(\mathcal{F}_n\), the distribution of \(X_{n+1}\) depends on the past only through \(X_n\), with \(\mathbb{P}(X_{n+1}=j\mid\mathcal{F}_n)=p_{X_nj}\) almost surely. We use \(\mathbb{P}_i\) for probabilities when \(X_0=i\).

Definition: A length-\(n\) state path is a sequence \(i_0,i_1,\ldots,i_n\) of states in \(S\). Its path event is \(\{X_0=i_0,\ldots,X_n=i_n\}\). The \(n\)-step transition probability \(p_{ij}^{(n)}\) is \(\mathbb{P}_i(X_n=j)\). For a specified path starting at \(i_0\), its probability is the product of the one-step probabilities along that path; the proof below establishes this formula, including paths with zero-probability prefixes.

For instance, in two steps from \(i\) to \(j\), the only intermediate state is the state \(k=X_1\). In three steps, there are two intermediate states, \(k=X_1\) and \(\ell=X_2\). The path formula gives the contributions \(p_{ik}p_{kj}\) and \(p_{ik}p_{k\ell}p_{\ell j}\), respectively. These are not probabilities of the same event: each product corresponds to one particular sequence of states. The endpoint probability is obtained only after all possible intermediate states have been accounted for.

Two Results That Justify Enumeration

Theorem (Probability of a specified path): For \(n\ge1\), a chain started at \(i_0\) satisfies \(\mathbb{P}_{i_0}(X_1=i_1,\ldots,X_n=i_n)=\prod_{r=1}^{n}p_{i_{r-1}i_r}\). The same formula includes the event \(X_0=i_0\), which has probability \(1\) under \(\mathbb{P}_{i_0}\). A product containing a zero transition probability is zero.

Proof. Fix a path \(i_0,\ldots,i_n\), and let \(A_m=\{X_1=i_1,\ldots,X_m=i_m\}\) for \(1\le m\le n\), with \(A_0=\Omega\) under \(\mathbb{P}_{i_0}\). We prove successively that \(\mathbb{P}_{i_0}(A_m)=\prod_{r=1}^{m}p_{i_{r-1}i_r}\). The claim holds for \(m=0\) using the empty-product convention. For \(m\ge0\), \(A_m\) is measurable with respect to \(\mathcal{F}_m\). By conditional expectation and the Markov property,

$$ \begin{aligned} \mathbb{P}_{i_0}(A_{m+1}) &=\mathbb{E}_{i_0}\!\left[\mathbf{1}_{A_m}\mathbf{1}_{\{X_{m+1}=i_{m+1}\}}\right]\\ &=\mathbb{E}_{i_0}\!\left[\mathbf{1}_{A_m}\, \mathbb{E}_{i_0}\!\left[\mathbf{1}_{\{X_{m+1}=i_{m+1}\}}\mid\mathcal{F}_m\right]\right]\\ &=\mathbb{E}_{i_0}\!\left[\mathbf{1}_{A_m}p_{X_m i_{m+1}}\right] =p_{i_m i_{m+1}}\mathbb{P}_{i_0}(A_m). \end{aligned} $$

The last equality holds because \(X_m=i_m\) on \(A_m\). It does not require conditioning on \(A_m\), so it remains valid when \(\mathbb{P}_{i_0}(A_m)=0\). Induction gives the stated product for every \(m\le n\). \(\square\)

Theorem (Enumeration by intermediate states): For \(n\ge1\) and \(i,j\in S\), \(p_{ij}^{(n)}=\sum_{i_1,\ldots,i_{n-1}\in S}p_{ii_1}p_{i_1i_2}\cdots p_{i_{n-1}j}\). For \(n=1\), there are no intermediate states and the expression is \(p_{ij}\). When \(S\) is countable, the sum is a countable sum of nonnegative terms.

Proof. Under \(\mathbb{P}_i\), the event \(\{X_n=j\}\) is the disjoint union over all sequences \((i_1,\ldots,i_{n-1})\in S^{n-1}\) of the events \(\{X_1=i_1,\ldots,X_{n-1}=i_{n-1},X_n=j\}\). Each such event has probability equal to its path product by the path formula. Adding the probabilities of these disjoint events gives the result by finite or countable additivity. For \(n=1\), the event is simply \(\{X_1=j\}\), whose probability is \(p_{ij}\); this also covers the case with no intermediate states. \(\square\)

For a finite state space, the theorem gives a practical procedure: list the intermediate-state sequences, calculate each product, and add. For a countable state space, the same decomposition is valid, but there may be infinitely many paths; the resulting sum is understood as a nonnegative series. The examples below use finite state spaces so that every contributing path can be displayed explicitly.

Worked Example: Two Steps with Three Possible Intermediate States

Consider \(S=\{1,2,3\}\) with transition matrix, whose rows are indexed by the current state and columns by the next state, given by

$$ P= \begin{bmatrix} \tfrac12&\tfrac13&\tfrac16\\ \tfrac14&\tfrac12&\tfrac14\\ \tfrac13&\tfrac13&\tfrac13 \end{bmatrix}. $$

Before using the matrix, check its row sums: row 1 has \(\tfrac12+\tfrac13+\tfrac16=\tfrac36+\tfrac26+\tfrac16=1\); row 2 has \(\tfrac14+\tfrac12+\tfrac14=\tfrac14+\tfrac24+\tfrac14=1\); row 3 has \(\tfrac13+\tfrac13+\tfrac13=1\). Find \(p_{13}^{(2)}\), the probability of being in state 3 after two steps when starting at state 1.

The intermediate state can be 1, 2, or 3. The corresponding paths and products are \(1\to1\to3\), with \(\tfrac12\cdot\tfrac16=\tfrac1{12}\); \(1\to2\to3\), with \(\tfrac13\cdot\tfrac14=\tfrac1{12}\); and \(1\to3\to3\), with \(\tfrac16\cdot\tfrac13=\tfrac1{18}\). Thus

$$ p_{13}^{(2)} =\tfrac1{12}+\tfrac1{12}+\tfrac1{18} =\tfrac3{36}+\tfrac3{36}+\tfrac2{36} =\tfrac8{36} =\tfrac29. $$

Check by grouping at the first step: after one step from state 1, the probabilities of states 1, 2, and 3 are \(\tfrac12,\tfrac13,\tfrac16\). From these states, the respective probabilities of moving to 3 on the next step are \(\tfrac16,\tfrac14,\tfrac13\). The weighted sum is \(\tfrac12\cdot\tfrac16+\tfrac13\cdot\tfrac14+\tfrac16\cdot\tfrac13=\tfrac1{12}+\tfrac1{12}+\tfrac1{18}=\tfrac29\), agreeing with the path list.

Worked Example: A Three-Step Probability with Zero-Probability Paths

Let \(S=\{0,1,2\}\) and take

$$ P= \begin{bmatrix} \tfrac12&\tfrac12&0\\ 0&\tfrac12&\tfrac12\\ 0&\tfrac12&\tfrac12 \end{bmatrix}. $$

The row sums are \(\tfrac12+\tfrac12+0=1\), \(0+\tfrac12+\tfrac12=1\), and \(0+\tfrac12+\tfrac12=1\), so the matrix is row-stochastic. Compute \(p_{02}^{(3)}\). A path is specified by its two intermediate states, so there are nine pairs \((i_1,i_2)\). Their products are shown below.

Intermediate statesPathPath probability
\((0,0)\)\(0\to0\to0\to2\)\(\tfrac12\cdot\tfrac12\cdot0=0\)
\((0,1)\)\(0\to0\to1\to2\)\(\tfrac12\cdot\tfrac12\cdot\tfrac12=\tfrac18\)
\((0,2)\)\(0\to0\to2\to2\)\(\tfrac12\cdot0\cdot\tfrac12=0\)
\((1,0)\)\(0\to1\to0\to2\)\(\tfrac12\cdot0\cdot0=0\)
\((1,1)\)\(0\to1\to1\to2\)\(\tfrac12\cdot\tfrac12\cdot\tfrac12=\tfrac18\)
\((1,2)\)\(0\to1\to2\to2\)\(\tfrac12\cdot\tfrac12\cdot\tfrac12=\tfrac18\)
\((2,0)\)\(0\to2\to0\to2\)\(0\cdot0\cdot0=0\)
\((2,1)\)\(0\to2\to1\to2\)\(0\cdot\tfrac12\cdot\tfrac12=0\)
\((2,2)\)\(0\to2\to2\to2\)\(0\cdot\tfrac12\cdot\tfrac12=0\)

Adding all nine contributions gives \(p_{02}^{(3)}=\tfrac18+\tfrac18+\tfrac18=\tfrac38\). The other six paths have zero probability because at least one transition in each path has probability zero. Check by grouping at the first step: the three-step probability can be grouped by the state after one step. From 0, the remaining two-step probability of ending at 2 is \(\tfrac14\); from 1, it is \(\tfrac12\); from 2, it is \(\tfrac12\). The first-step probabilities are \(\tfrac12,\tfrac12,0\), so the total is \(\tfrac12\cdot\tfrac14+\tfrac12\cdot\tfrac12+0\cdot\tfrac12=\tfrac18+\tfrac14=\tfrac38\).

Worked Example: Three Contributing Paths to a Three-Step Probability

On \(S=\{0,1,2,3\}\), consider the transition matrix

$$ P= \begin{bmatrix} \tfrac12&\tfrac12&0&0\\ 0&\tfrac12&\tfrac12&0\\ 0&0&\tfrac12&\tfrac12\\ \tfrac12&0&0&\tfrac12 \end{bmatrix}. $$

Check each row: \(\tfrac12+\tfrac12+0+0=1\); \(0+\tfrac12+\tfrac12+0=1\); \(0+0+\tfrac12+\tfrac12=1\); and \(\tfrac12+0+0+\tfrac12=1\). Find \(p_{01}^{(3)}\). Listing the intermediate-state pairs, the only nonzero paths from 0 to 1 in three steps are \(0\to0\to0\to1\), \(0\to0\to1\to1\), and \(0\to1\to1\to1\). Each has probability \(\tfrac12\cdot\tfrac12\cdot\tfrac12=\tfrac18\). Every other pair has a zero transition: after the first move from 0, the chain is at 0 or 1; a move from 1 to 2 cannot be followed by a move to 1, and state 3 cannot be reached from 0 in the first two steps. Therefore

$$ p_{01}^{(3)}=\tfrac18+\tfrac18+\tfrac18=\tfrac38. $$

Check by first finding the two-step probabilities: after two steps from 0, the probability of state 0 is \(\tfrac12\cdot\tfrac12=\tfrac14\). The probability of state 1 is \(\tfrac12\cdot\tfrac12+\tfrac12\cdot\tfrac12=\tfrac12\), from the paths \(0\to0\to1\) and \(0\to1\to1\). The probability of state 2 is \(\tfrac12\cdot\tfrac12=\tfrac14\), and the probability of state 3 is 0. On the third step, the probabilities of moving to 1 from states 0, 1, 2, and 3 are \(\tfrac12,\tfrac12,0,0\). Hence \(p_{01}^{(3)}=\tfrac14\cdot\tfrac12+\tfrac12\cdot\tfrac12+\tfrac14\cdot0+0\cdot0=\tfrac18+\tfrac14=\tfrac38\), as obtained by enumerating paths.

Reading and Checking a Path Enumeration

For a fixed starting state and endpoint, every intermediate-state sequence contributes exactly one path event. The events are mutually exclusive because a chain cannot have two different values at the same intermediate time; together they exhaust the event of ending at the specified endpoint. This is why the calculation uses a sum, not a product of the path probabilities. Within each path, the one-step probabilities are multiplied because the Markov path formula gives the probability of that complete sequence.

Two checks help catch errors. First, confirm that every row of \(P\) sums to 1 before interpreting its entries as transition probabilities. Second, check whether the listed intermediate-state sequences cover all possibilities. For a finite state space of size \(r\), there are \(r^{n-1}\) sequences of intermediate states for an \(n\)-step probability, though many may have zero contribution. A compact calculation may omit zero terms only after identifying why those paths have zero probability.

Common mistake: conditioning on an impossible prefix. In the three-state example, the path \(0\to2\to1\to2\) has first transition probability \(p_{02}=0\). It is invalid to write a conditional probability “given \(X_1=2\)” under \(\mathbb{P}_0\), because that conditioning event has probability zero. The product for the full path is nevertheless \(0\cdot\tfrac12\cdot\tfrac12=0\). The path formula proof uses conditional expectation given \(\mathcal{F}_n\), not conditioning on the path event, and therefore covers this case without assigning meaning to a conditional probability on a null event.

Path enumeration is most useful when only a few entries of \(P^{(n)}\) are needed, when a model has a clear set of possible routes, or when the contributions of different routes have separate interpretations. For large \(n\) or a large state space, writing every path may become unwieldy; the enumeration identity still explains the probability, while matrix multiplication or other methods can organize the arithmetic more efficiently. At this stage, the key discipline is to distinguish the complete path from its endpoint event and to account for every intermediate possibility exactly once.

Check Your Understanding

For each question, state the relevant intermediate states or paths and check the arithmetic by substitution or regrouping.

  1. For a two-step transition from state \(i\) to state \(j\), how many intermediate states are specified in each path, and what is the path contribution through state \(k\)?
  2. In the first worked example, identify the three paths contributing to \(p_{13}^{(2)}\) and verify that their probabilities sum to \(\tfrac29\).
  3. In the second worked example, why is the path \(0\to2\to1\to2\) assigned probability zero even though conditioning on its first transition is not valid?
  4. For a finite state space of size \(r\), how many intermediate-state sequences occur in the enumeration of an \(n\)-step transition probability?
  5. Explain why the endpoint probability is a sum of path probabilities, rather than the product of those probabilities.