The Erlang distribution models the time until the $k$-th event $Y_k$ in a [[Poisson Process]]. By definition $Y_k$ is the sum of $k$ [[Independence and Identical Distribution|i.i.d.]] [[Random Variable|random variables]] $T_i$ from the [[Exponential Distribution]]. $ Y_k = \sum_{i=1}^k T_i, \quad \text{where}\:T_i \sim\mathrm{Exp}(\lambda)$ **PDF:** $ f_{Y_k}(y; \lambda)=\frac{\lambda^{k} y^{k-1} * e^{- \lambda y}}{(k-1)!}, \quad y \ge 0 $ where: - $k \in \mathbb N$ is the shape parameter (number of successes) - $\lambda > 0$ is the rate parameter (events per unit time) **Derivation of PDF:** $Y_k$ is approximated by the probability that $Y_k$ happens between $[y, y+\delta]$. Because of the fresh-start property, this can be split into two independent events: - There have been $k-1$ successes until time $y$. - There has been exactly $1$ success during time $[y, y+\delta]$, which has probability $\lambda \delta$. $ \begin{align} f_{Y_k}(y; \lambda) \,\delta &\approx \mathbf P(y \le Y_k \le y+ \delta) \tag{1}\\[12pt] f_{Y_k}(y; \lambda) \, \delta &\approx \mathbf P(k-1, y)*\lambda \delta \tag{2}\\[8pt] f_{Y_k}(y; \lambda) &\approx \frac{(\lambda y)^{k-1} * e^{- \lambda y}}{(k-1)!}*\lambda \tag{3}\\[10pt] f_{Y_k}(y; \lambda)& \approx\frac{\lambda^{k} y^{k-1} * e^{- \lambda y}}{(k-1)!} \tag{4} \end{align} $ where: - (2) $\mathbf P(k-1,y)$ denotes the probability of having $(k-1)$ successes during a period of length $y$. - (3) Insert the Poisson PDF for $\mathbf P(k-1,y)$. The $\delta$ on both sides cancel out. **Expectation:** Applying [[Linearity of Expectations]]. $ \mathbb E[Y_k] =\mathbb E\left[\sum_{i=1}^k T_i\right]=\sum_{i=1}^k \mathbb E[T_i]= k*\mathbb E[T_1] = \frac{k}{\lambda}$ **Variance:** Splitting the [[Variance of Sum of Random Variables#Special Case of Independence|Variance of Sum of Random Variables]] due to independence. $ \mathrm{Var}(Y_k) = \mathrm{Var}\left(\sum_{i=1}^k T_i\right) = \sum_{i=1}^k \mathrm{Var}(T_i) = k*\mathrm{Var}(T_1) = \frac{k}{\lambda^2}$ The Erlang distribution is widely used in queuing theory, telecommunications, and reliability engineering to model waiting times for multiple events in a Poisson process. ![[erlang-distribution.png|center|400]]