Expected value of the Erlang distribution with shape parameter \(n\) and rate parameter \(\beta\).

E_erlang(shape, rate = 1/scale, scale = 1/rate)

Arguments

shape

shape parameter \(n\), must be positive integer.

rate

\(\beta\) is the rate parameter, must be positive.

scale

alternative parameterization to rate parameter, scale = 1 / rate.

Value

Function :

Invalid parameter values will return an error detailing which parameter is problematic.

Details

The Erlang distribution with shape parameter \(n\) and rate parameter \(\beta\) has density: $$f\left(x\right) = \frac{\beta^{n}}{\Gamma(n)} x^{n - 1}% \mathrm{e}^{-\beta x}$$ for \(x \in \mathcal{R}^+\), \(\beta > 0\), \(n \in \mathcal{N}^+\)

See also

Examples

# With scale parameter E_erlang(shape = 2, scale = 5)
#> [1] 10
# With rate parameter E_erlang(shape = 2, rate = 0.2)
#> [1] 10