# Phase-type distribution

Parameters Probability density function Cumulative distribution function ${\displaystyle S,\;m\times m}$ subgenerator matrix${\displaystyle {\boldsymbol {\alpha }}}$, probability row vector ${\displaystyle x\in [0;\infty )\!}$ ${\displaystyle {\boldsymbol {\alpha }}e^{xS}{\boldsymbol {S}}^{0}}$ See article for details ${\displaystyle 1-{\boldsymbol {\alpha }}e^{xS}{\boldsymbol {1}}}$ ${\displaystyle -1{\boldsymbol {\alpha }}{S}^{-1}\mathbf {1} }$ no simple closed form no simple closed form ${\displaystyle 2{\boldsymbol {\alpha }}{S}^{-2}\mathbf {1} }$ ${\displaystyle -6{\boldsymbol {\alpha }}{S}^{-3}\mathbf {1} /\sigma ^{3}}$ ${\displaystyle 24{\boldsymbol {\alpha }}{S}^{-4}\mathbf {1} /\sigma ^{4}}$ ${\displaystyle {\boldsymbol {\alpha }}(-tI-S)^{-1}{\boldsymbol {S}}^{0}+\alpha _{m+1}}$ ${\displaystyle {\boldsymbol {\alpha }}(itI-S)^{-1}{\boldsymbol {S}}^{0}+\alpha _{m+1}}$

A phase-type distribution is a probability distribution that results from a system of one or more inter-related Poisson processes occurring in sequence, or phases. The sequence in which each of the phases occur may itself be a stochastic process. The distribution can be represented by a random variable describing the time until absorption of a Markov process with one absorbing state. Each of the states of the Markov process represents one of the phases.

It has a discrete time equivalent the discrete phase-type distribution.

The phase-type distribution is dense in the field of all positive-valued distributions, that is, it can be used to approximate any positive valued distribution.

## Definition

There exists a continuous-time Markov process with ${\displaystyle m+1}$ states, where ${\displaystyle m\geq 1}$. The states ${\displaystyle 1,\dots ,m}$ are transient states and state ${\displaystyle m+1}$ is an absorbing state. The process has an initial probability of starting in any of the ${\displaystyle m+1}$ phases given by the probability vector ${\displaystyle ({\boldsymbol {\alpha }},\alpha _{m+1})}$.

The continuous phase-type distibution is the distribution of time from the processes starting until absorption in the absorbing state.

This process can be written in the form of a transition rate matrix,

${\displaystyle {Q}=\left[{\begin{matrix}{S}&\mathbf {S} ^{0}\\\mathbf {0} &0\end{matrix}}\right],}$

where ${\displaystyle {S}}$ is a ${\displaystyle m\times m}$ matrix and ${\displaystyle \mathbf {S} ^{0}=-{S}\mathbf {1} }$. Here ${\displaystyle \mathbf {1} }$ represents an ${\displaystyle m\times 1}$ vector with every element being 1.

## Characterization

The distribution of time ${\displaystyle X}$ until the process reaches the absorbing state is said to be phase-type distributed and is denoted ${\displaystyle \operatorname {PH} ({\boldsymbol {\alpha }},{S})}$.

The distribution function of ${\displaystyle X}$ is given by,

${\displaystyle F(x)=1-{\boldsymbol {\alpha }}\exp({S}x)\mathbf {1} ,}$

and the density function,

${\displaystyle f(x)={\boldsymbol {\alpha }}\exp({S}x)\mathbf {S^{0}} ,}$

for all ${\displaystyle x>0}$, where ${\displaystyle \exp(\cdot )}$ is the matrix exponential. It is usually assumed the probability of process starting in the absorbing state is zero. The moments of the distribution function are given by,

${\displaystyle E[X^{n}]=(-1)^{n}n!{\boldsymbol {\alpha }}{S}^{-n}\mathbf {1} .}$

## Special cases

The following probability distributions are all considered special cases of a continuous phase-type distribution:

• Degenerate distribution, point mass at zero or the empty phase-type distribution - 0 phases.
• Exponential distribution - 1 phase.
• Erlang distribution - 2 or more identical phases in sequence.
• Deterministic distribution (or constant) - The limiting case of an Erlang distribution, as the number of phases become infinite, while the time in each state becomes zero.
• Coxian distribution - 2 or more (not necessarily identical) phases in sequence, with a probability of transitioning to the terminating/absorbing state after each phase.
• Hyper-exponential distribution (also called a mixture of exponential) - 2 or more non-identical phases, that each have a probability of occurring in a mutually exclusive, or parallel, manner. (Note: The exponential distribution is the degenerate situation when all the parallel phases are identical.)
• Hypoexponential distribution - 2 or more phases in sequence, can be non-identical or a mixture of identical and non-identical phases, generalises the Erlang.

As the phase-type distribution is dense in the field of all positive-valued distributions, we can represent any positive valued distribution. However, the phase-type is a light-tailed or platikurtic distribution. So the representation of heavy-tailed or leptokurtic distribution by phase type is an approximation, even if the precision of the approximation can be as good as we want.

### Examples

In all the following examples it is assumed that there is no probability mass at zero, that is ${\displaystyle \alpha _{m+1}=0}$.

#### Exponential distribution

The simplest non-trivial example of a phase-type distribution is the exponential distribution of parameter ${\displaystyle \lambda }$. The parameter of the phase-type distribution are : ${\displaystyle {\boldsymbol {S}}=-\lambda }$ and ${\displaystyle {\boldsymbol {\alpha }}=1}$

#### Hyper-exponential or mixture of exponential distribution

The mixture of exponential or hyper-exponential distribution with parameter ${\displaystyle (\alpha _{1},\alpha _{2},\alpha _{3},\alpha _{4},\alpha _{5})}$ (such that ${\displaystyle \sum \alpha _{i}=1}$ and ${\displaystyle ,\alpha _{i}>0\forall i}$) and ${\displaystyle (\lambda _{1},\lambda _{2},\lambda _{3},\lambda _{4},\lambda _{5})}$ can be represented as a phase type distribution with

${\displaystyle {\boldsymbol {\alpha }}=(\alpha _{1},\alpha _{2},\alpha _{3},\alpha _{4},\alpha _{5}),}$

and

${\displaystyle {S}=\left[{\begin{matrix}-\lambda _{1}&0&0&0&0\\0&-\lambda _{2}&0&0&0\\0&0&-\lambda _{3}&0&0\\0&0&0&-\lambda _{4}&0\\0&0&0&0&-\lambda _{5}\\\end{matrix}}\right].}$

The mixture of exponential can be characterized through its density

${\displaystyle f(x)=\sum _{i=1}^{5}\alpha _{i}\lambda _{i}e^{-\lambda _{i}x}}$

or its distribution function

${\displaystyle F(x)=1-\sum _{i=1}^{5}\alpha _{i}e^{-\lambda _{i}x}.}$

This can be generalized to a mixture of ${\displaystyle n}$ exponential distributions.

#### Erlang distribution

The Erlang distribution has two parameters, the shape an integer ${\displaystyle k>0}$ and the rate ${\displaystyle \lambda >0}$. This is sometimes denoted ${\displaystyle E(k,\lambda )}$. The Erlang distribution can be written in the form of a phase-type distribution by making ${\displaystyle {S}}$ a ${\displaystyle k\times k}$ matrix with diagonal elements ${\displaystyle -\lambda }$ and super-diagonal elements ${\displaystyle \lambda }$, with the probability of starting in state 1 equal to 1. For example ${\displaystyle E(5,\lambda )}$,

${\displaystyle {\boldsymbol {\alpha }}=(1,0,0,0,0),}$

and

${\displaystyle {S}=\left[{\begin{matrix}-\lambda &\lambda &0&0&0\\0&-\lambda &\lambda &0&0\\0&0&-\lambda &\lambda &0\\0&0&0&-\lambda &\lambda \\0&0&0&0&-\lambda \\\end{matrix}}\right].}$

The hypoexponential distribution is a generalisation of the Erlang distribution by having different rates for each transition (the non-homogeneous case).

#### Mixture of Erlang distribution

The mixture of two Erlang distribution with parameter ${\displaystyle E(3,\beta _{1})}$, ${\displaystyle E(3,\beta _{2})}$ and ${\displaystyle (\alpha _{1},\alpha _{2})}$ (such that ${\displaystyle \alpha _{1}+\alpha _{2}=1}$ and ${\displaystyle \forall i,\alpha _{i}\geq 0}$) can be represented as a phase type distribution with

${\displaystyle {\boldsymbol {\alpha }}=(\alpha _{1},0,0,\alpha _{2},0,0),}$

and

${\displaystyle {S}=\left[{\begin{matrix}-\beta _{1}&\beta _{1}&0&0&0&0\\0&-\beta _{1}&\beta _{1}&0&0&0\\0&0&-\beta _{1}&0&0&0\\0&0&0&-\beta _{2}&\beta _{2}&0\\0&0&0&0&-\beta _{2}&\beta _{2}\\0&0&0&0&0&-\beta _{2}\\\end{matrix}}\right].}$

#### Coxian distribution

The Coxian distribution is a generalisation of the hypoexponential. Instead of only being able to enter the absorbing state from state k it can be reached from any phase. The phase-type representation is given by,

${\displaystyle S=\left[{\begin{matrix}-\lambda _{1}&p_{1}\lambda _{1}&0&\dots &0&0\\0&-\lambda _{2}&p_{2}\lambda _{2}&\ddots &0&0\\\vdots &\ddots &\ddots &\ddots &\ddots &\vdots \\0&0&\ddots &-\lambda _{k-2}&p_{k-2}\lambda _{k-2}&0\\0&0&\dots &0&-\lambda _{k-1}&p_{k-1}\lambda _{k-1}\\0&0&\dots &0&0&-\lambda _{k}\end{matrix}}\right]}$

and

${\displaystyle {\boldsymbol {\alpha }}=(1,0,\dots ,0),}$

where ${\displaystyle 0, in the case where all ${\displaystyle p_{i}=1}$ we have the hypoexponential distribution. The Coxian distribution is extremly important as any acyclic phase-type distribution has an equivalent Coxian representation.

The generalised Coxian distribution relaxes the condition that requires starting in the first phase.