In this part, we will introduce Continuous-Time Markov Chains, which are stochastic processes that evolve over continuous time and possess the Markov property.
They are widely used in various fields, including queueing theory, reliability engineering, and population dynamics.
Continuous-Time Markov Chains
Definition 1 (Continuous-Time Markov Chain)
A continuous-time stochastic process {Xt}t≥0 with discrete state space S is a continuous-time Markov chain if,
P(Xt+s=j∣Xs=i,Xu,0≤u<s)=P(Xt+s=j∣Xs=i),
where s,t≥0 and i,j,Xu∈S.
The process is time-homogeneous if for s,t≥0 and all i,j∈S,
P(Xt+s=j∣Xs=i)=P(Xt=j∣X0=i).
We then define the transition function as the matrix function P(t) with entries of the matrix given by,
P(t)ij=P(Xt=j∣X0=i).
The Chapman-Kolmogorov Equations
Theorem 1 (Chapman-Kolmogorov Equations)
For the transition function P(t) we have,
P(s+t)=P(s)P(t)
P(0)=I (identity matrix)
Proof
For the first property; If they are same for an arbitrary element i,j of the matrix, then they are equal.
The second property follows directly from the definition of the transition function.
Holding Times
Intuition (Holding Times)
Define Ti as the time the continuous-time Markov chain {Xt}t≥0 that always starts in state i stays in i before moving to a different state, so that for any s>0,
P(Ti>s)=P(Xu=i,0≤u≤s)
The distribution of Ti is memoryless and thus exponential.
We define qi such that,
Ti∼Exponential(qi)
Remember that this means that the average time the process stays in i is qi1.
The rate of transition out of the state is qi.
Note
We can have qi=0, meaning that the state i is absorbing,
P(Ti>s)=1.
The Embedded Markov Chain
Intuition (Embedded Markov Chain)
We can define a new stochastic process by listing the states the chain visits.
This will be a discrete time Markov chain called the embedded Markov chain with transition matrix P~.
Note
The transition matrix P~ has zeros along its diagonal! Why?
Because the process cannot stay in the same state when it makes a transition.
Further, note that the continuous-time Markov chain is completely determined by the expected holding times (q11,…,qk1) and the transition matrix of the embedded Markov chain P~.
Intuition (Constructing a Continuous-Time Markov Chain)
A way to describe a continuous-time Markov chain is to describe k×(k−1) independent “alarm clocks”.
For states i and j so that i=j, let qij be the parameter of an Exponentially distributed random variable representing the time until an “alarm clock” rings.
When in state i, wait until the first alarm clock qi rings, then move to the state given by the index j of that alarm clock.
This defines a continuous-time Markov chain.
The time until the first alarm clock qi rings is Exponentially distributed with parameter given by,
qi=qi1+qi2+…+qi,i−1+qi,i+1+…+qik.
i.e., the parameter of the holding time distribution at i.
The chain is completely described by the rates qij.
Further, we saw also that the chain is completely described by the pij and the qi.
The relationship is described by the equation above, and,
Since we arbitrarily chose to write P(t+h) as P(t)P(h), we could have equally written it as P(h)P(t), leading to the other equation, thus completing the proof.
The Matrix Exponential
Intuition (Matrix Exponential Solution)
The solution to the Kolmogorov Forward and Backward equations is given by the matrix exponential.
For any square matrix A we can define the matrix exponential as,
eA:=n=0∑∞n!1An=I+A+21A2+61A3+…
The series converges for all square matrices A (but we will not prove this here).
Some important properties of the matrix exponential are:
e0=I
eAe−A=I
e(s+t)A=esAetA
If AB=BA, then eA+B=eAeB=eBeA
∂t∂etA=AetA=etAA
Note that P(t)=etQ is the unique solution to the differential equations given by the Kolmogorov Forward and Backward equations with initial condition P(0)=I.
Further, note that P′(t)=QP(t) for all t≥0 and P(0)=I.
In R one can use the expm package to compute matrix exponentials.