Skip to content

Phase-type distribution

A phase-type distribution models time to absorption in a finite Markov chain. See how serial exponential stages produce a non-memoryless completion time.

A phase-type distribution is the distribution of the time until absorption in a finite, time-homogeneous continuous-time Markov chain, with all other states transient. It lets a quant model a duration through several intermediate states while retaining matrix formulas for completion probabilities and moments. Examples include service times in execution infrastructure and time to default in a finite credit-migration model.
The intermediate states are called phases. Each visit has an exponential holding time, but the total duration need not be exponential or memoryless. This article treats continuous time; discrete phase-type distributions instead count steps until absorption.

A completion clock with two stages

Consider an illustrative processing pipeline: a request must finish stage 1, then stage 2. Assume independent exponential stage durations with rates 2 per second and 4 per second, respectively. There is no queue, retry or shortcut. These are stipulated model parameters, not measured trading-system latencies.

If XX and YY are the two waits, completion time is τ=X+Y\tau=X+Y. Using the rate convention,

E[τ]=12+14=0.75 seconds,Var(τ)=122+142=0.3125 seconds2.\mathbb{E}[\tau]=\frac12+\frac14=0.75\text{ seconds},\qquad \text{Var}(\tau)=\frac1{2^2}+\frac1{4^2}=0.3125\text{ seconds}^2.

At time t≥0t\ge0, measured in seconds, the probability of still being in stage 1 is p1(t)=e−2tp_1(t)=e^{-2t}. To be in stage 2, the first stage must finish at some earlier time uu, while the second must remain unfinished:

p2(t)=∫0t2e−2ue−4(t−u) du=e−2t−e−4t.p_2(t)=\int_0^t 2e^{-2u}e^{-4(t-u)}\,du =e^{-2t}-e^{-4t}.
Add the two ways of remaining unfinished to obtain the survival function:
Sτ(t)=p1(t)+p2(t)=2e−2t−e−4t.S_\tau(t)=p_1(t)+p_2(t)=2e^{-2t}-e^{-4t}.
After one second, Sτ(1)≈0.252355S_\tau(1)\approx0.252355: about 25.24% of requests are unfinished and 74.76% have completed. The unfinished group comprises 13.53% still in stage 1 and 11.70% in stage 2, with rounding applied separately.
An illustrative serial pipeline has rates 2 and 4 per second and mean completion time 0.75 seconds. At one second, phase 1 probability is 0.135335 and phase 2 probability is 0.117020, totaling survival 0.252355.
An illustrative serial pipeline has rates 2 and 4 per second and mean completion time 0.75 seconds. At one second, phase 1 probability is 0.135335 and phase 2 probability is 0.117020, totaling survival 0.252355.
Original exact-probability illustration of two independent serial exponential stages. The solid survival curve adds the two transient-state probability curves; rates are stipulated.
Serial stages are different from choosing a stage. If a request instead selects rate 2 or rate 4 with equal probability and completes after that one wait, it has a hyperexponential mixture distribution. Its survival is 12e−2t+12e−4t\tfrac12e^{-2t}+\tfrac12e^{-4t} and its mean is 0.3750.375 seconds. The serial model is hypoexponential. Equal-rate serial stages give an Erlang distribution, a gamma distribution with integer shape. These constructions sit within the same PH family but encode different mechanisms. Nielsen's notes, §1.4.5, set out addition and mixture constructions.

The matrix keeps track of where the clock is

Write τ∼PH⁡(α,T)\tau\sim\operatorname{PH}(\alpha,T), where α\alpha is the row vector of starting probabilities over transient states and TT is their subgenerator. For the serial pipeline,
α=(1,0),T=(−220−4),t0=−T1=(04).\alpha=(1,0),\qquad T=\begin{pmatrix}-2&2\\0&-4\end{pmatrix},\qquad \mathbf{t}_0=-T\mathbf{1}=\begin{pmatrix}0\\4\end{pmatrix}.

Here 1\mathbf{1} is a column of ones. Entries of TT have units per second: off-diagonal entries are transition rates, and the negative diagonal records the total rate of leaving each phase. The exit vector t0\mathbf{t}_0 contains rates of direct absorption. Phase 1 has zero direct completion rate; leaving it only advances the request to phase 2. Accordingly, TT need not have zero row sums. The full generator, including completion, does:

Q=(Tt0mathbf00).Q=\begin{pmatrix}T&\mathbf{t}_0\\mathbf{0}&0\end{pmatrix}.

In general, TT must have nonnegative off-diagonal entries, nonpositive row sums and genuinely transient states, so absorption occurs almost surely. These restrictions give a probabilistic representation, rather than an arbitrary matrix expression.

With α1=1\alpha\mathbf{1}=1, there is no initial mass at completion. For t≥0t\ge0,

Sτ(t)=αeTt1,Fτ(t)=1−αeTt1,fτ(t)=αeTtt0.S_\tau(t)=\alpha e^{Tt}\mathbf{1},\qquad F_\tau(t)=1-\alpha e^{Tt}\mathbf{1},\qquad f_\tau(t)=\alpha e^{Tt}\mathbf{t}_0.
The matrix exponential propagates the phase probabilities; summing them gives survival, while weighting them by exit rates gives completion density. Allowing α1<1\alpha\mathbf{1}<1 adds an atom at zero of size 1−α11-\alpha\mathbf{1}. These probability formulas are given in Albrecher, Bladt, Bladt and Yslas, §2.

The moments follow from the inverse subgenerator:

E[τk]=k! α(−T)−k1,k=1,2,….\mathbb{E}[\tau^k]=k!\,\alpha(-T)^{-k}\mathbf{1},\qquad k=1,2,\ldots.
For the example this returns E[τ]=0.75\mathbb{E}[\tau]=0.75 and E[τ2]=0.875\mathbb{E}[\tau^2]=0.875, hence variance 0.875−0.752=0.31250.875-0.75^2=0.3125. See Nielsen, §1.4.3. For the first-step argument behind inverse-generator mean exit times, Exit Distributions and Exit Times for Continuous-Time Chains has a public preview; the full lesson requires membership.

What the phases do—and do not—tell you

The hidden phase matters to the remaining wait. In the pipeline, a request known to be in stage 2 needs only one exponential wait; a fresh request needs both. Its overall hazard rate is therefore not constant:
hτ(t)=4(e−2t−e−4t)2e−2t−e−4t.h_\tau(t)=\frac{4(e^{-2t}-e^{-4t})}{2e^{-2t}-e^{-4t}}.

It starts at zero and tends to 2 per second. Exponential holding times do not make the combined clock memoryless.

Nor does a fitted PH distribution uniquely identify real stages. Swapping the two serial rates leaves X+YX+Y unchanged in distribution while changing the phase representation. More generally, distinct representations can produce the same duration law; Nielsen, §1.4.7, demonstrates nonuniqueness. Interpreting phases as actual processing steps or credit states requires additional evidence.
Finally, flexibility over observed durations does not establish extreme-tail accuracy. A fixed finite PH model has an exponentially bounded tail; it cannot have a true asymptotic power-law tail. In this example Sτ(t)∼2e−2tS_\tau(t)\sim2e^{-2t}. The PH family is dense in nonnegative distributions under weak convergence, but that does not guarantee accurate extreme quantiles or tail moments. Albrecher and coauthors, §§1–2, explain the approximation property and tail limitation. This distinction matters when modeling rare, very long delays or large insurance losses.

Sources

Last updated
  • absorption times
  • markov chains
  • waiting times
  • matrix methods
  • phase type
← Back to the glossaryBack to top ↑