Tutorials › Competing Risks and Multi-State Models › Deriving Conditional State Probabilities From Transition Matrices

Landmarking and Dynamic Prediction · Tutorial 480 of 699

Deriving Conditional State Probabilities From Transition Matrices

Learn to condition on the state at a landmark and calculate later state probabilities by multiplying correctly ordered transition matrices.

Advanced 12 min read

What You'll Learn

  • Define transition-matrix entries and specify the row-vector convention used in the calculations.
  • Express later state probabilities conditional on a landmark state using successive interval matrices.
  • Derive the matrix product by summing over all possible intermediate states.
  • Work through examples with absorbing and transient states, checking every probability.
  • Diagnose errors caused by reversed matrix order, omitted paths, or incompatible transition probabilities.
  • Compare interval-by-interval multiplication with a directly available endpoint transition matrix.

From a Landmark State to a Later State

At a landmark time, a prediction question can be stated precisely: given the state occupied at the landmark, what is the probability of each state at a later time? When transition probabilities are supplied separately for successive intervals, the answer combines them. Each possible intermediate state must be included, because a person can reach the final state by more than one path.

This tutorial develops that calculation using transition matrices. The emphasis is on conditioning at the landmark, the order of multiplication, and the path-by-path justification. The calculations are useful only when the transition probabilities describe compatible intervals and the state at each interval boundary contains the information needed to determine the next transition probabilities.

Definition: Let the possible states be \(1,\ldots,K\). For times \(u<v\), define the transition matrix \(P(u,v)\) by \(p_{ij}(u,v)=P\{X(v)=j\mid X(u)=i\}\). Its entry in row \(i\), column \(j\) is the probability of moving from state \(i\) at time \(u\) to state \(j\) at time \(v\). Thus, each entry is between 0 and 1, and each row sums to 1.

Use row vectors for state distributions. If the state at time \(u\) has distribution \(\boldsymbol{\pi}(u)\), then the distribution at \(v\) is \(\boldsymbol{\pi}(u)P(u,v)\), provided the transition probabilities apply to the conditioning information in question. If it is known that the state at landmark time \(L\) is \(r\), the initial row vector is the unit vector \(\boldsymbol{e}_r\): it has a 1 in position \(r\) and 0 elsewhere.

Key result: For successive times \(L=t_0<t_1<\cdots<t_m\), if the state at \(L\) is \(r\), the row vector of probabilities for the state at \(t_m\) is $$ \boldsymbol{e}_r P(t_0,t_1)P(t_1,t_2)\cdots P(t_{m-1},t_m). $$ The probability of state \(j\) at \(t_m\), conditional on state \(r\) at \(L\), is the \(j\)th entry of this row vector.

The matrices are multiplied in chronological order from left to right under this row-vector convention. The first matrix carries the distribution from the landmark to the first interval boundary; the next matrix carries that result forward again. These need not be identical matrices: transition probabilities may change with calendar time or with the length and conditions of the interval they describe.

Why Multiplication Includes Every Intermediate State

For two intervals, write \(P^{(1)}=P(t_0,t_1)\) and \(P^{(2)}=P(t_1,t_2)\). Given state \(i\) at \(t_0\), reaching state \(j\) at \(t_2\) can occur through any state \(k\) at \(t_1\). The law of total probability gives

$$ P\{X(t_2)=j\mid X(t_0)=i\} =\sum_{k=1}^{K}P\{X(t_1)=k\mid X(t_0)=i\} P\{X(t_2)=j\mid X(t_1)=k,X(t_0)=i\}. $$

Under the Markov property at the interval boundaries, \(P\{X(t_2)=j\mid X(t_1)=k,X(t_0)=i\}=P\{X(t_2)=j\mid X(t_1)=k\}\). Thus, the summand is \(p^{(1)}_{ik}p^{(2)}_{kj}\). Summing over \(k\) is exactly the definition of matrix multiplication:

$$ \bigl(P^{(1)}P^{(2)}\bigr)_{ij} =\sum_{k=1}^{K}p^{(1)}_{ik}p^{(2)}_{kj}. $$

For more than two intervals, apply the same argument repeatedly. Each product term corresponds to a sequence of intermediate states. The product is therefore not a shortcut that discards possible paths; it adds their probabilities while accounting for the probability of each step along each path.

The required assumption is often expressed as the Markov property at the interval boundaries: conditional on the state at an interval's start, the distribution of the state at its end does not also depend on the earlier path. The matrices must use the same state definitions and compatible conditioning throughout. If relevant earlier history affects transitions beyond the current state, state-only matrices may not yield the desired conditional probabilities.

Worked Example: Two States and an Absorbing State

Consider a hypothetical process with states 1, 2, and 3, where state 3 is absorbing. Given state 1 at landmark \(t_0\), suppose the transition matrices for the two successive intervals are

$$ P^{(1)}= \begin{pmatrix} 0.70&0.30&0\\ 0&1&0\\ 0&0&1 \end{pmatrix}, \qquad P^{(2)}= \begin{pmatrix} 0.50&0.50&0\\ 0&1&0\\ 0&0&1 \end{pmatrix}. $$

Each entry is nonnegative and every row sums to 1. In particular, state 2 is absorbing over both intervals. The landmark state vector is \(\boldsymbol{e}_1=(1,0,0)\). After the first interval,

$$ \boldsymbol{e}_1P^{(1)}=(0.70,0.30,0). $$

Thus the process is in state 1 with probability 0.70 and state 2 with probability 0.30 at \(t_1\). Multiplying by the second matrix gives

$$ (0.70,0.30,0)P^{(2)} =\bigl(0.70(0.50)+0.30(0),\; 0.70(0.50)+0.30(1),\;0\bigr) =(0.35,0.65,0). $$

Therefore, conditional on state 1 at the landmark, the probability of state 1 at \(t_2\) is 0.35 and the probability of state 2 is 0.65. The state-2 probability includes both paths: remaining in state 1 for the first interval and then moving to state 2, with probability \(0.70(0.50)=0.35\); and moving to state 2 in the first interval and remaining there, with probability \(0.30(1)=0.30\). Their sum is 0.65. The probabilities sum to 1, as required.

Three States and Multiple Paths

With more states, the same calculation applies, but it becomes especially important to keep track of which intermediate states contribute to each final state. The following example shows the calculation entry by entry rather than treating a matrix product as a black box.

Worked Example: Adding Paths Through Three States

Suppose a hypothetical process has states 0, 1, and 2, with state 2 absorbing. For two successive intervals, use

$$ P^{(1)}= \begin{pmatrix} 0.60&0.30&0.10\\ 0&0.80&0.20\\ 0&0&1 \end{pmatrix}, \qquad P^{(2)}= \begin{pmatrix} 0.50&0.40&0.10\\ 0&0.50&0.50\\ 0&0&1 \end{pmatrix}. $$

All rows sum to 1. Given state 0 at the landmark, the distribution after the first interval is \((0.60,0.30,0.10)\). The probability of state 0 at the end of the second interval is \(0.60(0.50)+0.30(0)+0.10(0)=0.30\). The probability of state 1 is \(0.60(0.40)+0.30(0.50)+0.10(0)=0.24+0.15=0.39\). The probability of state 2 is \(0.60(0.10)+0.30(0.50)+0.10(1)=0.06+0.15+0.10=0.31\).

$$ \boldsymbol{e}_0P^{(1)}P^{(2)}=(0.30,0.39,0.31), \qquad 0.30+0.39+0.31=1. $$

The 0.31 for state 2 consists of three distinct routes: transition directly to state 2 in the first interval and remain there; be in state 1 after the first interval and move to state 2; or be in state 0 after the first interval and move to state 2 in the second. The displayed calculation includes each route exactly once.

Conditioning on a Different Landmark State

The transition matrices can be unchanged while the answer changes because the landmark state changes. Selecting the appropriate unit vector is the operation that imposes the conditioning. It is not generally correct to average rows unless the landmark population actually has a distribution over states rather than a known state.

Worked Example: Starting in the Middle State

Consider states A, B, and C and the following two hypothetical interval matrices:

$$ P^{(1)}= \begin{pmatrix} 0.80&0.20&0\\ 0.10&0.60&0.30\\ 0&0.20&0.80 \end{pmatrix}, \qquad P^{(2)}= \begin{pmatrix} 0.70&0.20&0.10\\ 0&0.50&0.50\\ 0&0&1 \end{pmatrix}. $$

Each row sums to 1. Suppose the process is in state B at the landmark. Its row after the first interval is the B row of \(P^{(1)}\), namely \((0.10,0.60,0.30)\). For the second interval, the probability of A is \(0.10(0.70)+0.60(0)+0.30(0)=0.07\). The probability of B is \(0.10(0.20)+0.60(0.50)+0.30(0)=0.02+0.30=0.32\). The probability of C is \(0.10(0.10)+0.60(0.50)+0.30(1)=0.01+0.30+0.30=0.61\).

$$ \boldsymbol{e}_B P^{(1)}P^{(2)}=(0.07,0.32,0.61), \qquad 0.07+0.32+0.61=1. $$

These are the state probabilities at the end of the second interval conditional on being in B at the landmark. In particular, using the A row of the product instead would answer a different conditional question: starting in A, not starting in B.

Checks, Alternatives, and Common Failure Modes

A sound calculation has several straightforward checks. First, confirm that each interval matrix has nonnegative entries and rows summing to 1. Second, check that the starting vector matches the stated landmark condition. Third, verify the order and dimensions of the matrices. Finally, the resulting row must have nonnegative entries summing to 1, apart from small rounding error. These checks can expose arithmetic mistakes, but they cannot establish that the transition probabilities or their assumptions are appropriate for a particular application.

If a transition matrix directly from \(t_0\) to \(t_m\) is already available under the same conditioning assumptions, multiplying interval matrices should give the same endpoint probabilities as using that matrix. This is the Chapman–Kolmogorov consistency relationship. Directly enumerating paths is another useful check in small examples: it makes omitted or double-counted routes visible. For many states or intervals, matrix multiplication is more systematic than listing every path.

  • Reversing the order. Under the row-vector convention, use \(P(t_0,t_1)P(t_1,t_2)\), not the reversed product. The earlier interval acts first.
  • Omitting a path. A state at the intermediate time contributes to the endpoint probability even if it is not the landmark state. Include every possible intermediate state in the sum.
  • Using the wrong row. The row vector must represent the state known at the landmark. A different row answers a different conditional question.
  • Assuming the answer is valid because it sums to one. A row that sums to one can still be wrong if the matrices use incompatible time intervals, state definitions, or conditioning assumptions.
  • Multiplying entries element by element. Matrix multiplication requires summing products over intermediate states; multiplying corresponding entries does not combine paths.

A key limitation is that the product is only as appropriate as the transition matrices and their assumptions. If transitions over a later interval depend on information about the earlier path that is not represented by the current state, the state-only product need not equal the desired conditional probability. Also, probabilities estimated with substantial uncertainty remain uncertain after multiplication; the arithmetic alone does not provide an uncertainty interval.

1
Set the conditioning state.
Use the unit row vector for the state known at the landmark.
2
Order the intervals.
Place each transition matrix in chronological order, from the landmark forward.
3
Multiply and interpret.
The resulting row gives the conditional probabilities for the final time, one entry per state.
4
Check the result.
Confirm nonnegative entries and a row sum of 1, and verify that the matrices match the conditioning and intervals.
Key takeaway: Conditional state probabilities across successive intervals are obtained by starting with the unit vector for the landmark state and multiplying the interval transition matrices in chronological order. Each matrix-product entry sums the probabilities of all intermediate paths to the target state.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For two intervals with matrices \(P^{(1)}\) and \(P^{(2)}\), what does the \((i,j)\) entry of their product represent?
  2. Suppose the first-interval distribution is \((0.40,0.60)\), and the second-interval matrix is \(\begin{pmatrix}0.75&0.25\\0.20&0.80\end{pmatrix}\). Find the final distribution.
  3. Why is it wrong to calculate the final probability of state 2 using only the path that is in state 1 at the intermediate time?
  4. Under the row-vector convention, if the landmark state is state 3, which row or vector should initiate the calculation?
  5. Name two checks for a computed final probability vector and one assumption that a probability-sum check cannot verify.

Solutions. (1) It is the probability of being in state \(j\) at the end of the second interval given state \(i\) at the start, when the intermediate state is summed over. (2) Multiply to obtain \((0.40(0.75)+0.60(0.20),\,0.40(0.25)+0.60(0.80))=(0.42,0.58)\); the entries sum to 1. (3) The process may reach state 2 through any intermediate state, so all possible intermediate-state paths must be included. (4) Start with the unit vector \(\boldsymbol{e}_3\), with 1 in position 3 and 0 elsewhere. (5) Check that entries are nonnegative and sum to 1, and that the matrix order and starting vector are correct. A sum of 1 cannot verify that the Markov assumption or the interval-specific probabilities are appropriate.

Clinical Biostats