Mathwords logoMathwords

Erlang Distribution — Definition, Formula & Example

The Erlang distribution is the probability distribution of the total waiting time until the kkth event, when events occur randomly at a constant average rate. It extends the exponential distribution from "wait for the next event" to "wait for the kkth event."

A continuous random variable XX has an Erlang distribution with shape k∈{1,2,3,… }k \in \{1, 2, 3, \dots\} and rate λ>0\lambda > 0, written X∼Erlang(k,λ)X \sim \text{Erlang}(k, \lambda), if its probability density function is f(x)=λkxk−1e−λx(k−1)!f(x) = \frac{\lambda^k x^{k-1} e^{-\lambda x}}{(k-1)!} for x≥0x \ge 0 and 00 for x<0x < 0. Equivalently, X=Y1+⋯+YkX = Y_1 + \cdots + Y_k, where the YiY_i are independent Exponential(λ)\text{Exponential}(\lambda) variables. Its mean is E[X]=k/λE[X] = k/\lambda and its variance is Var(X)=k/λ2\text{Var}(X) = k/\lambda^2. The Erlang distribution is the gamma distribution with an integer shape parameter.

Key Formula

f(x)=λkxk−1e−λx(k−1)!,F(x)=1−∑n=0k−1e−λx(λx)nn!,x≥0f(x) = \frac{\lambda^k x^{k-1} e^{-\lambda x}}{(k-1)!}, \qquad F(x) = 1 - \sum_{n=0}^{k-1} \frac{e^{-\lambda x}(\lambda x)^n}{n!}, \quad x \ge 0
Where:
  • kk = Shape: the number of events you wait for (a positive integer)
  • λ\lambda = Rate: the average number of events per unit of time
  • xx = Elapsed waiting time, with x ≥ 0
  • f(x)f(x) = Probability density function
  • F(x)F(x) = Cumulative distribution function, the probability that the kth event occurs by time x

Worked Example

Problem: A bakery receives online orders at random, at an average rate of 2 orders per hour. Starting from opening time, what is the expected wait until the 3rd order? What is the probability that the 3rd order arrives within the first hour?
Step 1: The wait for the 3rd order is the sum of three independent exponential gaps, so X∼Erlang(3,2)X \sim \text{Erlang}(3, 2). The mean is k/λk/\lambda.
E[X]=kλ=32=1.5 hoursE[X] = \frac{k}{\lambda} = \frac{3}{2} = 1.5 \text{ hours}
Step 2: Use the CDF with k=3k = 3 and λx=2⋅1=2\lambda x = 2 \cdot 1 = 2. The sum runs from n=0n = 0 to n=k−1=2n = k - 1 = 2.
F(1)=1−e−2(1+2+222!)=1−5e−2F(1) = 1 - e^{-2}\left(1 + 2 + \frac{2^2}{2!}\right) = 1 - 5e^{-2}
Step 3: Evaluate, using e−2≈0.135335e^{-2} \approx 0.135335.
F(1)≈1−0.6767=0.3233F(1) \approx 1 - 0.6767 = 0.3233
Answer: The expected wait for the 3rd order is 1.5 hours. The probability that the 3rd order arrives within the first hour is 1−5e−2≈0.32331 - 5e^{-2} \approx 0.3233, or about 32%.

Why It Matters

Danish engineer A. K. Erlang developed this model in papers from 1909 to 1917 to size telephone exchanges. It is still a core tool in queueing theory for staffing call centers and modeling server loads. In operations research and reliability courses, it models multi-stage service times and the lifetime of a system with k−1k-1 backup parts.

Common Mistakes

Mistake: Running the CDF sum up to n=kn = k or using k!k! instead of (k−1)!(k-1)! in the density.
Correction: The kkth event has not happened by time xx exactly when 0,1,…,k−10, 1, \dots, k-1 events have occurred. That is why the sum stops at k−1k-1. The density uses (k−1)!(k-1)! so that it integrates to 1.

Related Terms