# Erlang distribution

Parameters Probability density function Cumulative distribution function $k > 0\ \in \mathbb{Z}$ shape $\lambda > 0\,$ rate (real) alt.: $\theta = 1/\lambda > 0\,$ scale (real) $x \in [0; \infty)\!$ $\frac{\lambda^k x^{k-1} e^{-\lambda x}}{(k-1)!\,}$ $\frac{\gamma(k, \lambda x)}{(k-1)!}=1-\sum_{n=0}^{k-1}e^{-\lambda x}(\lambda x)^{n}/n!$ $k/\lambda\,$ no simple closed form $(k-1)/\lambda\,$ for $k \geq 1\,$ $k /\lambda^2\,$ $\frac{2}{\sqrt{k}}$ $\frac{6}{k}$ $(1-k)\psi(k) + \ln \frac{\Gamma(k)}{\lambda} + k$ $(1 - t/\lambda)^{-k}\,$ for $t < \lambda\,$ $(1 - it/\lambda)^{-k}\,$

The Erlang distribution is a continuous probability distribution with wide applicability primarily due to its relation to the exponential and Gamma distributions. 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 now used in the field of stochastic processes.

## Overview

The distribution is a continuous distribution, which has a positive value for all real numbers greater than zero, and is given by two parameters: the shape k, which is a non-negative integer, and the rate λ, which is a non-negative real number. The distribution is sometimes defined using the inverse of the rate parameter, the scale θ.

When the shape parameter k equals 1, the distribution simplifies to the exponential distribution.

The Erlang distribution is a special case of the Gamma distribution where the shape parameter k is an integer. In the Gamma distribution, this parameter is not restricted to the integers.

## Characterization

### Probability density function

The probability density function of the Erlang distribution is

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

where e is the base of the natural logarithm and ! is the factorial function. The parameter k is called the shape parameter and the parameter λ is called the rate parameter. An alternative, but equivalent, parametrization uses the scale parameter θ which is the reciprocal of the rate parameter (i.e. θ = 1 / λ):

$f(x; k,\theta)=\frac{ x^{k-1} e^{-\frac{x}{\theta}} }{\theta^k(k-1)!}\quad\mbox{for }x,\lambda\geq0.$

Because of the factorial function in the denominator, 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 k=2). The Gamma distribution generalizes the Erlang by allowing k to be a real, using the gamma function instead of the factorial function.

### Cumulative distribution function

The cumulative distribution function of the Erlang distribution is

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

where γ() is the lower incomplete gamma function. The CDF may also be expressed as

$F(x; k,\lambda) = 1-\sum_{n=0}^{k-1}e^{-\lambda x}(\lambda x)^{n}/n!.$

## Occurrence

### Waiting times

Events which 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 Erlang units. 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.

### Compartment models

The Erlang distribution also occurs as a description of the rate of transition of elements through a system of compartments. Such systems are widely used in biology and ecology. For example, in mathematical epidemiology, an individual may progress at an exponential rate from healthy to carrier and again exponentially from carrier to infectious. The probability of seeing an infectious individual at time t would then be given by Erlang distribution with k=2. Such models have the useful property that the variance in the infectious compartment is large. In a pure exponential model the variance 1 / λ2 - which is often unrealistically small.

### Stochastic processes

The Erlang distribution is the distribution of the sum of k independent identically distributed random variables each having an exponential distribution.