Tutorials › Exam ALTAM - Advanced Long-Term Actuarial Mathematics › Checking Stochastic Transition Matrices from Equation Solutions

Exam ALTAM · Kolmogorov Equations · Tutorial 96 of 999

Checking Stochastic Transition Matrices from Equation Solutions

Use boundary, sign, and row-sum checks to detect invalid transition matrices, while recognizing what those checks cannot prove.

Intermediate 13 min read

What You'll Learn

  • Check the identity transition matrix at the starting time.
  • Test nonnegativity and row sums for every candidate transition matrix.
  • Derive probability conservation from the forward equation.
  • Audit rounded numerical outputs without mistaking rounding error for model failure.
  • Distinguish necessary stochasticity checks from verification of the differential equation.

Why Audit a Transition Matrix?

A proposed solution of the Kolmogorov equations is useful only if it can represent transition probabilities. That imposes immediate checks: at zero elapsed time the process must remain in its starting state; probabilities cannot be negative; and, when the state space is complete, the probabilities in each row must sum to one. These checks are quick, but they are not a substitute for checking that a proposed matrix actually solves the stated equation.

Use the row-vector convention throughout: \(P(s,t)_{ij}\) is the probability of being in state \(j\) at time \(t\), given state \(i\) at time \(s\). Thus each row corresponds to one initial state. For a finite-state model with no omitted states or killing, \(P(s,t)\) must be a stochastic matrix.

Definition: A matrix \(P(s,t)\) is stochastic if every entry is nonnegative and every row sums to one. A transition matrix also satisfies the identity boundary condition \(P(s,s)=I\). These are necessary properties of a transition matrix under a complete finite-state model; they do not, by themselves, show that the matrix solves a specified Kolmogorov equation.

The Three Basic Checks

For an \(n\)-state model, check the candidate matrix entry by entry and row by row. At the boundary \(t=s\), the required matrix is the identity: its diagonal entries are one and its off-diagonal entries are zero. For \(t>s\), every entry must be at least zero, and the entries in each row must add to one.

$$ P(s,s)=I,\qquad P(s,t)_{ij}\geq 0,\qquad \sum_{j=1}^{n}P(s,t)_{ij}=1\quad\text{for each }i. $$

The row-sum condition is not a column-sum condition. A row answers the question, “Starting in state \(i\), what are the probabilities of all possible states at time \(t\)?” Summing across the possible destination states must account for all probability. Column sums generally have no such interpretation and need not equal one.

In a time-inhomogeneous model, the same checks apply to \(P(s,t)\) for every \(s\leq t\). The identity condition is imposed at \(t=s\), not necessarily at calendar time zero for every starting time. In a model that allows probability to leave the listed state space—for example, through an explicit killing mechanism—the rows of a matrix restricted to the remaining states may sum to less than one. Do not apply the unit-row-sum check to an incomplete or deliberately substochastic matrix as though it described all states.

Why Probability Is Conserved

For a finite-state, time-homogeneous continuous-time Markov chain, let \(Q\) be its generator under the row convention. Its off-diagonal entries are transition intensities, so \(q_{ij}\geq 0\) for \(i\ne j\), and each diagonal entry is chosen so that its row sums to zero. The forward equation is \(P'(t)=P(t)Q\), with \(P(0)=I\). The zero row sums of \(Q\) explain why a solution preserves row sums.

1
Write the conservation property of the generator.
Let \(\mathbf{1}\) denote a column vector of \(n\) ones. Since every row of \(Q\) sums to zero, \(Q\mathbf{1}=\mathbf{0}\).
2
Differentiate the row totals.
From \(P'(t)=P(t)Q\), it follows that \(\frac{d}{dt}\big(P(t)\mathbf{1}\big)=P(t)Q\mathbf{1}=\mathbf{0}\). Thus the row totals do not change with time.
3
Apply the boundary condition.
Since \(P(0)=I\), \(P(0)\mathbf{1}=\mathbf{1}\). The constant row-total vector is therefore \(\mathbf{1}\), so every row of \(P(t)\) sums to one.

This argument establishes row-sum preservation, provided the proposed matrix solves the forward equation and has the correct boundary value. Nonnegativity is also a property of the transition probabilities of a valid finite-state Markov chain; it is not implied just by row sums. In practice, check it separately.

Worked Example: Checking a Two-State Solution at a Specified Time

A hypothetical model has two states and constant transition intensities \(0.2\) per year from state 0 to state 1, and \(0.3\) per year from state 1 to state 0. A proposed solution is evaluated at \(t=\ln 2\) years, starting at time 0. Use the exact two-state transition formula to audit the result. Give matrix entries to four decimal places.

Method. For rates \(\alpha\) from state 0 to state 1 and \(\beta\) from state 1 to state 0, the stationary row probabilities are \(\big(\frac{\beta}{\alpha+\beta},\frac{\alpha}{\alpha+\beta}\big)\). The nonconstant part of the two-state solution decays by \(r=e^{-(\alpha+\beta)t}\). Here \(\alpha=0.2\), \(\beta=0.3\), and \(\alpha+\beta=0.5\).

First calculate the decay factor, taking care not to confuse the logarithm in the time value with a probability:

$$ r=e^{-0.5\ln 2}=2^{-0.5}=\frac{1}{\sqrt{2}}\approx 0.7071068. $$

The stationary probabilities are \(\beta/(\alpha+\beta)=0.3/0.5=0.6\) and \(\alpha/(\alpha+\beta)=0.2/0.5=0.4\). Therefore

$$ P(0,t)= \begin{pmatrix} 0.6+0.4r & 0.4(1-r)\\ 0.6(1-r) & 0.4+0.6r \end{pmatrix}. $$

Substitute \(r=0.7071068\). The four entries are \(0.6+0.4(0.7071068)=0.8828427\), \(0.4(1-0.7071068)=0.1171573\), \(0.6(1-0.7071068)=0.1757359\), and \(0.4+0.6(0.7071068)=0.8242641\). Rounding only at the final step gives

$$ P(0,\ln 2)\approx \begin{pmatrix} 0.8828 & 0.1172\\ 0.1757 & 0.8243 \end{pmatrix}. $$

Check. The rounded first row sums to \(0.8828+0.1172=1.0000\), and the rounded second row sums to \(0.1757+0.8243=1.0000\). Every entry is nonnegative. At \(t=0\), the formula gives \(r=1\), and hence \(P(0,0)=I\). The calculation avoids the common mistake of using \(e^{-0.5\ln 2}=0.5\); its value is \(1/\sqrt{2}\), approximately \(0.7071\).

Auditing Numerical Outputs

A numerical solver may return small departures from exact stochasticity because of finite step size and rounding. The appropriate response is to inspect the size and pattern of the departures, compare them with the solver’s stated tolerance, and refine the calculation if needed. Do not silently alter the matrix and then treat the altered values as the solution. In particular, normalizing rows cannot repair a negative probability or establish that the differential equation was solved.

Worked Example: A Negative Entry Despite Correct Row Totals

At elapsed time \(0.4\) years, a numerical integration for a hypothetical three-state model returns the following candidate matrix. Its starting-time output is reported separately as \(P(0,0)=I\). Audit the candidate at \(t=0.4\), and state whether it can be a transition matrix. Each displayed number is to be treated as an exact reported value for this check.

$$ \widetilde P(0,0.4)= \begin{pmatrix} 0.82 & 0.20 & -0.02\\ 0.15 & 0.80 & 0.05\\ 0 & 0 & 1 \end{pmatrix}. $$

Method. Check the boundary value, then compute each row total and inspect every entry’s sign. The boundary output passes because it is the identity matrix. For the candidate at positive time, the row totals are \(0.82+0.20-0.02=1.00\), \(0.15+0.80+0.05=1.00\), and \(0+0+1=1.00\).

The row totals pass, but the entry in row 1, column 3 is \(-0.02<0\). This violates nonnegativity, so the reported matrix cannot be a transition matrix as written. A valid transition probability cannot be negative, even when its row sums are exactly one.

Conclusion and common mistake avoided. The result fails the stochasticity check and should trigger review of the numerical solution, its precision, and the model implementation. It is not valid to “fix” the matrix by replacing \(-0.02\) with zero and leaving the other entries unchanged: the first row would then sum to \(1.02\), and that edited row would not be the solver’s output. Nor does renormalizing the row establish that the corrected values solve the equation.

Worked Example: A Stochastic Matrix That Does Not Solve the Equation

Consider a hypothetical three-state chain with transitions only from state 1 to state 2 and from state 2 to state 3, each at intensity \(1\) per year; state 3 is absorbing. The generator and a proposed matrix function, for \(0\leq t\leq 1\), are

$$ Q= \begin{pmatrix} -1&1&0\\ 0&-1&1\\ 0&0&0 \end{pmatrix}, \qquad \widetilde P(t)= \begin{pmatrix} 1-t&t&0\\ 0&1-t&t\\ 0&0&1 \end{pmatrix}. $$

Determine whether \(\widetilde P(t)\) passes the identity, nonnegativity, and row-sum checks on this interval. Then determine whether it solves the forward equation \(P'(t)=P(t)Q\). Evaluate the equation at \(t=0.5\).

Method. For \(0\leq t\leq 1\), each entry of \(\widetilde P(t)\) is nonnegative. Its first two row totals are \((1-t)+t=1\), and the third row total is \(1\). At \(t=0\),

$$ \widetilde P(0)= \begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}=I. $$

Thus all three basic checks pass throughout the stated interval. They do not yet show that this is the solution for the given \(Q\). At \(t=0.5\), the derivative of the proposed matrix function is

$$ \widetilde P'(0.5)= \begin{pmatrix} -1&1&0\\ 0&-1&1\\ 0&0&0 \end{pmatrix}. $$

But the right-hand side of the forward equation at that time is

$$ \widetilde P(0.5)Q = \begin{pmatrix} 0.5&0.5&0\\ 0&0.5&0.5\\ 0&0&1 \end{pmatrix} \begin{pmatrix} -1&1&0\\ 0&-1&1\\ 0&0&0 \end{pmatrix} = \begin{pmatrix} -0.5&0&0.5\\ 0&-0.5&0.5\\ 0&0&0 \end{pmatrix}. $$

The derivative and \( \widetilde P(0.5)Q\) are not equal, so the proposed matrix does not solve the forward equation. For comparison, the actual first row at \(t=0.5\) is \(\big(e^{-0.5},\,0.5e^{-0.5},\,1-1.5e^{-0.5}\big)\), approximately \((0.6065,0.3033,0.0902)\), not \((0.5,0.5,0)\).

Conclusion and common mistake avoided. Passing the identity, nonnegativity, and row-sum checks is necessary but not sufficient. A candidate must also satisfy the specified differential equation and boundary condition. The common mistake is to label any stochastic matrix function a solution merely because its entries look like probabilities.

How to Use the Checks in Practice

A reliable audit separates the checks rather than treating “the matrix looks reasonable” as a single test. Start with the boundary condition, especially when a numerical routine is initialized at \(s\). Then check nonnegativity and row totals for each reported time. Finally, verify the equation itself—analytically by substitution or numerically by comparing the derivative with the appropriate right-hand side.

CheckWhat it testsWhat a failure indicates
Identity at \(t=s\)The process starts in its specified initial state with probability one.A boundary or initialization problem, or a matrix that is not the claimed transition matrix.
Nonnegative entriesEvery entry can represent a probability.An invalid value, possibly from an algebraic or numerical error.
Unit row sumsAll listed destination states account for the probability from each initial state.Missing probability, a calculation error, or a model that is not a complete-state transition matrix.
Kolmogorov equationThe matrix changes at the rate specified by the generator and equation convention.The candidate may be stochastic but still be the wrong solution.

For rounded output, row sums such as \(0.9999\) or \(1.0001\) may reflect rounding rather than a substantive failure. Check unrounded values when available and use a tolerance consistent with the numerical method. A substantial discrepancy or a negative entry should not be dismissed as rounding without evidence. These elementary audits are useful in insurance-state models because later calculations depend on transition probabilities being both probabilistically coherent and consistent with the stated model.

Key takeaway: A valid transition matrix must have the identity boundary value, nonnegative entries, and unit row sums when the state space is complete. These checks detect important failures, but verifying the Kolmogorov equation is still necessary to establish that a candidate is the solution for the given generator.

Check Your Understanding

For each item, apply the relevant stochasticity checks and distinguish them from verification of an equation solution.

  1. A proposed two-state matrix at a positive elapsed time is \(\begin{pmatrix}0.61&0.39\\0.20&0.80\end{pmatrix}\). Does it pass the nonnegativity and row-sum checks? (Answer: Yes; all entries are nonnegative and both rows sum to \(1\).)
  2. A solver reports \(P(s,s)=\begin{pmatrix}1&0\\0.02&0.98\end{pmatrix}\). Its entries are nonnegative and both rows sum to one. Does it satisfy the boundary condition? (Answer: No; the required value is \(I=\begin{pmatrix}1&0\\0&1\end{pmatrix}\).)
  3. Audit \(M=\begin{pmatrix}0.60&0.45\\-0.05&0.60\end{pmatrix}\). Identify each failed stochasticity check. (Answer: It has a negative entry, and its row sums are \(1.05\) and \(0.55\), so nonnegativity and unit row sums both fail.)
  4. A two-state chain has rate \(0.4\) per year from state 0 to state 1 and rate \(0.6\) per year from state 1 to state 0. At \(t=\ln 2\) years, use the two-state formula to give the transition matrix to four decimals. (Answer: \(\begin{pmatrix}0.8000&0.2000\\0.3000&0.7000\end{pmatrix}\); the decay factor is \(e^{-(0.4+0.6)\ln 2}=0.5\).)
  5. For the generator \(Q=\begin{pmatrix}-1&1&0\\0&-1&1\\0&0&0\end{pmatrix}\), the candidate \(\widetilde P(t)=\begin{pmatrix}1-t&t&0\\0&1-t&t\\0&0&1\end{pmatrix}\) is considered at \(t=0.5\). It passes the identity, nonnegativity, and row-sum checks on \(0\leq t\leq1\). Does it solve \(P'=PQ\) at \(t=0.5\)? (Answer: No; \(\widetilde P'(0.5)=\begin{pmatrix}-1&1&0\\0&-1&1\\0&0&0\end{pmatrix}\), whereas \(\widetilde P(0.5)Q=\begin{pmatrix}-0.5&0&0.5\\0&-0.5&0.5\\0&0&0\end{pmatrix}\).)
Clinical Biostats