Why the Changing Time Matters
A transition probability depends on two times: the time \(s\) at which the process starts and the later time \(t\) at which its state is observed. Changing \(t\) extends the observation interval at its endpoint; changing \(s\) shifts the beginning of the interval. These changes involve different local transition mechanisms. In a time-inhomogeneous model, the rates at \(s\) need not equal the rates at \(t\), so distinguishing the two derivatives is essential.
Use a finite-state continuous-time Markov model with states \(1,\ldots,n\). Write \(P(s,t)\) for its transition probability matrix, with entry \(P_{ij}(s,t)\) equal to the probability of being in state \(j\) at time \(t\), conditional on being in state \(i\) at time \(s\). Thus rows refer to starting states and columns to ending states. Let \(Q(u)\) be the generator at calendar time \(u\), using the row-generator convention: off-diagonal entries are transition intensities and each row sums to zero.
The matrix order is part of each equation. In the forward equation the generator at the endpoint multiplies on the right; in the backward equation the generator at the start multiplies on the left, with a minus sign. These formulas assume the transition probabilities and rates are sufficiently regular for the derivatives to exist. They apply to time-inhomogeneous as well as time-homogeneous models. They do not say that the two derivatives are equal: they describe different changes to the interval.
Why the Multiplication Order Follows
The reason for the forward equation is that an additional short interval is appended at the end. For a small positive \(h\), the Chapman–Kolmogorov property gives \(P(s,t+h)=P(s,t)P(t,t+h)\). The short-time transition matrix is \(P(t,t+h)=I+hQ(t)+o(h)\), where the entries in \(o(h)\), divided by \(h\), tend to zero as \(h\) tends to zero. Subtracting \(P(s,t)\), dividing by \(h\), and taking the limit gives the forward equation.
For the backward equation, split off a short interval at the start instead. The composition property gives \(P(s-h,t)=P(s-h,s)P(s,t)\), and \(P(s-h,s)=I+hQ(s)+o(h)\). Therefore $$ \frac{P(s,t)-P(s-h,t)}{h} = -\;Q(s)P(s,t)+o(1). $$ Taking the limit gives the derivative with respect to \(s\). The minus sign appears because moving \(s\) forward removes an initial segment of the interval. The generator acts on the left because that removed segment is composed before the remaining transition.
If the observation endpoint changes, use the forward equation. If the starting time changes, use the backward equation.
The forward equation uses \(Q(t)\); the backward equation uses \(Q(s)\).
Multiply \(P(s,t)Q(t)\) for the forward derivative and \(-Q(s)P(s,t)\) for the backward derivative.
Each derivative matrix must have row sums zero, because each row of \(P(s,t)\) sums to one for every \(s,t\).
Worked Calculations
Worked Example: Both Derivatives in a Two-State Model
A hypothetical two-state process has transition matrix $$ P(s,t)= \begin{pmatrix} 0.7&0.3\\ 0.4&0.6 \end{pmatrix} $$ at the interval of interest. Its generator at the start time is $$ Q(s)= \begin{pmatrix} -2&2\\ 1&-1 \end{pmatrix}, $$ and its generator at the endpoint is $$ Q(t)= \begin{pmatrix} -1&1\\ 3&-3 \end{pmatrix}. $$ Calculate both derivatives. Rates are per year.
Method. Apply the forward equation using the endpoint generator, then apply the backward equation using the starting-time generator. Both generators have nonnegative off-diagonal entries and rows summing to zero.
For the forward derivative, multiply \(P(s,t)\) on the right by \(Q(t)\): $$ \frac{\partial}{\partial t}P(s,t) = \begin{pmatrix} 0.7&0.3\\ 0.4&0.6 \end{pmatrix} \begin{pmatrix} -1&1\\ 3&-3 \end{pmatrix} = \begin{pmatrix} -0.7+0.9&0.7-0.9\\ -0.4+1.8&0.4-1.8 \end{pmatrix} = \begin{pmatrix} 0.2&-0.2\\ 1.4&-1.4 \end{pmatrix}. $$
For the backward derivative, first multiply \(Q(s)\) on the left: $$ Q(s)P(s,t) = \begin{pmatrix} -1.4+0.8&-0.6+1.2\\ 0.7-0.4&0.3-0.6 \end{pmatrix} = \begin{pmatrix} -0.6&0.6\\ 0.3&-0.3 \end{pmatrix}. $$ The required minus sign then gives $$ \frac{\partial}{\partial s}P(s,t) = \begin{pmatrix} 0.6&-0.6\\ -0.3&0.3 \end{pmatrix}. $$
Check and common mistake. Both derivative matrices have rows summing to zero. Using \(Q(t)P(s,t)\) for the forward derivative would be the wrong order and would also use the wrong time’s generator. The two derivatives are different because they change different ends of the interval. No rounding is needed.
Worked Example: Derivative of an Endpoint State Distribution
A hypothetical policyholder can be in an active state or a claim state. At times \(s\) and \(t\), the transition matrix and generators are $$ P(s,t)= \begin{pmatrix} 0.6&0.4\\ 0.2&0.8 \end{pmatrix}, \quad Q(t)= \begin{pmatrix} -3&3\\ 2&-2 \end{pmatrix}, \quad Q(s)= \begin{pmatrix} -1&1\\ 4&-4 \end{pmatrix}. $$ At time \(s\), the initial distribution is \(\alpha=(0.25,0.75)\). Find the probability distribution at time \(t\) and its derivatives with respect to \(t\) and \(s\), holding \(\alpha\) fixed.
Method. Propagate the row distribution as \(\alpha P(s,t)\), then multiply the relevant transition-matrix derivative on the left by \(\alpha\). This example avoids the mistake of treating a row distribution as a column vector.
The distribution at \(t\) is $$ \alpha P(s,t) = (0.25,0.75) \begin{pmatrix} 0.6&0.4\\ 0.2&0.8 \end{pmatrix} = (0.15+0.15,\;0.10+0.60) = (0.30,0.70). $$
For the endpoint derivative, $$ P(s,t)Q(t) = \begin{pmatrix} -1.8+0.8&1.8-0.8\\ -0.6+1.6&0.6-1.6 \end{pmatrix} = \begin{pmatrix} -1&1\\ 1&-1 \end{pmatrix}. $$ Thus the endpoint distribution changes at rate $$ \alpha P(s,t)Q(t) = (0.25,0.75) \begin{pmatrix} -1&1\\ 1&-1 \end{pmatrix} = (-0.25+0.75,\;0.25-0.75) = (0.50,-0.50). $$
For the start-time derivative, the backward equation gives $$ -Q(s)P(s,t) = -\begin{pmatrix} -0.6+0.2&-0.4+0.8\\ 2.4-0.8&1.6-3.2 \end{pmatrix} = \begin{pmatrix} 0.4&-0.4\\ -1.6&1.6 \end{pmatrix}. $$ Multiplying by the fixed initial distribution gives $$ \alpha[-Q(s)P(s,t)] = (0.25,0.75) \begin{pmatrix} 0.4&-0.4\\ -1.6&1.6 \end{pmatrix} = (0.10-1.20,\;-0.10+1.20) = (-1.10,1.10). $$
Check. The endpoint probabilities sum to one, and each derivative vector sums to zero. The start-time derivative here is not a change in the initial distribution \(\alpha\); it is the change in the transition probabilities when the start of the interval moves. No rounding is needed.
Worked Example: Piecewise Rates and First-Order Propagation
In a hypothetical two-state model, the generator during the first interval is $$ Q_1= \begin{pmatrix} -1&1\\ 2&-2 \end{pmatrix}, $$ and during the next interval it is $$ Q_2= \begin{pmatrix} -2&2\\ 1&-1 \end{pmatrix}. $$ Each interval has length \(0.1\) year. Use the first-order approximation \(P(u,u+h)\approx I+hQ(u)\) on each interval. Then estimate \(P(0,0.2)\) and the forward and backward derivatives at the interval endpoints, using the corresponding local generators.
Method. Approximate each short transition matrix, compose the intervals in chronological order, and use the forward and backward equations with the resulting transition matrix. This is an approximation; the derivatives are evaluated by substituting the approximate \(P(0,0.2)\) into the exact differential-equation forms.
The two short-interval approximations are $$ I+0.1Q_1= \begin{pmatrix} 0.9&0.1\\ 0.2&0.8 \end{pmatrix}, \qquad I+0.1Q_2= \begin{pmatrix} 0.8&0.2\\ 0.1&0.9 \end{pmatrix}. $$ The first interval comes before the second, so $$ P(0,0.2)\approx \begin{pmatrix} 0.9&0.1\\ 0.2&0.8 \end{pmatrix} \begin{pmatrix} 0.8&0.2\\ 0.1&0.9 \end{pmatrix} = \begin{pmatrix} 0.73&0.27\\ 0.24&0.76 \end{pmatrix}. $$
At the endpoint, use \(Q_2\): $$ \frac{\partial}{\partial t}P(0,t)\bigg|_{t=0.2} \approx \begin{pmatrix} 0.73&0.27\\ 0.24&0.76 \end{pmatrix} \begin{pmatrix} -2&2\\ 1&-1 \end{pmatrix} = \begin{pmatrix} -1.46+0.27&1.46-0.27\\ -0.48+0.76&0.48-0.76 \end{pmatrix} = \begin{pmatrix} -1.19&1.19\\ 0.28&-0.28 \end{pmatrix}. $$ At the start, use \(Q_1\): $$ \frac{\partial}{\partial s}P(s,0.2)\bigg|_{s=0} \approx -Q_1 \begin{pmatrix} 0.73&0.27\\ 0.24&0.76 \end{pmatrix} = \begin{pmatrix} 0.49&-0.49\\ -0.98&0.98 \end{pmatrix}. $$
Check and common mistake. Each approximate short-interval matrix and the composed matrix has rows summing to one; both derivative matrices have rows summing to zero. Reversing the interval order would change the composed transition matrix. The first-order approximation is not an exact transition calculation, so its numerical derivatives are estimates as well.
Time-Homogeneous Models and Exam Traps
If the generator is constant, then \(Q(s)=Q(t)=Q\), but the equations still have different signs and multiplication sides: $$ \frac{\partial}{\partial t}P(s,t)=P(s,t)Q, \qquad \frac{\partial}{\partial s}P(s,t)=-QP(s,t). $$ In a homogeneous model the transition matrix depends only on the elapsed time, so increasing \(t\) and increasing \(s\) by the same amount change the elapsed time in opposite directions. That explains the opposite signs. For a constant generator, \(P(s,t)\) commutes with \(Q\), but this special property should not be assumed in a time-inhomogeneous model. When rates vary with calendar time, \(Q(s)\) and \(Q(t)\) may differ, and even matrices evaluated at different times need not commute.
A reliable exam approach is to annotate each derivative before doing any multiplication: “change endpoint” or “change start.” Then identify the generator at that calendar time and preserve the row-generator convention. A row-sum check can catch arithmetic errors, but it cannot detect an incorrect multiplication order if the wrong product also has zero row sums.
- Wrong: using \(Q(s)P(s,t)\) for the forward derivative. Correction: append the short transition at the endpoint, giving \(P(s,t)Q(t)\).
- Wrong: using \(+Q(s)P(s,t)\) for the backward derivative. Correction: increasing the start time removes an initial segment, giving \(-Q(s)P(s,t)\).
- Wrong: replacing \(Q(s)\) by \(Q(t)\) in a time-inhomogeneous model. Correction: use the local generator at the time being changed.
Check Your Understanding
For each problem, identify the changing time before carrying out any matrix multiplication.
- For a two-state model, \(P(s,t)=\begin{pmatrix}0.8&0.2\\0.3&0.7\end{pmatrix}\) and \(Q(t)=\begin{pmatrix}-2&2\\1&-1\end{pmatrix}\). Find the forward derivative. (Answer: \(\begin{pmatrix}-1.4&1.4\\0.1&-0.1\end{pmatrix}\))
- For \(P(s,t)=\begin{pmatrix}0.5&0.5\\0.25&0.75\end{pmatrix}\) and \(Q(s)=\begin{pmatrix}-1&1\\3&-3\end{pmatrix}\), find the backward derivative. (Answer: \(\begin{pmatrix}0.25&-0.25\\-0.75&0.75\end{pmatrix}\))
- With initial distribution \(\alpha=(0.4,0.6)\) and forward derivative matrix \(\begin{pmatrix}-1.4&1.4\\0.1&-0.1\end{pmatrix}\), find the derivative of the endpoint state distribution. (Answer: \((-0.50,0.50)\))
- A candidate writes \(\partial P(s,t)/\partial t=Q(t)P(s,t)\). State the error under the row-generator convention and give the corrected expression. (Answer: the multiplication order is reversed; \(\partial P(s,t)/\partial t=P(s,t)Q(t)\).)
- For \(P(s,t)=\begin{pmatrix}0.6&0.4\\0.2&0.8\end{pmatrix}\), \(Q(t)=\begin{pmatrix}-1&1\\2&-2\end{pmatrix}\), and \(Q(s)=\begin{pmatrix}-3&3\\1&-1\end{pmatrix}\), calculate both derivatives. (Answer: forward \(\begin{pmatrix}0.2&-0.2\\1.4&-1.4\end{pmatrix}\); backward \(\begin{pmatrix}1.2&-1.2\\-0.4&0.4\end{pmatrix}\).)