Skip to content

ErlangDistribution ​

The Erlang distribution with shape nn and rate λ\lambda — GammaDistribution(n,1/λ)GammaDistribution(n, 1/\lambda) under the hood.

ErlangDistribution(n, lambda)an inert distribution object — carries n,λn, \lambda, unevaluated.
Typed signatures
TypePackageApplies
(real<0..>, real<0..>) -> distributionstatisticsalways

Domain: Statistics

Details
  • PDF(x)=λnxn−1e−λx/Γ(n)PDF(x) = \lambda^n x^{n-1}e^{-\lambda x}/\Gamma(n) for x≥0x \geq 0.
  • CDF(x)=P(n,λx)CDF(x) = P(n, \lambda x), the regularized lower incomplete gamma via GammaRegularized (same upper-tail-native convention as ChiSquareDistribution), clamped to 00 below x=0x=0.
  • Mean=n/λMean = n/\lambda, Variance=n/λ2Variance = n/\lambda^2, both exact.
  • RandomVariate samples via the same Marsaglia–Tsang GammaDistribution draw, shape nn, scale 1/λ1/\lambda.

Examples

Basic #
live ↗
InPDF⁡(ErlangDistribution(3,2),1)\operatorname{PDF}(\mathrm{ErlangDistribution}(3, 2), 1)Out8Γ(3)e2\frac{8}{Γ(3)e^{2}}
live ↗
InCDF⁡(ErlangDistribution(3,2),1)\operatorname{CDF}(\mathrm{ErlangDistribution}(3, 2), 1)Out1−5e21-\frac{5}{e^{2}}
live ↗
Inmean(ErlangDistribution(3,2))\mathrm{mean}(\mathrm{ErlangDistribution}(3, 2))Out32\frac{3}{2}
live ↗
InVariance(ErlangDistribution(3,2))\mathrm{Variance}(\mathrm{ErlangDistribution}(3, 2))Out34\frac{3}{4}
About
Examples4

See also: GammaDistribution, ChiSquareDistribution, PDF, CDF