represents the Erlang distribution with shape parameter k and rate λ.
- The probability density for value in an Erlang distribution is proportional to for , and is zero for .
- ErlangDistribution[k,λ] is equivalent to TransformedDistribution[x1+…+xk,…] with each xi from ExponentialDistribution[λ].
- ErlangDistribution allows k to be any positive integer and λ to be any positive real number.
- ErlangDistribution allows λ to be a quantity of any unit dimension, and k to be a dimensionless quantity. »
- ErlangDistribution can be used with such functions as Mean, CDF, and RandomVariate.
Background & Context
- ErlangDistribution[k,λ] represents a continuous statistical distribution over the interval that is parametrized by two values k and λ. It is defined as the distribution of the sum of k independent and identically distributed random variables , each distributed as XiExponentialDistribution[λ]. Here, k is a positive integer and λ is a positive real-valued "service rate" that determines the overall height/steepness of the associated probability density function (PDF). The PDF of an Erlang distribution is continuous and may be either unimodal or monotonic decreasing, with a potential discontinuity approaching the lower boundary of its domain. In addition, the tails of the PDF are "fat", in the sense that the PDF decreases algebraically rather than decreasing exponentially for large values of . (This behavior can be made quantitatively precise by analyzing the SurvivalFunction of the distribution.)
- The Erlang distribution was proposed by Danish mathematician and statistician Agner Krarup Erlang in the early 1900s as a tool to model phone call frequency. In the ensuing years, the Erlang distribution has become a regularly utilized tool in queueing theory, particularly for modeling a queue's conditional waiting time, given its current system state. For example, upon entering a queue that already has three people in it, the anticipated wait time would satisfy TErlangDistribution[3,λ], where λ is the reciprocal of the mean service time per person.
- RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from an Erlang distribution. Distributed[x,ErlangDistribution[k,λ]], written more concisely as xErlangDistribution[k,λ], can be used to assert that a random variable x is distributed according to an Erlang distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
- The probability density and cumulative distribution functions may be given using PDF[ErlangDistribution[k,λ],x] and CDF[ErlangDistribution[k,λ],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively.
- DistributionFitTest can be used to test if a given dataset is consistent with an Erlang distribution, EstimatedDistribution to estimate an Erlang parametric distribution from given data, and FindDistributionParameters to fit data to an Erlang distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic Erlang distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic Erlang distribution.
- TransformedDistribution can be used to represent a transformed Erlang distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain an Erlang distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving Erlang distributions.
- The Erlang distribution is related to a number of other distributions, including the exponential distribution (through its definition). ErlangDistribution is also a special case of both GammaDistribution and PearsonDistribution, in the sense that the PDF of GammaDistribution[k, 1/λ] and PearsonDistribution[3, 1,(-k + 1)/λ, 0, 1/λ, 0] are both precisely the same as the PDF of ErlangDistribution[k,λ]. ErlangDistribution[k,λ] converges to NormalDistribution[k/λ,/λ] as k tends to Infinity, and ParetoDistribution can be obtained as a quotient of ExponentialDistribution and ErlangDistribution. Moreover, ErlangDistribution is related to a transformed ChiSquareDistribution, through which it inherits relationships with NormalDistribution, LogNormalDistribution, RayleighDistribution, WeibullDistribution, and MaxwellDistribution.
Examplesopen allclose all
Basic Examples (4)
As k grows, kurtosis nears the kurtosis of NormalDistribution:
Assume that the delay caused by a traffic signal is exponentially distributed with an average delay of 0.5 minutes. A driver has to drive a route that passes through seven unsynchronized traffic signals. Find the distribution for the delay passing all signals:
Assume that the duration of telephone calls is exponentially distributed. The average length of a telephone call is 3.7 minutes. Find the probability that nine consecutive phone calls will be longer than 25 minutes:
Assume that the time delay in a logic element is exponentially distributed and that the average delay is seconds. The longest sequence of logic elements in a combinational logic network is six. Find the probability that delay through all six elements is longer than seconds:
A device has 3 lifetime phases: A, B, and C. The time spent in each phase follows an exponential distribution with a mean time of 10 hours; after phase C, failure occurs. Find the distribution of the time to failure of this device:
A system starts with 10 devices; one is active and the remaining nine are on standby. The lifetime of each device has ExponentialDistribution with parameter . When a device fails, it is immediately replaced with another device if there is one still available. The lifetime of the system then follows the distribution:
Properties & Relations (9)
ErlangDistribution[k,λ] converges to a normal distribution as k->∞:
Sum of k variables with ExponentialDistribution is Erlang distributed:
Erlang distribution is a special case of type 3 PearsonDistribution:
Erlang distribution is a special case of GammaDistribution: