Interface
erlang(n:int, r:real) : real
where n>=1
and r>0.0
. Returns a drawing from an n
-Erlang
distribution with intensity r
.
A drawing from an n
-Erlang distribution can be derived by addition of
n
drawings from a exponential distribution.
Raises Erlang
exception, if n
<1 or r<=0.0
.
Characteristics
- Mean:
n/r
- Variance:
n/r^2
Density functions for n
-Erlang distributions:
Example
erlang(100,50.0)
A shop gives each 100
th customer a present. The arrival time
between customers is exponentially distributed with intensity r=50.0
per hour. The sums of the arrival times between customers is Erlang
distributed with parameters n=100
and r=50.0
.
You must be logged in to post a comment.