0
$\begingroup$

I am tasked with randomly sampling from the following probability density function, which is a modified Erlang Function:

$$f(k,q,\nu)=\frac{(k q)^{k-1}}{[(k-1) !]^{v}} \quad \text { with } \quad q \equiv p \cdot e^{-p}$$

The ordinary Erlang function is given by

$$f(x ; k, \lambda)=\frac{\lambda^{k} x^{k-1} e^{-\lambda x}}{(k-1) !} \quad \text { for } x, \lambda \geq 0$$

Wikipedia states here that the Erlang function may be randomly sampled according to the following function:

$$E(k, \lambda)=-\frac{1}{\lambda} \ln \prod_{i=1}^{k} U_{i}$$

How is this equation derived, such that I may hopefully apply the same method to this special function? If this is not applicable, for my education, how would one sample such a distribution?

$\endgroup$

1 Answer 1

3
$\begingroup$

$\newcommand\la\lambda$If $X_1,X_2,\dots$ are iid random variables (r.v.'s) each with the exponential distribution $E(\la)$ with parameter $\la$, then $\sum_1^n X_i\sim E(k,\la)$.

In turn, if $U_1,U_2,\dots$ are iid r.v.'s each with the uniform distribution over the interval $(0,1)$, then the r.v.'s $X_i:=-\dfrac1\la\,\ln U_i$ will be iid, each with the exponential distribution $E(\la)$. So, $$-\frac1\la\, \ln \prod_{i=1}^k U_i =\sum_{i=1}^k\Big(-\frac1\la\, \ln U_i\Big) =\sum_{i=1}^k X_i \sim E(k,\la),$$ as desired.


As for your modification of the Erlang distribution, it is quite unclear how you define it. In particular, what are $p$, $v$, and $\nu$? What is the set of possible values of $k$? Is the resulting function $f$ a density function? Is there a reference to such a modification of the Erlang distribution?


Details on why $\sum_{i=1}^k X_i\sim E(k,\la)$ if $X_1,X_2,\dots$ are iid random variables (r.v.'s) each with the exponential distribution $E(\la)$ with rate parameter $\la$: This follows immediately from the following facts:

  1. $E(k,\la)=\text{Gamma}(k,\la)$, where $\text{Gamma}(k,\la)$ is the gamma distribution with shape parameter $k$ and rate parameter $\la$. In particular, the exponential distribution $E(\la)$ is the same as $\text{Gamma}(1,\la)$.

  2. If r.v.'s $X\sim\text{Gamma}(a,\la)$ and $Y\sim\text{Gamma}(b,\la)$ are independent, then$X+Y\sim\text{Gamma}(a+b,\la)$; here $a$ and $b$ are any positive real numbers. This fact can be found in any textbook on mathematical statistics, and it can be quickly proved e.g. using the moment generating function for the gamma distribution.

$\endgroup$
3
  • $\begingroup$ Can I prove the statement that $$\sum_{1}^{n} X_{i} \sim E(k, \lambda)$$? Why is this the case? $\endgroup$
    – Jack Rolph
    Commented Mar 30, 2021 at 18:45
  • $\begingroup$ @JackRolph : I have added details on that. Have you taken a course on mathematical statistics? $\endgroup$ Commented Mar 30, 2021 at 19:03
  • $\begingroup$ @JackRolph : Are you satisfied with this answer? $\endgroup$ Commented Dec 29, 2021 at 1:00

Not the answer you're looking for? Browse other questions tagged .