Solution (source code)

= Solution

Conditioned on the jump-chain states, the successive holding times are independent exponentials with rates $q_{i_0},\ldots,q_{i_n}$. Hence
$$
q_{i_n}\mathbb P(J_n\leq t<J_{n+1}\mid Y_0=i_0,\ldots,Y_n=i_n)
$$
equals the <integral> over $s_0,\ldots,s_{n-1}\geq0$ with $\sum_{r<n}s_r\leq t$ of
$$
\left(\prod_{r=0}^{n-1}q_{i_r}e^{-q_{i_r}s_r}\right)
q_{i_n}e^{-q_{i_n}(t-\sum_{r<n}s_r)}.
$$
This simplex <integral> is unchanged by reversing the $n+1$ time portions and the rates attached to them. It is therefore
$$
q_{i_0}\mathbb P(J_n\leq t<J_{n+1}\mid Y_0=i_n,\ldots,Y_n=i_0),
$$
as required. This is <holding-time reversal along a fixed CTMC jump path>.