Abstract
Linear compartmental models are commonly used in different areas of science, particularly in modeling the cycles of carbon and other biogeochemical elements. The representation of these models as linear autonomous compartmental systems allows different model structures and parameterizations to be compared. In particular, measures such as system age and transit time are useful model diagnostics. However, compact mathematical expressions describing their probability distributions remain to be derived. This paper transfers the theory of open linear autonomous compartmental systems to the theory of absorbing continuous-time Markov chains and concludes that the underlying structure of all open linear autonomous compartmental systems is the phase-type distribution. This probability distribution generalizes the exponential distribution from its application to one-compartment systems to multiple-compartment systems. Furthermore, this paper shows that important system diagnostics have natural probabilistic counterparts. For example, in steady state the system’s transit time coincides with the absorption time of a related Markov chain, whereas the system age and compartment ages correspond with backward recurrence times of an appropriate renewal process. These relations yield simple explicit formulas for the system diagnostics that are applied to one linear and one nonlinear carbon-cycle model in steady state. Earlier results for transit-time and system-age densities of simple systems are found to be special cases of probability density functions of phase-type. The new explicit formulas make costly long-term simulations to obtain and analyze the age structure of open linear autonomous compartmental systems in steady state unnecessary.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Compartmental models are widely used to describe a range of biological and physical processes that rely on mass conservation principles (Anderson 1983; Jacquez and Simon 1993). In particular, most models that describe the carbon cycle can be generalized as compartmental models (Luo and Weng 2011; Sierra and Müller 2015; Rasmussen et al. 2016). These models are very important for predicting interactions between ecosystems and the global climate. However, the predictions of these models diverge widely (Friedlingstein et al. 2006, 2014) since models have different structures and parameter values. To compare diverse models, key quantities such as system age and transit time can be considered. These quantities provide relevant information about the time scales at which material is cycled in compartmental systems and facilitate comparisons among different model structures and parameterizations. Formulas for their means were recently provided by Rasmussen et al. (2016) for linear nonautonomous compartmental systems. For autonomous systems, that is, systems with constant coefficients, the existence of explicit solutions raises hope for explicit formulas not only for the means, but also for the densities of system age and transit time.
A first attempt in this direction was started by Nir and Lewis (1975) who established formulas for transit-time and age densities in dependence on a not explicitly known system response function. This response function was the basis for Thompson and Randerson (1999) to compute the desired densities numerically by long-term simulations in two carbon-cycle models. Impulsive inputs and how systems respond to them were later investigated by Manzoni et al. (2009) to obtain explicitly the system response function for a set of carbon-cycle models of very simple structure. Despite the simple structure of these systems, the derivation of the according density formulas is involved, because the system’s response needs to be transformed from the phase domain to the Laplace domain and back. In this manuscript, the dynamics of linear autonomous compartmental systems are considered as a stochastic process to show that the impulse response function is the probability density function of a phase-type distribution. To this end, open linear autonomous compartmental systems are related to absorbing continuous-time Markov chains.
This manuscript is organized as follows. In Sect. 2, linear autonomous compartmental systems are introduced, and the idea of looking at them from the perspective of one single particle is framed. The transit time of this particle through the system coincides with the absorption time of a continuous-time Markov chain. A short presentation of the basic ideas of continuous-time Markov chains follows in Sect. 3. The probability distribution of the absorption time is shown to be an example of a phase-type distribution, and its cumulative distribution function, probability density function, and moments are computed. In Sect. 4, concepts from renewal theory are used to construct a regenerative process, which is the basis for the computation of the system- and compartment-age densities. The relationship of Markov chains and linear autonomous compartmental systems is established in Sect. 5, where the previous probabilistic results are used to obtain simple explicit formulas for the densities of the system age, compartment age, and transit time. In Sect. 6, the derived formulas are applied to two autonomous terrestrial carbon-cycle models. Both models are considered in steady state, which allows the treatment of a linear model (Emanuel et al. 1981), as well as a nonlinear one (Wang et al. 2014) within the proposed framework. Relations to earlier work and some other aspects are discussed in Sect. 7, and in Sect. 8 conclusions are presented. “Appendix A” contains the proof of the main theorem from Sect. 4, and “Appendix B” covers some examples for systems with simple structure.
2 Linear Autonomous Compartmental Systems
Compartmental differential equations are useful tools to describe flows of material between units called compartments under the constraint of mass conservation. Following Jacquez and Simon (1993), a compartment is an amount of some material that is kinetically homogeneous. This means that the material of a compartment is at all times homogeneous; any material entering the compartment is instantaneously mixed with the material already there. Hence, compartments are always well-mixed.
Consider the d-dimensional linear system of differential equations
This equation system represents how mass flows at time \(t=0\) into a set of compartments, flows and cycles among the compartments, and eventually leaves the system. Therefore, the vector \(\mathbf {x^0}\) of initial contents and the constant input vector \(\mathbf {u}\) are required to have nonnegative entries only. The law of conservation of mass imposes restrictions on the \(d\times d\)-matrix \({\mathsf {B}}\).
Definition 1
A matrix \({\mathsf {B}}=(b_{ij})\in \mathbb {R}^{d\times d}\) is called a compartmental matrix if
-
(i)
\(0\le b_{ij}\) for all \(i\ne j\),
-
(ii)
\(0\le -b_{jj}<\infty \) for all j,
-
(iii)
\(\sum _{i=1}^d b_{ij} \le 0\) for all j.
If now \({\mathsf {B}}\) is a compartmental matrix, (1) is called a linear autonomous compartmental system. The term autonomous refers to the fact that both \({\mathsf {B}}\) and \(\mathbf {u}\) are independent of time t. A detailed treatment of such systems can be found in Anderson (1983) and Jacquez and Simon (1993).
For \(t\ge 0\) the vector \(\mathbf {x}(t)\in \mathbb {R}^d\) represents the contents of the different compartments at time t. The off-diagonal entries \(b_{ij}\) of \({\mathsf {B}}\) are called fractional transfer coefficients. They are the rates at which mass moves from compartment j to compartment i. For \(j=1,\ldots ,d\), the nonnegative value \(z_j=-\sum _{i=1}^d b_{ij}\) is the rate at which mass leaves the system from compartment j. If at least one of these output or release rates is greater than zero, system (1) is called open, otherwise it is called closed. This paper is concerned with open systems only, since closed systems with positive input accumulate mass indefinitely.
2.1 The One-Particle Perspective
Looking at the behavior of the entire system, the initial content \(\mathbf {x^0}\) distorts what can be seen happening to the system content. There are two ways to get rid of this disturbing influence of the initial content. One way is to consider the system after it has run for an infinite time such that all the initial content has left. Another way is to look at one single particle that just arrives at the system through new input \(\mathbf {u}\).
Since all compartments are well-mixed, this particle’s way through the system is not influenced by the presence or absence of any other particles. It enters the system at a compartment according to \(\mathbf {u}\) and then, at each time step, whether it stays or moves on is decided on the basis of its current position and its schedule. If the decision is to move on, then it can move to another compartment or leave the system, depending only on the connections of the current compartment. The particle follows a schedule and a map given by the matrix \({\mathsf {B}}\). Its diagonal entries govern how long the particle stays in a certain compartment, and the off-diagonal entries provide the connections to other compartments. By leaving the system, the particle finishes a cycle and starts a new one by reentering the system. At each cycle, the sequence of compartments to which the particle belongs at successive time steps constitutes a stochastic process called discrete-time Markov chain. Letting the size of the time steps tend to zero, the particle’s future becomes continuously uncertain. The path of the particle traveling through the system is then represented by a continuous-time Markov chain (Norris 1997).
In Sect. 2.2, the structure and properties of continuous-time Markov chains are introduced, and the reader should always have in mind the traveling particle. When the Markov chain changes its state from j to i, the particle is considered to move from compartment j to compartment i. When the Markov chain is absorbed, the particle leaves the system. The time that elapses from the moment the particle enters the system to the moment of its exit is called the particle’s transit time. To get a grasp on it, from the beginning of the cycle only a look into the future is necessary.
While the particle is still in the system, the time that has passed since the particle’s entry is called its system age. If the age of the particle is considered at a random time, a look into the past of the particle is needed, not knowing when it entered the system the last time. Consequently, it has to be assumed that the particle has ran through the system already infinitely often. Otherwise the existence of a maximum age of the particle would be implied, but any choice of this maximum value would be arbitrary and ill-founded. Therefore, a particular regenerative process will be considered: a sequence of absorbing continuous-time Markov chains.
2.2 From One Particle to All Particles in the System
Assume that the system at time \(t\ge 0\) contains n particles with system ages represented by n independent and identically distributed random variables. Hence, the system age \(A_k\) of particle k is assumed to have the cumulative distribution function \(F_A\) for all \(k=1,2,\ldots ,n\). The share of particles with system age less than or equal to \(y\ge 0\) equals
Here, \(\mathbb {1}_S(s)\) denotes the indicator function. It equals 1 if \(s\in S\) and it equals 0 otherwise. The function \(F_n\) is called empirical distribution function of \(A_1,A_2,\ldots , A_n\), and from the Glivenko–Cantelli theorem (Dudley 1999) it is known that it converges almost surely uniformly to \(F_A\) if the number n of particles goes to infinity. Consequently, if the system contains an infinite amount of particles, the share of the total system content \(\mathbf {x}(t)\) that has system age less than or equal to y is
where \(f_A\) is the common probability density function of the particles’ ages.
3 Continuous-Time Markov Chains
Markov chains are the most important examples of random processes. Given their simple structure and high diversity, they are applied to many different scientific problems. In particular, they are the simplest mathematical models for random phenomena evolving in time. Their characteristic property is that they retain no memory on the states of the system in the past. Only the current state of the process can influence where it goes next. If the process can assume only a finite or countable set of states, it is called a Markov chain. Discrete-time Markov chains are usually defined on a set of integers, whereas continuous-time Markov chains live on a subset of the real line. In the following, the basic theory of continuous-time Markov chains is introduced along the line of Norris (1997), from which also most unproven results are taken.
A vector \({\varvec{\lambda }}\in \mathbb {R}^d\) is called a distribution if all its components are nonnegative and sum to one. Furthermore, a matrix \({\mathsf {P}}=(p_{ij})_{i,j\in J}\) is called stochastic on a finite set J if every column \((p_{ij})_{i\in J}\) is a distribution. Note that in standard literature on Markov chains row sums are considered. Here, column sums are used instead, because thereby the connection to compartmental matrices will become more obvious later. The definition of a Markov chain can best be formalized in terms of its corresponding transition rate matrix. A transition rate matrix is a special compartmental matrix where all columns sum to zero.
Definition 2
Let J be a finite state space. A transition rate matrix on J is a matrix \({\mathsf {Q}}=(q_{ij})_{i,j\in J}\) satisfying the conditions
-
(i)
\(0\le q_{ij}\) for all \(i\ne j\),
-
(ii)
\(0\le -q_{jj}<\infty \) for all j,
-
(iii)
\(\sum _{i\in J} q_{ij} = 0\) for all j.
Each off-diagonal entry \(q_{ij}\) can be interpreted as the rate of going from state j to state i and the diagonal entries \(q_{jj}\) as the rate of leaving state j.
Definition 3
Let \({\mathsf {Q}}\) be a transition rate matrix and \({\varvec{\lambda }}\) a distribution on a finite state space J. A stochastic process \(X=(X_t)_{t\ge 0}\) is a continuous-time Markov chain on J with initial distribution \({\varvec{\lambda }}\) and transition rate matrix \({\mathsf {Q}}\) if
-
(i)
\(\mathbb {P}(X_0=j) = \lambda _j\) for all \(j\in J\);
-
(ii)
for all \(n=0,1,2,\ldots \), all times \(0\le t_0\le t_1\le \cdots \le t_{n+1}\), and \(j_0,j_1,\ldots ,j_{n+1}\in J\),
$$\begin{aligned} \mathbb {P}\left( X_{t_{n+1}} = j_{n+1}\,|\,X_{t_0}=j_0,\ldots ,X_{t_n}=j_n\right) =\left( \mathrm{e}^{(t_{n+1}-t_n)\,{\mathsf {Q}}}\right) _{j_{n+1} j_n}, \end{aligned}$$where for any quadratic matrix \({\mathsf {M}}\) the expression \(\mathrm{e}^{\mathsf {M}}\) denotes the matrix exponential
$$\begin{aligned} \mathrm{e}^{\mathsf {M}} = \sum \limits _{k=0}^\infty \frac{{\mathsf {M}}^k}{k!}. \end{aligned}$$
Since \({\mathsf {Q}}\) does not depend on time, X is called homogeneous. Property (ii) states that the future evolution of a Markov process depends only on its current state and not on its history. This is called Markov property.
Let X be a continuous-time Markov chain on J with initial distribution \({\varvec{\lambda }}\) and transition rate matrix \({\mathsf {Q}}\). Then, for \(i,j\in J\), the probability of being in state i at time t having started in state j is equal to
and the probability of being in state i at time t (conditioned on the initial distribution \({\varvec{\lambda }}\)) is
3.1 Absorbing Continuous-Time Markov Chains
Consider a continuous-time Markov chain \(X=(X_t)_{t\ge 0}\) with a special structure. Its finite state space J is assumed to be equal to \(\{1,2,\ldots ,d, d+1\}\) for some natural number \(d\ge 1\), and its transition rate matrix has the shape
Here, \(\mathbf {0}\) is the d-dimensional column vector containing only zeros. Let \(S:=\{1,2,\ldots ,d\}\subseteq J\). The \(d\times d\)-matrix \({\mathsf {B}}=(b_{ij})_{i,j\in S}\) is assumed to meet the requirements (i) and (ii) of a transition rate matrix, but instead of property (iii) of Definition 2 it fulfills only the weaker condition
Since \({\mathsf {Q}}\) is required to be a transition rate matrix, the vector \(\mathbf {z}\in \mathbb {R}^d\) must contain the missing parts to make the columns sum to zero. Consequently, \(z_j=-\sum _{i\in S} b_{ij}\), which in matrix notation is written as
where \(\mathbf {1}^T\) denotes the d-dimensional row vector comprising ones. This means that the \(z_j\) are nonnegative and denote the transition rates from j to \(d+1\). The \((d+1)\)st column of \({\mathsf {Q}}\) contains only zeros. Consequently, the process X cannot change its state anymore once it has reached state \(d+1\). For that reason, \(d+1\) is called the absorbing state of X. The trivial case in which the process starts in its absorbing state is excluded by considering only initial distributions \({\varvec{\lambda }}\) with \(\lambda _{d+1}=0\). Then the new initial distribution of X is defined as
A standard linear algebra argument shows that
where the asterisk \(*\) is a place holder for a d-dimensional row vector. This means for \(i,j\in S\) that
and
3.2 The Absorption Time
The absorption time
is a random variable that tells the time when the absorbing state is reached. Another name for it is hitting time of the absorbing state. It is an interesting question whether the absorbing state will always be reached no matter in which state the process starts. The following lemma (Neuts 1981, Lemma 2.2.1) provides an answer to this question.
Lemma 1
If \({\mathsf {B}}\) is nonsingular, then the absorption time T is finite with probability one.
Definition 4
A Markov chain X on \(J = \{1,2,\ldots ,d,d+1\}\) whose transition rate matrix \({\mathsf {Q}}\) has the structure of Eq. (2) and that will eventually be absorbed to \(d+1\) with probability one is called absorbing. The matrix \({\mathsf {B}}\) is called its transition rate matrix, \(S=\{1,2,\ldots ,d\}\) its state space, and \(d+1\) its absorbing state. If \({\varvec{\lambda }}\) denotes the initial distribution of X, then \({\varvec{\beta }}\) as defined in Eq. (4) is called the initial distribution of the absorbing chain.
The following results related to absorbing continuous-time Markov chains will be used in the forthcoming.
Remark 1
For an absorbing continuous-time Markov chain eventual absorption is certain, independent of the initial state. Hence,
Lemma 2
If \({\mathsf {B}}\) is nonsingular, then
Remark 2
Since \({\mathsf {Q}}\) is a transition rate matrix, \(\mathrm{e}^{t\,{\mathsf {Q}}}\) is stochastic. This makes all of its entries and hence all entries of \(\mathrm{e}^{t\,{\mathsf {B}}}\) nonnegative. From Eq. (6) it follows that also all entries of \(-{\mathsf {B}}^{-1}\) are nonnegative.
From now on, let \({\mathsf {B}}\) be the nonsingular transition rate matrix of an absorbing continuous-time Markov chain \(X=(X_t)_{t\ge 0}\) on \(S=\{1,2,\ldots ,d\}\) with initial distribution \({\varvec{\beta }}\) and absorbing state \(d+1\). As it turns out, the absorption time T follows a phase-type distribution that depends on the initial distribution \({\varvec{\beta }}\) and on the transition rate matrix \({\mathsf {B}}\).
3.2.1 Probability Distributions of Phase-Type
Phase-type distributions constitute a highly versatile class of probability distributions and are closely related to the solutions of systems of linear differential equations with constant coefficients. As mixtures of exponential distributions, they generalize the Erlang, hypoexponential, and hyperexponential distribution. These are widely used in queuing theory and the field of renewal processes. An introduction to phase-type distributions and the unifying matrix formalism used in this paper can be found in Neuts (1981).
At time t, the cumulative distribution function \(F_T(t)=\mathbb {P}(T\le t)\) of the absorption time T is equal to the probability of not being in any of the states \(j\in S\). Consequently, using Eq. (5) leads to
Using \(\mathbf {z}^T=-\mathbf {1}^T\,{\mathsf {B}}\) from Eq. (3), the probability density function is
A probability distribution according to this density is called phase-type with initial distribution \({\varvec{\beta }}\) and transition rate matrix \({\mathsf {B}}\). Neuts (1981) introduced the notation \(T\sim {\text {PH}}({\varvec{\beta }},{\mathsf {B}})\).
3.2.2 Moments of the Phase-Type Distribution
Let \(T\sim {\text {PH}}({\varvec{\beta }},{\mathsf {B}})\) with nonsingular \({\mathsf {B}}\) and \(\mathbf {z}^T=-\mathbf {1}^T\,{\mathsf {B}}\). Lemma 2 can be used to calculate the nth moment of the phase-type distribution. Repeated integration by parts leads to
In particular, the first moment of the phase-type distribution is
where \(\Vert \mathbf {v}\Vert :=\sum _{j=1}^d |v_j|\) denotes the norm of a vector \(\mathbf {v}\in \mathbb {R}^d\). The last equality holds since both the matrix \(-{\mathsf {B}}^{-1}\) and the vector \({\varvec{\beta }}\) are nonnegative. For \(-{\mathsf {B}}^{-1}\) this follows from Remark 2 and for \({\varvec{\beta }}\) because it is a distribution.
Note that the variance, that is the second central moment, of the phase-type distribution can be obtained from \(\sigma ^2_T = \mathbb {E}[T^2] - (\mathbb {E}[T])^2\).
3.2.3 A Closure Property of the Phase-Type Distributions
The class of phase-type distributions has several closure properties, one of which is given by the following lemma (Neuts 1981, Theorem 2.2.3).
Lemma 3
If \(T\sim {\text {PH}}({\varvec{\beta }},{\mathsf {B}})\), then a random variable with cumulative distribution function
is phase-type distributed with initial distribution
and transition rate matrix \({\mathsf {B}}\).
3.3 Occupation Time
Before its absorption, X takes on different states \(j\in S\). Its occupation time of state j is defined as the time the process spends in state j. It is given as the nonnegative random variable
Using \(\mathbb {E}[\mathbb {1}_{X_t=j}]=\mathbb {P}(X_t=j)\) and Eq. (6), its expected value can be computed to
In particular, \((-{\mathsf {B}}^{-1})_{ij}\) is the mean time the Markov chain is in state i before absorption, under the condition that it started in state j.
3.4 The Last State Before Absorption
Let E denote the state from which X jumps to the absorbing state. From the homogeneity of X follows
where \(O_j\) is the occupation time of state j.
4 A Regenerative Process
Assume that an absorbing continuous-time Markov chain is restarted immediately every time it hits the absorbing state. The goal of this section is to determine the distribution of the age of this new process at a random time \(\tau \) drawn from the positive half-line (technical details on \(\tau \) are presented in “Appendix A”). Age means here the time that has passed since the last restart.
First, the new situation is set up, then the distribution of the age at a random time is derived, and as a last step the age distribution at a random time under the condition of being in a fixed state is computed. Important tools are elements from renewal theory such as renewal and regenerative processes. A comprehensive treatise of this topic can be found in Asmussen (2003).
4.1 Definition of the Regenerative Process
Let X be an absorbing continuous-time Markov chain on a finite state space J with transition rate matrix \({\mathsf {B}}\) and initial distribution \({\varvec{\beta }}\). Now, the process X is stopped at its absorption time T, an immediate restart is executed, and this procedure is repeated over and over again. This gives an infinite sequence \((X^k)_{k=1,2,\ldots }\) of independent and identically distributed cycle processes, where each cycle process behaves like the process X up to absorption. This sequence constitutes a regenerative process \(Z=(Z_t)_{t\ge 0}\) with \(Z_t=X^k_t\) for \(t\in [T_{k-1},T_k)\), where \(T_0:=0\). The process that counts the number of restarts is called a renewal process.
A regenerative process is called alternating, if it has only the two possible states 1 and 0. Let \(Y = (Y_t)_{t\ge 0}\) be an arbitrary alternating regenerative process with the same cycle lengths as Z, that is \(Y_t = Y^k_t\) for \(t\in [T_{k-1},T_k)\). The alternating process Y is called on at time t if \(Y_t=1\), otherwise it is called off. Note that \(X^k_t\) and \(Y^k_t\) are defined to be zero if \(t\notin [T_{k-1},T_k)\). Such alternating processes together with the following theorem build the main tool for the computation of the age distributions.
Theorem 1
The probability that an alternating process Y with the same cycle lengths as Z is on at a random time \(\tau \ge 0\) equals the ratio of expected on-time during the first cycle to the average cycle length. This leads to
Despite the intuitive nature of this result, its proof requires quite some technical effort and it is postponed to “Appendix A”.
4.2 The Age of the Regenerative Process
Consider the age process \((A_t)_{t\ge 0}\) defined such that the random variable \(A_t\) describes the time that has passed by t since the last restart. It is also called backward recurrence time of the renewal process. It can be considered the age of the regenerative process Z at time t. For \(y\ge 0\) and a randomly chosen time \(\tau \), the probability \(F_{A_\tau }(y)=\mathbb {P}(A_\tau \le y)\) is to be computed.
To obtain that probability, an alternating process Y is constructed that is on at time t if and only if the time elapsed since the last restart is less than or equal to y. Obviously, \(\mathbb {P}(A_\tau \le y) = \mathbb {P}(Y_\tau =1)\). Taking into account that \(Y^1_t=1\) if and only if \(t<T_1\) and \(t\le y\), it follows that
Write A instead of \(A_\tau \) and apply Theorem 1 to the alternating process Y to obtain the cumulative distribution function
of the age of the regenerative process Z. Hence, this age is again phase-type distributed by Lemma 3, now with initial probability vector \({\varvec{\eta }}\).
4.3 The Age of the Regenerative Process in a Fixed State
Fix \(j\in S\) and let \(a_j\) be the random variable that describes the age of the process Z given that it is in state j. For \(y\ge 0\) this means
The conditional probability on the right hand side can be expressed as
The numerator and the denominator can be computed using two alternating processes Y and \(\tilde{Y}\), respectively. The process Y is defined to be on at time t if and only if \(A_t\le y\) and \(Z_t=j\), whereas \(\tilde{Y}\) is defined to be on if and only if Z is in state j. Invoke Theorem 1 to Y and \(\tilde{Y}\) to get
and
respectively.
By plugging Eq. (12) for the numerator and Eq. (13) for the denominator in Eq. (11), the cumulative distribution function of \(a_j\) is given by
This means that the probability density function of the age of Z in state j is given by
5 Compartmental Systems and Markov Chains
Consider again the linear autonomous compartmental system (1) and the \((d+1)\times (d+1)\)-matrix
Owing to the properties of \({\mathsf {B}}\) and \(\mathbf {z}=(z_j)_{j=1,2,\ldots ,d}\), the extended matrix \({\mathsf {Q}}\) meets Definition 2. Consequently, it is the transition rate matrix of a continuous-time Markov chain \(X=(X_t)_{t\ge 0}\) on the state space \(J=\{1,2,\ldots ,d,d+1\}\).
Assume that mass \(\mathbf {u}\in \mathbb {R}^d\) comes into system (1) at a time \(t_0\). Since the system is linear, the way how the mass will be distributed through it can be modeled by a system without input and with initial value \(\mathbf {u}\) given by
Furthermore, the fractional transfer coefficients of this system are time independent, so the entire system can be shifted to the left and considered to have started at time \(t_0=0\). The content of compartment j at time \(t\ge 0\) is then given by \(\tilde{x}_j(t)=\left( \mathrm{e}^{t\,{\mathsf {B}}}\,\mathbf {u}\right) _j\).
Let
and \({\varvec{\beta }}:=(\lambda _1,\lambda _2,\ldots ,\lambda _d)^T\). Then the probability of the continuous-time Markov chain X with initial distribution \({\varvec{\beta }}\) being in state \(j\in S:=\{1,2,\ldots ,d\}\) at time t is by an application of Eq. (5) given by
\(\mathbb {P}(X_t=j)\) is the proportion of the initially present mass of system (15) that is in compartment j at time t. Consequently, the continuous-time Markov chain X describes the stochastic travel of a single particle through the compartmental system. When the traveling particle leaves the compartmental system, the process X jumps to the absorbing state \(d+1\).
5.1 Global Asymptotic Stability
Assume the compartmental matrix \({\mathsf {B}}\) to be nonsingular. Then the constant vector \(\mathbf {x}^*= -{\mathsf {B}}^{-1}\,\mathbf {u}\) is a steady-state solution or equilibrium of system (1), that is, \(\mathrm{d}\,\mathbf {x}^*/\mathrm{d}t = \mathbf {0}\).
Any solution \(\mathbf {x}\) of the linear system (1) has the form (Anderson 1983)
If \(t\rightarrow \infty \), an application of Eq. (6) and Remark 1 leads to
which means that all solutions of system (1) converge to \(\mathbf {x}^*\), independently of their initial value \(\mathbf {x^0}\). This makes the equilibrium \(\mathbf {x}^*=-{\mathsf {B}}^{-1}\,\mathbf {u}\) globally asymptotically stable and by the classic Lyapunov theorem (Engel and Nagel 2000, Theorem 2.10) all eigenvalues of \({\mathsf {B}}\) have negative real part.
It is well known that system (1) is globally asymptotically stable, if \({\mathsf {B}}\) is strictly diagonally dominant, that is \(\sum _{i=1}^d b_{ij}<0\) for all \(j\in S\). However, here \({\mathsf {B}}\) is not strictly diagonally dominant (it is diagonally dominant, though), but it is a nonsingular compartmental matrix. This means that \({\mathsf {B}}\) is the transition rate matrix of an absorbing continuous-time Markov chain. For the absorbing state to be reached eventually, at least one rate \(z_j=-\sum _{i=1}^d b_{ij}\) of leaving the system from compartment j must be strictly greater than zero. This makes system (1) an open system (Jacquez and Simon 1993).
5.2 Steady-State Compartment Contents
For \(j\in S\) the steady-state content of compartment j is \(x^*_j=-\left( {\mathsf {B}}^{-1}\,\mathbf {u}\right) _j\). Plugging in \({\varvec{\beta }}=\mathbf {u}/\Vert \mathbf {u}\Vert \) gives
Consequently, the steady-state compartment content \(x_j^*\) is proportional to the expected occupation time of state j by the absorbing continuous-time Markov chain X.
5.3 Release from the System
For \(j\in S\), the release of mass from compartment j to the environment is denoted by \(r_j\). As a function of time t, it can be computed as product of the rate \(z_j\) of mass leaving compartment j toward the environment and the mass \(x_j(t)\) contained in compartment j at time t. For a system in steady state, \(x_j(t)=x_j^*\) remains constant and consequently \(r_j=z_j\,x_j^*\) remains constant as well.
Let now \(\mathbf {r}=(r_1,r_2,\ldots ,r_d)^T\in \mathbb {R}^d\) be the vector of mass release or output from the system in steady state. Probabilistically, one would expect \(r_j\) to be connected to the probability of the absorbing continuous-time Markov chain X to be absorbed through state j. From Eq. (9) the probability of j being the last state before absorption is \(\mathbb {P}(E=j)=-z_j\,\left( {\mathsf {B}}^{-1}\,{\varvec{\beta }}\right) _j\). Use \({\varvec{\beta }}=\mathbf {u}/\Vert \mathbf {u}\Vert \) and \(\mathbf {x}^*=-{\mathsf {B}}^{-1}\,\mathbf {u}\) to get
This means that the release through compartment j is proportional to the probability of X being absorbed through state j. Since absorption is certain, \(\sum _{j\in S}\mathbb {P}(E=j) = 1\), hence \(\Vert \mathbf {r}\Vert =\sum _{j\in S} r_j = \Vert \mathbf {u}\Vert \), reflecting that in steady state total system output equals total system input.
5.4 Age Distribution of the System in Steady State
Suppose that the total system content in steady state has an unknown age density \(f_A\). In Sect. 4.2, it was already considered a particle that travels over and over again through the system, and its age at a random time was computed by methods from renewal theory. The according regenerative process expresses the need for an infinite history. Consequently, it reflects the behavior of the compartmental system in steady state, when all initial mass has left the system.
The age random variable A was shown to be phase-type distributed with transition rate matrix \({\mathsf {B}}\) and initial distribution
Thus, the density is given by Eq. (7) with \({\varvec{\eta }}\) replacing \({\varvec{\beta }}\). This gives the density
The mean age of the system can be obtained from Eq. (8) as
5.5 Age Distribution of the Compartments in Steady State
Now, suppose that compartment \(j\in S\) has an unknown age density \(f_{a_j}\). In Sect. 4.3 the age of the regenerative process Z was calculated under the condition that its state equals j. This is the age that a traveling particle has when it is in compartment j. From Eq. (14) and \(\mathbf {x}^*=-{\mathsf {B}}^{-1}\,\mathbf {u}\), it follows that
Integration by parts gives then for the mean age in compartment \(j\in S\) the equation
Defining \({\mathsf {X^*}}:={\text {diag}}(x^*_1,\ldots ,x^*_d)\), this gives a vector valued function of age densities in the compartments
and its expectation
is the vector of mean ages in the compartments. It is called mean age vector.
For \(n\ge 1\) let \(\mathbf {a}^n\) denote the vector \((a_1^n,\ldots ,a_d^n)^T\). Multiple integration by parts leads to a formula for the vector whose components contain the nth moments of the compartment ages. It is given by
Note that a computation of the average of the components of the mean age vector weighted by the respective steady-state compartment contents leads to the same equation for the mean system age as calculating the expected value of \({\text {PH}}({\varvec{\eta }}, {\mathsf {B}})\) as it was done to obtain Eq. (18).
5.6 Transit Time in Steady State
For compartmental systems two types of transit times can be considered (Nir and Lewis 1975). The forward transit time (\({\text {FTT}}\)) at time \(t_a\) is the time t a particle needs to travel through the system after it arrives at time \(t_a\). The backward transit time (\({\text {BTT}}\)) at time \(t_e\) gives the age y a particle has at the moment it leaves the system, that is, the time it needed to travel through the system given that it exits at time \(t_e\). For an autonomous system in steady state one would expect the two types of transit time to coincide.
Obviously, the \({\text {FTT}}\) is the absorption time of the absorbing continuous-time Markov chain X. As soon as the traveling particle leaves the system, X hits its absorbing state. Hence, the \({\text {FTT}}\) is phase-type distributed with initial distribution \({\varvec{\beta }}\) and transition rate matrix \({\mathsf {B}}\). This makes its density function
and its mean
For the \({\text {BTT}}\) the above constructed regenerative process can be considered. The \({\text {BTT}}\) is the age of Z at the time of a restart. Hence, it follows the same distribution as the cycle length and is identically distributed to the absorption time. So, from the probabilistic point of view, \({\text {FTT}}\) and \({\text {BTT}}\) are obviously the same. But the density of the \({\text {BTT}}\) can also be calculated as a weighted average of ages of particles that are leaving the system by
Intuition does not betray in this case: \({\text {FTT}}\) and \({\text {BTT}}\) coincide in steady state. Furthermore, the transit time depends neither on the arrival time \(t_a\) nor on the exit time \(t_e\).
6 Application to Carbon Cycle Models
6.1 A Linear Autonomous Compartmental System in Steady State
As an example, consider the global carbon-cycle model introduced by Emanuel et al. (1981), for which Thompson and Randerson (1999) numerically calculated age and transit-time distributions using the impulse response function approach. This model is therefore a good test-case for the derivations presented above. It comprises five compartments: non-woody tree parts \(x_1\), woody tree parts \(x_2\), ground vegetation \(x_3\), detritus/decomposers \(x_4\), and active soil carbon \(x_5\). The model is given by
where the input vector is given by \(\mathbf {u} = \left( \begin{matrix}77&0&36&0&0\end{matrix}\right) ^T\,\hbox {Pg}\,\hbox {C}\,\hbox {year}^{-1}\) and the compartmental matrix by
The numbers are chosen exactly as in Thompson and Randerson (1999). For comparison of the results, also refer to that paper. The input vector is expressed in units of petagrams of carbon per year (\(\hbox {Pg}\,\hbox {C}\,\hbox {year}^{-1}\)), and the fractional transfer coefficients in units of \(\hbox {year}^{-1}\). Because \({\mathsf {B}}\) is a lower triangular matrix with diagonal entries different from zero, it is nonsingular and all the earlier obtained formulas can be applied to system (21). The steady-state vector of carbon contents is
which results in a vector for the fractions of total carbon storage equal to
The respiration vector in steady state is
That gives fractions of total respirations as
The transit time T is phase-type distributed with probability density function (Fig. 1)
The expected value \(\mathbb {E}[T] = 15.58\,\hbox {year}\) is identical to the value found by Thompson and Randerson (1999), and the standard deviation of the transit time is \(\sigma _T = 45.01\,\hbox {year}\).
Furthermore, the system-age density is given by
Its expectation \(\mathbb {E}[A] = 72.83\,\hbox {year}\) is very similar to that reported by Thompson and Randerson (1999) (72.82 year), with standard deviation \(\sigma _A = 94.18\,\hbox {year}\).
Additionally, the vector that contains the probability density functions for the age in the compartments can be calculated as
from which the mean age vector is given by
and the standard deviation vector by
From these density functions the system’s and the compartments’ contents can be plotted with respect to their age (Fig. 2). This gives useful information about the range of ages for each compartment and how they contribute to the system-age distribution. In comparison to the results of Thompson and Randerson (1999), the approach presented here not only provides mean values for ages and transit times, but also exact formulas for their probability distribution. In their approach, these authors obtained results that depended on the simulation time and, therefore, included numerical errors, something that can be easily avoided with the approach presented here.
6.2 A Nonlinear Autonomous Compartmental System in Steady State
Consider the nonlinear autonomous compartmental system
where \(B:\mathbb {R}^d\rightarrow \mathbb {R}^{d\times d}\) is a matrix-valued mapping. In this setup the fractional transfer coefficients are not constant but depend on the system’s content. Consequently, the transition rates of the traveling particle are not constant.
Assume now that system (22) is in a steady state \(\mathbf {x}^*\). From \(\mathrm{d}\,\mathbf {x}^*/\mathrm{d}t = 0\) follows that the compartment contents \(x_j\) do not change and the mapping B turns into a matrix \({\mathsf {B}}\) with constant coefficients. Hence, assuming the nonlinear autonomous compartmental system (22) is in a steady state, it can be treated as a linear autonomous compartmental system and the entire theory developed for those systems can be applied to it.
As an example, consider the nonlinear two-compartment carbon-cycle model described by Wang et al. (2014). It is given by
Here, B depends on \(\mathbf {x}=\left( \begin{matrix}C_{s}&C_{b}\end{matrix}\right) ^T\) through \(\lambda \)’s dependence on \(\mathbf {x}\), which is given by
Steady-state formulas for the compartment contents can be computed as
From Wang et al. (2014) take the parameter values \(F_{npp} = 345\,\hbox {g}\,\hbox {C}\,\hbox {m}^{-2}\,\hbox {year}^{-1}\), \(\mu _b = 4.38\,\hbox {year}^{-1}\), \(\varepsilon = 0.39\), and \(K_s = 53{,}954.83\,\hbox {g}\,\hbox {C}\,\hbox {m}^{-2}\). Since the description of \(V_s\) is missing in the original publication, let it be equal to \(59.13\,\hbox {year}^{-1}\) to approximately meet the given steady-state compartment contents \(C_s^*= 12,650\,\hbox {g}\,\hbox {C}\,\hbox {m}^{-2}\) and \(C_b^*= 50.36\, \hbox {g}\,\hbox {C}\,\hbox {m}^{-2}\).
With the given parameters, the steady-state transition rate matrix \({\mathsf {B}}=B(\mathbf {x}^*)\) and the input vector \(\mathbf {u}\) are given by
The derived formulas are then used to calculate mean transit time and mean ages together with the according densities for different values of the model’s parameters (Fig. 3). In particular, the effect of different values of the parameter \(\varepsilon \) on the steady-state ages and transit times can be explored. This parameter controls the proportion of carbon that is transferred from the substrate \(C_s\) to the microbial biomass compartment \(C_b\), and it is commonly referred to as the carbon use efficiency. Interestingly, if the carbon use efficiency \(\varepsilon \) increases, the mean transit time and mean ages of the model at steady state decrease (Fig. 4), a behavior that at first glance appears counterintuitive. It can be explained by two opposing effects. On the one hand, an increase of carbon use efficiency keeps a higher fraction of carbon in the system due to lower respiration. This has an increasing effect on the transit time. On the other hand, a higher carbon use efficiency \(\varepsilon \) implies a lower steady-state content of compartment \(C_s\) and a higher one of compartment \(C_b\). Consequently, from Eq. (23), an increasing value of
is obtained. This value is the process rate of the \(C_s\) compartment in steady state. The higher it is, the faster the particles travel through the system. The latter effect wins here and a decrease in the transit time can be observed.
The graph of the mean system age for this model with \(\varepsilon = 0.39\) (Fig. 4) lies directly on the one of the mean transit time. The huge difference in the compartments’ steady-state contents causes very little difference in the initial distributions \({\varvec{\beta }}\) and \({\varvec{\eta }}\) for the traveling particle. This results in very similar distributions of transit time and system age.
7 Discussion
Simple, explicit, and general formulas for the densities, higher order moments, and first moments for the transit time, system age, and age vector of open linear autonomous compartmental systems were derived. They can be found in different places in this manuscript. For convenience, Table 1 provides a quick overview. Furthermore, a small Python package for linear autonomous compartmental models, called LAPM, is provided on https://github.com/MPIBGC-TEE/LAPM. It deals with symbolic and numerical computations of the formulas given in Table 1.
7.1 Relation to Earlier Results
Over many years compartmental models with fixed coefficients have been studied (Anderson 1983; Bolin and Rodhe 1973; Eriksson 1971) by mainly investigating the mean age of particles in the system and the mean transit time of particles. The topic became of increasing interest again with the need for modeling the terrestrial carbon cycle.
The general situation of linear nonautonomous compartmental models was investigated by Rasmussen et al. (2016). For the special case of autonomous systems they provide the formulas (19), (18), and (20) for the mean age vector, mean system age, and mean transit time, respectively. The probabilistic approach used here showed that these formulas are just expected values of corresponding random variables with according probability distributions \(\mathbf {f_a}(y) = -({\mathsf {X}}^*)^{-1}\, \mathrm{e}^{y\,{\mathsf {B}}}\,\mathbf {u}\), \(A\sim {\text {PH}}({\varvec{\eta }},{\mathsf {B}})\), and \(T\sim {\text {PH}}({\varvec{\beta }}, {\mathsf {B}})\). In particular, the terms mean system age and mean transit time refer to the expected absorption times of related continuous-time Markov chains. A general formula for the moments of the distribution of the transit time in a compartmental system without external inputs is given by Hearon (1972). He also states a formula for the backward transit-time density in this situation.
Manzoni et al. (2009) (also Priestley 1982; Thompson and Randerson 1999) calculated a so-called transfer function or impulse response function \(\varPsi \) that describes the relative contribution of the input at time \(t-T\) to the output at time t. They furthermore give a survivor function
that describes the probability of the particle to remain in the system for at least a time t. In the present setup this means
which leads by
to the conclusion that the impulse response function \(\varPsi \) is nothing else than the probability density function \(f_T\) of a phase-type distribution \({\text {PH}}({\varvec{\beta }},{\mathsf {B}})\) given by Eq. (7). They also formally provided an age density distribution
which is exactly the probability density function \(f_A\) of the system age given by Eq. (17). This becomes obvious from Eq. (10), which perfectly relates the distributions of transit time and system age.
For special cases of simple compartmental systems, they further provide formulas for the densities and means of transit time and system age. These formulas were obtained by simulating an impulsive input and considering the impulse response in the Laplace space. It turns out that those formulas are special cases of the general shape of probability density functions of phase-type. Examples are presented in “Appendix B”.
7.2 Singular Compartmental Matrices
In this paper, only nonsingular compartmental or transition rate matrices were considered, because they ensure that every particle that enters the system will eventually leave it. It can be shown (Neuts 1981) that the transit time of a continuous-time Markov chain with singular transition rate matrix does not lead to a certainly finite transit time. In this case, the system contains traps from which particles are not able to get out once they have entered them. So, some particles will remain in the system forever. Although this seems unrealistic, there are successful carbon-cycle models with this structure.
A famous example is the RothC model (Jenkinson and Rayner 1977). It contains an inert compartment that has neither inputs nor outputs, but it has a positive constant content. To apply the stochastic framework of the present paper to that model, it is necessary to cut this compartment out of the system and to look at the steady state of the remaining smaller system. The transit time of newly arriving particles will not be affected. However, the age distribution of the system will depend on time since the particles in the inert compartment become older and older. A detailed analysis of how to treat systems with traps can be found in Jacquez and Simon (1993) and references therein.
7.3 Stochastic Versus Deterministic Approach
As noted by Purdue (1979), in modeling ecological systems, there are powerful arguments for the use of stochastic processes. Even if nature is completely deterministic, ecological systems are too complex for a complete theoretical understanding or descriptive tools. This lack of complete knowledge can be accounted for by using probabilistic methods. One of the first authors to integrate stochastic behavior in biological models was Bartholomay (1958). Purdue (1979) gives an early review on stochastic compartmental models with ecological applications. He showed how compartmental models can be considered as a deterministic representation of an underlying stochastic process by establishing the link to continuous-time Markov chains. While Eisenfeld (1979) elaborates on this link and applies it to a liver model, the present paper connects the continuous-time Markov chain approach to the theory of phase-type distributions (Neuts 1981) and focuses on transit time and ages.
The deterministic theory describes the ideal or average behavior of a system, whereas stochastic models can examine the deviations from such ideal or average behavior. The stochastic approach allows to think of key quantities as random variables. Knowledge of their probability distributions provides a whole new set of tools not only to study the mean, but also higher order moments of such random variables. A high variance of the transit time, for example, expresses that it is not the usual behavior of particles to travel through the system as long as indicated by the mean transit time. There is rather a large variety of different transit times depending on the particular path taken by the particle. Long tails of the distribution mean that there are in fact particles that need very long to travel through the system and hence there are very old masses in the system. With the probability density functions in hand, it is also possible to think of quantiles and confidence intervals of transit time and system age, something not possible with the deterministic approach.
Linear autonomous compartmental carbon-cycle models relate to continuous-time Markov chains with homogeneous transition probabilities. Turning to nonautonomous models (Rasmussen et al. 2016), nonhomogeneous Markov chains would have to be considered in the probabilistic approach. In this situation the Kolmogorov equations govern the evolution of the transition probabilities. There is plenty of theory available on continuous-time Markov chains (Norris 1997; Ross 2010), and much of it might be applied to carbon-cycle models.
8 Conclusions
Open linear autonomous compartmental systems were modeled by absorbing continuous-time Markov chains and it was shown that the behavior of those systems is governed by the phase-type distribution. It applies for the transit time as well as for the system age, only with different initial distributions. This knowledge provides simple general formulas for the densities, means, and higher order moments of transit time, compartment ages, and system age. Furthermore, it explains the underlying structure of the intrinsic connection between system age and transit time (Bolin and Rodhe 1973).
This approach also revealed the potential and opportunities of expressing deterministic compartmental models as stochastic processes. For example, important system diagnostics in reservoir theory such as system ages and transit times have analogous counterparts in probabilistic terms. The theory of stochastic processes can further help to address important questions in reservoir theory with applications in other fields even beyond global biogeochemical cycles.
References
Anderson DH (1983) Compartmental modeling and tracer kinetics, vol 50. Springer, Berlin
Asmussen S (2003) Applied probability and queues, 2nd edn. Springer, Berlin
Bartholomay AF (1958) On the linear birth and death processes of biology as Markoff chains. Bull Math Biol 20(2):97–118
Billingsley P (1968) Convergence of probability measures. Wiley, Hoboken
Bolin B, Rodhe H (1973) A note on the concepts of age distribution and transit time in natural reservoirs. Tellus 25(1):58–62
Dudley RM (1999) Uniform central limit theorems, vol 23. Cambridge University Press, Cambridge
Eisenfeld J (1979) Relationship between stochastic and differential models of compartmental systems. Math Biosci 43(3):289–305
Emanuel WR, Killough GG, Olson JS (1981) Modelling the circulation of carbon in the world’s terrestrial ecosystems. In: Bolin B (ed) Carbon cycle modelling, SCOPE 16. Wiley, Hoboken, pp 335–353
Engel KJ, Nagel R (2000) One-parameter semigroups for linear evolution equations, vol 194. Springer, Berlin
Eriksson E (1971) Compartment models and reservoir theory. Annu Rev Ecol Syst 2:67–84
Friedlingstein P, Cox P, Betts R, Bopp L, Von Bloh W, Brovkin V, Cadule P, Doney S, Eby M, Fung I, Bala G, John J, Jones C, Joos F, Kato T, Kawamiya M, Knorr W, Lindsay K, Matthews HD, Raddatz T, Rayner P, Reick C, Roeckner E, Schnitzler KG, Schnur R, Strassmann K, Weaver AJ, Yoshikawa C, Zeng N (2006) Climate-carbon cycle feedback analysis: results from the \(\text{ C }^4\)MIP model intercomparison. J Clim 19(14):3337–3353
Friedlingstein P, Meinshausen M, Arora VK, Jones CD, Anav A, Liddicoat SK, Knutti R (2014) Uncertainties in CMIP5 climate projections due to carbon cycle feedbacks. J Clim 27(2):511–526. https://doi.org/10.1175/JCLI-D-12-00579.1
Hearon JZ (1972) Residence times in compartmental systems and the moments of a certain distribution. Math Biosci 15(1):69–77
Jacquez JA, Simon CP (1993) Qualitative theory of compartmental systems. SIAM Rev 35(1):43–79
Jenkinson D, Rayner J (1977) The turnover of soil organic matter in some of the Rothamsted classical experiments. Soil Sci 123(5):298–305
Luo Y, Weng E (2011) Dynamic disequilibrium of the terrestrial carbon cycle under global change. Trends Ecol Evol 26(2):96–104
Manzoni S, Katul GG, Porporato A (2009) Analysis of soil carbon transit times and age distributions using network theories. J Geophys Res 114(G4):1–14. https://doi.org/10.1029/2009JG001070
Neuts MF (1981) Matrix-geometric solutions in stochastic models: an algorithmic approach. Johns Hopkins Press, London
Nir A, Lewis S (1975) On tracer theory in geophysical systems in the steady and non-steady state. Part I. Tellus 27(4):372–383. https://doi.org/10.1111/j.2153-3490.1975.tb01688.x
Norris JR (1997) Markov chains. Cambridge University Press, Cambridge
Priestley MB (1982) Spectral analysis and time series. Academic Press, Cambridge
Purdue P (1979) Stochastic compartmental models: a review of the mathematical theory with ecological applications. In: Matis J, Patten B, White G (eds) Compartmental analysis of ecosystem models. International Co-operative Publishing House, Maryland, pp 223–260
Rasmussen M, Hastings A, Smith MJ, Agusto FB, Chen-Charpentier BM, Hoffman FM, Jiang J, Todd-Brown KEO, Wang Y, Wang YP, Luo Y (2016) Transit times and mean ages for nonautonomous and autonomous compartmental systems. J Math Biol 73(6–7):1379–1398. https://doi.org/10.1007/s00285-016-0990-8
Ross SM (2010) Introduction to probability models, 10th edn. Academic Press, Cambridge
Sierra CA, Müller M (2015) A general mathematical framework for representing soil organic matter dynamics. Ecol Monogr 85(4):505–524. https://doi.org/10.1890/15-0361.1
Thompson MV, Randerson JT (1999) Impulse response functions of terrestrial carbon cycle models: method and application. Glob Change Biol 5(4):371–394. https://doi.org/10.1046/j.1365-2486.1999.00235.x
Wang YP, Chen BC, Wieder WR, Leite M, Medlyn BE, Rasmussen M, Smith MJ, Agusto FB, Hoffman F, Luo YQ (2014) Oscillatory behavior of two nonlinear microbial models of soil carbon decomposition. Biogeosciences 11(7):1817–1831. https://doi.org/10.5194/bg-11-1817-2014
Acknowledgements
Open access funding provided by Max Planck Society.
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix A: Proof of Theorem 1
Since a random variable cannot be drawn uniformly from the positive half-line, \(\tau \) is drawn uniformly from the interval [0, L] for some \(L>0\). To illustrate \(\tau \)’s dependence on L, it is denoted by \(\tau _L\). The aim is to find \(\mathbb {P}(Y_{\tau _L}=1)\) and let L tend to infinity. The existence of a random variable \(Y_\tau \) according to the limiting distribution is then guaranteed by Skorokhods representation theorem (Billingsley 1968).
Note that the random variable \(Y_\tau \) is stochastic in two ways. The value of Y at a deterministic time is stochastic and furthermore the time \(\tau \) itself is stochastic. To overcome this difficulty, the probability \(\mathbb {P}(Y_{\tau _L}=1)\) is conditioned on \(\tau _L=t\). By the law of total probability it can be rewritten as
where \(f_{\tau _L}(t)=\mathbb {1}_{[0,L]}(t)\,1/L\) denotes the probability density function of the uniform distribution on [0, L]. Plugging it in brings
Let \(p(t):=\mathbb {P}(Y_t=1)\). If the existence of \(\lim \limits _{t\rightarrow \infty } p(t)\) were known, concluding
would be allowed.
The problem of calculating \(\lim \limits _{t\rightarrow \infty }p(t)\) is left. To solve it, a major result from renewal theory is needed. Recall that \(f_T\) denotes the common probability density function of the cycle durations.
Theorem 2
(Key renewal theorem) Suppose that the function z in the so-called general renewal equation
is directly Riemann integrable. Then
The proof and the rather technical definition of direct Riemann integrability can be found in Asmussen (2003, Sect. V.4).
To apply the key renewal theorem to p, it is necessary to show that p satisfies the general renewal equation (25) for some directly Riemann integrable function z. To this end, a standard technique from renewal theory is applied by conditioning on the event that the first restart occurs at time \(T_1=x\). Recall that \(T_1\) has the probability density function \(f_T\). Then
Now, this integral is split into a period before and a period after t to get
The second integral describes the probability of Y being on during the first cycle, since \(t\le T_1\), and is equal to \(z(t):=\mathbb {P}(Y^1_t=1)\). The conditional probability \(\mathbb {P}(Y_t=1\,|\,T_1=x)\) under the first integral equals \(\mathbb {P}(Y_{t-x}=1)=p(t-x)\), since the process restarts at the end \(T_1=x\) of the first cycle. Hence,
satisfies the general renewal equation (25). Furthermore, the function z can be shown to be directly Riemann integrable. Therefore, the key renewal theorem states that
The integral can be rewritten to
and hence describes the expected time of Y being on during the first cycle. The equality of the limits in Eq. (24) finishes the proof.
Appendix B: Examples
1.1 Appendix B.1: One Single Compartment
Consider the one-compartment model represented by the ordinary linear differential equation
for \(\lambda >0\). In this simplest possible framework, \({\mathsf {B}} = -\lambda \), \(\mathbf {z} = \lambda \), \({\mathsf {B}}^{-1}=-1/\lambda \), and \({\varvec{\beta }}=1\). The according phase-type distribution is just the exponential distribution. The cumulative distribution function of the transit time T is
its probability density function is
and the expected absorption time or mean transit time is \(\mathbb {E}[T]=1/\lambda \). The mean age vector \(\mathbf {a}\) coincides with the system age A and its probability density function is
which leads to the mean age of \(\mathbb {E}[A]=1/\lambda \). The fact that transit time and age have the same distribution reflects the memorylessness of the exponential distribution.
1.2 Appendix B.2: Two Compartments Without Feedback
A more interesting example is a two-compartment system given by
with \(\lambda _1>0\), \(\lambda _2>0\), and \(0\le \alpha \le 1\). Then
and \(\mathbf {z} = \left( \begin{matrix}- \alpha \lambda _{1} + \lambda _{1}&\lambda _{2}\end{matrix}\right) ^T\), \(\mathbf {u}=\left( \begin{matrix}u_{1}&u_{2}\end{matrix}\right) ^T\), \({\varvec{\beta }}=\left( \begin{matrix} {\frac{u_{1}}{u_{1} + u_{2}}}&{\frac{u_{2}}{u_{1} + u_{2}}}\end{matrix}\right) ^T\).
If \(\lambda _1\ne \lambda _2\), then the matrix exponential is
and the cumulative distribution function of the transit time T is
The probability density function is
and the expected absorption time
For the age distribution first the steady-state solution and its normalized version need to be computed by
Using \(A\sim {\text {PH}}({\varvec{\eta }},{\mathsf {B}})\) leads for \(y\ge 0\) to
The vector valued function containing the age densities of the compartments is
This leads to the mean age vector
1.2.1 Appendix B.2.1: Serial Compartments: Hypoexponential Distribution
If \(u_2=0\) and \(\alpha =1\), the particle enters the system in compartment 1 and must travel through compartment 2 before absorption. This leads to the transit time T being hypoexponentially distributed. That is, T is distributed like the sum of two independent exponential distributions. Consequently
The steady-state solution and its normalized version are
For the system age and for \(y\ge 0\) follows
For \(u_1=1\) this turns into
The vector valued function containing the age densities of the compartments is
which leads to the mean age vector \(\mathbb {E}[\mathbf {a}] = \left( \begin{matrix}{\frac{1}{\lambda _{1}}}&{\frac{1}{\lambda _{2}} + \frac{1}{\lambda _{1}}}\end{matrix}\right) ^T\).
If furthermore \(\lambda _1=\lambda _2\), then the hypoexponential distribution turns into an Erlang distribution, which is the convolution of two independent and identically distributed exponential distributions.
1.2.2 Appendix B.2.2: Parallel Compartments: Hyperexponential Distribution
The case of \(\alpha =0\) is a purely parallel system and the transit time T is hyperexponentially distributed. For \(t\ge 0\) this means
The steady-state solution and its normalized version are
For the system age and for \(y\ge 0\) follows
The vector valued function containing the age densities of the compartments is \(\mathbf {f_a}(y) = \left( \begin{matrix}\lambda _{1} \mathrm{e}^{- \lambda _{1} y}&\lambda _{2} \mathrm{e}^{- \lambda _{2} y}\end{matrix}\right) ^T\). This leads to the mean age vector \(\mathbb {E}[\mathbf {a}] = \left( \begin{matrix}{\frac{1}{\lambda _{1}}}&{\frac{1}{\lambda _{2}}}\end{matrix}\right) ^T\).
1.3 Appendix B.3: Two Compartments With Feedback
Manzoni et al. (2009) considered also the simple two-compartment system with feedback
in which mass enters and leaves the system only through the first compartment, but can in between spend some time in the second compartment. The compartmental matrix and the input vector are
Manzoni et al. (2009) provide the Laplacian of the density function of the transit time and the system age. The Laplacian of a \({\text {PH}}({\varvec{\beta }},{\mathsf {B}})\) distribution is given by
where \({\mathsf {I}}\) denotes the identity matrix. Consequently, the Laplacian of the transit time is
and the Laplacian of the system age is
The expected values are given by
and
respectively.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Metzler, H., Sierra, C.A. Linear Autonomous Compartmental Models as Continuous-Time Markov Chains: Transit-Time and Age Distributions. Math Geosci 50, 1–34 (2018). https://doi.org/10.1007/s11004-017-9690-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11004-017-9690-1