# Erlang distribution

Parameters Probability density function Cumulative distribution function ${\displaystyle k\in \{1,2,3,\ldots \},}$ shape ${\displaystyle \lambda \in (0,\infty ),}$ rate alt.: ${\displaystyle \mu =1/\lambda ,}$ scale ${\displaystyle x\in [0,\infty )}$ ${\displaystyle {\frac {\lambda ^{k}x^{k-1}e^{-\lambda x}}{(k-1)!}}}$ ${\displaystyle P(k,\lambda x)={\frac {\gamma (k,\lambda x)}{(k-1)!}}=1-\sum _{n=0}^{k-1}{\frac {1}{n!}}e^{-\lambda x}(\lambda x)^{n}}$ ${\displaystyle {\frac {k}{\lambda }}}$ No simple closed form ${\displaystyle {\frac {1}{\lambda }}(k-1)}$ ${\displaystyle {\frac {k}{\lambda ^{2}}}}$ ${\displaystyle {\frac {2}{\sqrt {k}}}}$ ${\displaystyle {\frac {6}{k}}}$ ${\displaystyle (1-k)\psi (k)+\ln \left[{\frac {\Gamma (k)}{\lambda }}\right]+k}$ ${\displaystyle \left(1-{\frac {t}{\lambda }}\right)^{-k}}$ for ${\displaystyle t<\lambda }$ ${\displaystyle \left(1-{\frac {it}{\lambda }}\right)^{-k}}$

The Erlang distribution is a two-parameter family of continuous probability distributions with support ${\displaystyle x\in [0,\infty )}$. The two parameters are:

• a positive integer ${\displaystyle k,}$ the "shape", and
• a positive real number ${\displaystyle \lambda ,}$ the "rate". The "scale", ${\displaystyle \mu ,}$ the reciprocal of the rate, is sometimes used instead.

The Erlang distribution with shape parameter ${\displaystyle k=1}$ simplifies to the exponential distribution. It is a special case of the gamma distribution. It is the distribution of a sum of ${\displaystyle k}$ independent exponential variables with mean ${\displaystyle 1/\lambda }$ each.

The Erlang distribution was developed by A. K. Erlang to examine the number of telephone calls which might be made at the same time to the operators of the switching stations. This work on telephone traffic engineering has been expanded to consider waiting times in queueing systems in general. The distribution is also used in the field of stochastic processes.

## Characterization

### Probability density function

The probability density function of the Erlang distribution is

${\displaystyle f(x;k,\lambda )={\lambda ^{k}x^{k-1}e^{-\lambda x} \over (k-1)!}\quad {\mbox{for }}x,\lambda \geq 0,}$

The parameter k is called the shape parameter, and the parameter ${\displaystyle \lambda }$ is called the rate parameter.

An alternative, but equivalent, parametrization uses the scale parameter ${\displaystyle \mu }$, which is the reciprocal of the rate parameter (i.e., ${\displaystyle \mu =1/\lambda }$):

${\displaystyle f(x;k,\mu )={\frac {x^{k-1}e^{-{\frac {x}{\mu }}}}{\mu ^{k}(k-1)!}}\quad {\mbox{for }}x,\mu \geq 0.}$

When the scale parameter ${\displaystyle \mu }$ equals 2, the distribution simplifies to the chi-squared distribution with 2k degrees of freedom. It can therefore be regarded as a generalized chi-squared distribution for even numbers of degrees of freedom.

### Cumulative distribution function (CDF)

The cumulative distribution function of the Erlang distribution is

${\displaystyle F(x;k,\lambda )=P(k,\lambda x)={\frac {\gamma (k,\lambda x)}{(k-1)!}},}$

where ${\displaystyle \gamma }$ is the lower incomplete gamma function and ${\displaystyle P}$ is the lower regularized gamma function. The CDF may also be expressed as

${\displaystyle F(x;k,\lambda )=1-\sum _{n=0}^{k-1}{\frac {1}{n!}}e^{-\lambda x}(\lambda x)^{n}.}$

### Median

An asymptotic expansion is known for the median of an Erlang distribution,[1] for which coefficients can be computed and bounds are known.[2][3] An approximation is ${\displaystyle {\frac {k}{\lambda }}\left(1-{\dfrac {1}{3k+0.2}}\right),}$ i.e. below the mean ${\displaystyle {\frac {k}{\lambda }}.}$[4]

## Generating Erlang-distributed random variates

Erlang-distributed random variates can be generated from uniformly distributed random numbers (${\displaystyle U\in (0,1]}$) using the following formula:[5]

${\displaystyle E(k,\lambda )\approx -{\frac {1}{\lambda }}\ln \prod _{i=1}^{k}U_{i}}$

## Applications

### Waiting times

Events that occur independently with some average rate are modeled with a Poisson process. The waiting times between k occurrences of the event are Erlang distributed. (The related question of the number of events in a given amount of time is described by the Poisson distribution.)

The Erlang distribution, which measures the time between incoming calls, can be used in conjunction with the expected duration of incoming calls to produce information about the traffic load measured in erlangs. This can be used to determine the probability of packet loss or delay, according to various assumptions made about whether blocked calls are aborted (Erlang B formula) or queued until served (Erlang C formula). The Erlang-B and C formulae are still in everyday use for traffic modeling for applications such as the design of call centers.

### Other applications

The age distribution of cancer incidence often follows the Erlang distribution, whereas the shape and scale parameters predict, respectively, the number of driver events and the time interval between them.[6] More generally, the Erlang distribution has been suggested as good approximation of cell cycle time distribution, as result of multi-stage models.[7][8]

It has also been used in business economics for describing interpurchase times.[9]

## Properties

• If ${\displaystyle X\sim \operatorname {Erlang} (k,\lambda )}$ then ${\displaystyle a\cdot X\sim \operatorname {Erlang} \left(k,{\frac {\lambda }{a}}\right)}$ with ${\displaystyle a\in \mathbb {R} }$
• If ${\displaystyle X\sim \operatorname {Erlang} (k_{1},\lambda )}$ and ${\displaystyle Y\sim \operatorname {Erlang} (k_{2},\lambda )}$ then ${\displaystyle X+Y\sim \operatorname {Erlang} (k_{1}+k_{2},\lambda )}$

## Related distributions

• The Erlang distribution is the distribution of the sum of k independent and identically distributed random variables, each having an exponential distribution. The long-run rate at which events occur is the reciprocal of the expectation of ${\displaystyle X,}$ that is, ${\displaystyle \lambda /k.}$ The (age specific event) rate of the Erlang distribution is, for ${\displaystyle k>1,}$ monotonic in ${\displaystyle x,}$ increasing from 0 at ${\displaystyle x=0,}$ to ${\displaystyle \lambda }$ as ${\displaystyle x}$ tends to infinity.[10]
• That is: if ${\displaystyle X_{i}\sim \operatorname {Exponential} (\lambda ),}$ then ${\displaystyle \sum _{i=1}^{k}{X_{i}}\sim \operatorname {Erlang} (k,\lambda )}$
• Because of the factorial function in the denominator of the PDF and CDF, the Erlang distribution is only defined when the parameter k is a positive integer. In fact, this distribution is sometimes called the Erlang-k distribution (e.g., an Erlang-2 distribution is an Erlang distribution with ${\displaystyle k=2}$). The gamma distribution generalizes the Erlang distribution by allowing k to be any positive real number, using the gamma function instead of the factorial function.
• That is: if k is an integer and ${\displaystyle X\sim \operatorname {Gamma} (k,\lambda ),}$ then ${\displaystyle X\sim \operatorname {Erlang} (k,\lambda )}$
• If ${\displaystyle U\sim \operatorname {Exponential} (\lambda )}$ and ${\displaystyle V\sim \operatorname {Erlang} (n,\lambda )}$ then ${\displaystyle {\frac {U}{V}}+1\sim \operatorname {Pareto} (1,n)}$
• The Erlang distribution is a special case of the Pearson type III distribution[citation needed]
• The chi-squared distribution is a special case of the Erlang distribution. Indeed, if ${\displaystyle X\sim \operatorname {Erlang} (k,\lambda )}$, then ${\displaystyle 2\lambda X\sim \chi _{2k}^{2}}$.[citation needed]
• The Erlang distribution is related to the Poisson distribution by the Poisson process: If ${\displaystyle S_{n}=\sum _{i=1}^{n}X_{i}}$ such that ${\displaystyle X_{i}\sim \operatorname {Exponential} (\lambda ),}$ then ${\displaystyle S_{n}\sim \operatorname {Erlang} (n,\lambda )}$ and ${\displaystyle \operatorname {Pr} (N(x)\leq n-1)=\operatorname {Pr} (S_{n}>x)=1-F_{X}(x;n,\lambda )=\sum _{k=0}^{n-1}{\frac {1}{k!}}e^{-\lambda x}(\lambda x)^{k}.}$ Taking the differences over ${\displaystyle n}$ gives the Poisson distribution.

## Notes

1. ^ Choi, K. P. (1994). "On the medians of gamma distributions and an equation of Ramanujan". Proceedings of the American Mathematical Society. 121: 245–251. doi:10.1090/S0002-9939-1994-1195477-8. JSTOR 2160389.
2. ^ Adell, J. A.; Jodrá, P. (2007). "On a Ramanujan equation connected with the median of the gamma distribution". Transactions of the American Mathematical Society. 360 (7): 3631. doi:10.1090/S0002-9947-07-04411-X.
3. ^ Jodrá, P. (2012). "Computing the Asymptotic Expansion of the Median of the Erlang Distribution". Mathematical Modelling and Analysis. 17 (2): 281–292. doi:10.3846/13926292.2012.664571.
4. ^ Banneheka BMSG, Ekanayake GEMUPD (2009) "A new point estimator for the median of gamma distribution". Viyodaya J Science, 14:95-103
5. ^ Resa. "Statistical Distributions - Erlang Distribution - Random Number Generator". www.xycoon.com. Retrieved 4 April 2018.
6. ^ Belikov, Aleksey V. (22 September 2017). "The number of key carcinogenic events can be predicted from cancer incidence". Scientific Reports. 7 (1). doi:10.1038/s41598-017-12448-7. PMC 5610194.
7. ^ Yates, Christian A. (21 April 2017). "A Multi-stage Representation of Cell Proliferation as a Markov Process". Bulletin of Mathematical Biology. 79 (1). doi:10.1007/s11538-017-0356-4.
8. ^ Gavagnin, Enrico (14 October 018). "The invasion speed of cell migration models with realistic cell cycle time distributions". Journal of Theoretical Biology. 79 (1). arXiv:1806.03140. doi:10.1016/j.jtbi.2018.09.010.
9. ^ C. Chatfield and G.J. Goodhardt: “A Consumer Purchasing Model with Erlang Interpurchase Times”; Journal of the American Statistical Association, Dec. 1973, Vol.68, pp.828-835
10. ^ Cox, D.R. (1967) Renewal Theory, p20, Methuen.