Tutorials › Exam ALTAM - Advanced Long-Term Actuarial Mathematics › Numerical Matrix Exponentials for State Models

Exam ALTAM · Transition Probabilities · Tutorial 48 of 999

Numerical Matrix Exponentials for State Models

Turn a constant intensity matrix into transition probabilities, interpret its entries, and check the numerical output.

Beginner 10 min read

What You'll Learn

  • Set up the matrix exponential using a stated row-and-column convention
  • Use calculator or software output to obtain transition probabilities
  • Interpret selected entries in terms of starting and ending states
  • Check probabilities for nonnegativity and row sums
  • Distinguish rounding differences from substantive numerical errors

From an Intensity Matrix to Numerical Probabilities

For a time-homogeneous continuous-time Markov model, the intensity matrix describes the instantaneous rates of movement among states. Transition probabilities over a positive duration are obtained by evaluating a matrix exponential. In practice, this often means entering a matrix and a time into numerical software or a calculator with matrix-function capability, then checking that the returned entries make sense for the model.

Use the row convention: rows identify the state at the start of the interval, and columns identify the state at its end. Thus \(P_{ij}(t)\) is the probability of being in state \(j\) after \(t\) time units, given that the process is in state \(i\) initially. If \(Q\) is the intensity matrix, its off-diagonal entry \(q_{ij}\) is the transition intensity from \(i\) to \(j\), and each diagonal entry is the negative sum of the other entries in its row.

Definition: For a constant intensity matrix \(Q\), the transition probability matrix over duration \(t\) is \(P(t)=\exp(Qt)\). The entry in row \(i\), column \(j\) is \(P_{ij}(t)\). Under the usual finite-state, time-homogeneous Markov model, \(P(0)\) is the identity matrix, each entry of \(P(t)\) is nonnegative, and every row sums to one. This formula does not apply unchanged when the intensities vary with time.

A matrix exponential is not obtained by taking the ordinary exponential of each matrix entry. It is defined by the series \(I+Qt+(Qt)^2/2!+(Qt)^3/3!+\cdots\), or evaluated by a numerical algorithm designed for matrix functions. Many scientific computing environments provide a matrix-exponential function; a spreadsheet or basic calculator may not. If a tool lacks that function, use software that implements it rather than applying a scalar exponential entry by entry.

Why the Matrix Exponential Is the Right Calculation

The short-interval transition probabilities imply the forward differential equation \(P'(t)=P(t)Q\), with initial condition \(P(0)=I\), under the row convention. The matrix \(P(t)=\exp(Qt)\) satisfies both: differentiating its power series gives \(P'(t)=P(t)Q\), and setting \(t=0\) leaves only \(I\). This explains why software evaluates the exponential of the product \(Qt\), not \(Q\) alone.

In a numerical calculation, the unit used for \(t\) must match the unit used for the intensities. For example, if entries of \(Q\) are per year, enter \(t\) in years. A robust computation also preserves the direction of multiplication: the requested matrix is \(\exp(Qt)\). The order is immaterial in this particular product because \(t\) is a scalar, but the row-and-column interpretation still matters when reading the result.

1
Record the state order and time unit.
Write down the row and column order and ensure that duration and intensities use consistent units.
2
Enter the complete matrix.
Include negative diagonal entries; do not omit states that are absorbing, since they still have rows and columns.
3
Evaluate the matrix exponential.
Use a matrix-exponential function to calculate \(\exp(Qt)\), retaining enough digits for checks.
4
Interpret and verify.
Read the selected entry using its starting and ending states, then check nonnegativity and row sums before rounding for presentation.

Worked Numerical Examples

The examples use hypothetical state models. Numerical entries are displayed to six decimal places unless otherwise stated; calculations and checks use additional digits before rounding.

Worked Example: A Two-State Model With Transitions in Both Directions

A hypothetical contract-status model has two states, Active and Suspended. The intensity of moving from Active to Suspended is \(0.2\) per year, and the intensity of moving from Suspended to Active is \(0.1\) per year. Calculate the one-year transition matrix and interpret two entries.

Method. Order the states as Active, Suspended. The diagonal entries are negative row totals, so

$$ Q=\begin{pmatrix}-0.2&0.2\\0.1&-0.1\end{pmatrix}. $$

For a two-state model with rates \(\alpha\) from state 1 to state 2 and \(\beta\) from state 2 to state 1, the probability of being in state 1 at time \(t\), starting in state 1, is \(\frac{\beta}{\alpha+\beta}+\frac{\alpha}{\alpha+\beta}e^{-(\alpha+\beta)t}\). Here \(\alpha+\beta=0.3\), and \(e^{-0.3}=0.7408182207\). Therefore,

$$ P_{11}(1)=\frac{0.1}{0.3}+\frac{0.2}{0.3}(0.7408182207) =0.3333333333+0.4938788138 =0.8272121471. $$

The other entries follow from the corresponding two-state probabilities:

$$ P(1)= \begin{pmatrix} 0.827212&0.172788\\ 0.086394&0.913606 \end{pmatrix}. $$

Starting Active, the probability of being Suspended after one year is \(P_{12}(1)=0.172788\). Starting Suspended, the probability of being Active after one year is \(P_{21}(1)=0.086394\). These are different because the starting states and their transition rates differ. Each displayed row sums to \(1.000000\).

Check and common mistake. The off-diagonal entries are nonnegative, and the diagonal entries lie between zero and one. A common error is to copy the probability of moving from Active to Suspended into the reverse-direction entry. The reverse probability is \(0.086394\), not \(0.172788\); it must be read from row Suspended, column Active.

Worked Example: A Three-State Model With an Absorbing State

A hypothetical service model has states A, B, and Closed. From A, the process moves to B at intensity \(0.2\) per year and to Closed at intensity \(0.1\) per year. From B, it moves to Closed at intensity \(0.3\) per year. Closed is absorbing. Find the two-year transition matrix.

Method. In the order A, B, Closed, the intensity matrix is

$$ Q=\begin{pmatrix} -0.3&0.2&0.1\\ 0&-0.3&0.3\\ 0&0&0 \end{pmatrix}. $$

The A-to-A and B-to-B probabilities are both \(e^{-0.3(2)}=e^{-0.6}=0.5488116361\). The A-to-B probability can be obtained by integrating over the time of the transition from A to B. If that transition occurs at time \(s\), the probability density contribution is \(e^{-0.3s}(0.2)e^{-0.3(2-s)}\). Thus,

$$ P_{AB}(2)=\int_0^2 e^{-0.3s}(0.2)e^{-0.3(2-s)}\,ds =0.2(2)e^{-0.6} =0.2195246544. $$

The remaining probability in row A is the probability of ending in Closed: \(1-0.5488116361-0.2195246544=0.2316637095\). From B, the probability of reaching Closed is \(1-e^{-0.6}=0.4511883639\). Since Closed is absorbing, its row remains \((0,0,1)\). The full result is

$$ P(2)\approx \begin{pmatrix} 0.548812&0.219525&0.231664\\ 0&0.548812&0.451188\\ 0&0&1 \end{pmatrix}. $$

For example, \(P_{AC}(2)=0.231664\) is the probability that a process starting in A is Closed two years later. It includes both direct movement from A to Closed and paths that first move to B and then to Closed.

Check and common mistake. Using unrounded values, the first row sums to \(1\), and the second row sums to \(0.5488116361+0.4511883639=1\). A common error is to count only the direct A-to-Closed route when finding \(P_{AC}(2)\). The row complement correctly includes every route ending in Closed.

Worked Example: Checking a Cyclic Model’s Software Output

A hypothetical process cycles through states A, B, and C in that order, then returns from C to A. Each forward transition has intensity \(1\) per year. Use the one-year matrix exponential, interpret selected entries, and check the numerical result.

Method. With state order A, B, C, the generator is

$$ Q=\begin{pmatrix} -1&1&0\\ 0&-1&1\\ 1&0&-1 \end{pmatrix}. $$

A matrix-exponential function returns, to six decimal places,

$$ \exp(Q)= \begin{pmatrix} 0.429705&0.383281&0.187015\\ 0.187015&0.429705&0.383281\\ 0.383281&0.187015&0.429705 \end{pmatrix}. $$

The pattern can be checked independently. Because the holding-time rate is \(1\) in every state, the number \(N\) of transitions in one year has a Poisson distribution with mean \(1\). Starting in A, the process ends in A, B, or C according as \(N\) is congruent to \(0\), \(1\), or \(2\) modulo \(3\). For example,

$$ P_{AA}(1)=P(N=0)+P(N=3)+P(N=6)+\cdots =e^{-1}\left(1+\frac{1}{3!}+\frac{1}{6!}+\cdots\right) \approx0.429705. $$

Similarly, summing the Poisson probabilities for counts congruent to \(1\) and \(2\) modulo \(3\) gives \(P_{AB}(1)\approx0.383281\) and \(P_{AC}(1)\approx0.187015\). Thus \(P_{AC}(1)\) is not the probability of exactly two transitions; it includes two, five, eight, and all later counts congruent to two modulo three. The rows of the displayed, rounded matrix each sum to \(1.000001\). The unrounded probabilities sum to \(1\); the small excess is due to rounding each entry separately.

Check and common mistake. All entries are nonnegative, and the rows have the expected cyclic pattern. A common mistake is to treat the three displayed rounded values as exact and call their sum a failure of the stochastic-row check. Keep extra digits during computation and allow a small row-sum discrepancy after rounding.

Numerical Accuracy and Interpretation

A numerical matrix exponential is an approximation to the mathematical result, so the number of displayed decimal places should not be confused with the accuracy of the calculation. Retain several guard digits, check the result before rounding, and report probabilities at the requested precision. If a row does not sum to approximately one, first check the state order, generator diagonals, time unit, and whether the software was asked for a matrix exponential rather than an entrywise exponential.

For an \(n\)-state model, useful basic checks are:

  • Every entry should be nonnegative, apart from a tiny negative value that may arise from numerical roundoff in a computation with limited precision.
  • Each row should sum to one before rounding; the sum of separately rounded entries may differ slightly.
  • At duration zero, the result should be the identity matrix.
  • An absorbing state has a row with a one in its own column and zeros elsewhere for every duration.
  • Each entry must be interpreted using the stated starting-state row and ending-state column.

These checks do not replace the matrix-exponential calculation, but they often reveal a transcription or interpretation error. This numerical skill is aligned with the SOA Exam ALTAM (Advanced Long-Term Actuarial Mathematics) syllabus, where a correctly computed probability must also be read in the context of the state model.

Key takeaway: For constant intensities, evaluate \(\exp(Qt)\) with a matrix-exponential function, use consistent time units, and interpret entries by row and column. Check the unrounded output for nonnegativity and row sums; treat small discrepancies in rounded displays as rounding effects only when the underlying calculation is sound.

Check Your Understanding

For each problem, use the stated state order and retain sufficient digits for your checks.

  1. A two-state model has intensity \(0.4\) per year from state 1 to state 2 and \(0.2\) per year in the reverse direction. Find the one-and-a-half-year transition matrix, rounded to four decimals. (Answer: \(\begin{pmatrix}0.6044&0.3956\\0.1978&0.8022\end{pmatrix}\))
  2. State A moves to absorbing state B at intensity \(0.25\) per year. What is the probability of being in B after two years, starting in A? (Answer: \(0.3935\))
  3. In the ordered states A, B, C, the only transitions are A to B at intensity \(0.4\) per year and B to C at intensity \(0.2\) per year; C is absorbing. Find \(P_{AB}(1)\) and \(P_{AC}(1)\), rounded to four decimals. (Answer: \(P_{AB}(1)=0.2968,\ P_{AC}(1)=0.0329\))
  4. A three-state cycle A to B to C to A has intensity \(0.5\) per year on each transition. What is \(P_{AC}(2)\), to four decimals? (Answer: \(0.1870\))
  5. A software result for a three-state model displays one row as \((0.429705,0.383281,0.187015)\). Is the displayed row sum exactly one, and what should be concluded about the unrounded row if it came from a valid transition matrix? (Answer: The displayed sum is \(1.000001\), not exactly one; the unrounded row should sum to one, with the excess attributable to rounding.)
Clinical Biostats