I have a pdf in a form:

$$f(x) = \begin{cases}\frac{1}{2} + \frac{1}{2} \frac{\lambda^k x^{k-1} e^{-\lambda x}}{k!} & \text{for $0<x<1$} \\ \frac{1}{2} \frac{\lambda^k x^{k-1} e^{-\lambda x}}{k!} & \text{for $x \ge 1$} \\ 0 & \text{otherwise} \end{cases}$$

I can see that this is a mixture of $\text{Erlang}(k,\lambda)$ with probability $0.5$ and some other distribution. Believe it might be uniform $U(0,1)$ but I cannot see how it would work.

  • 2
    $\begingroup$ It is indeed half Erlang/gamma and half Uniform on $(0,1)$, The pdf is fairly clearly the average of the pdfs of the two original distributions: the $\frac12 +$ part for $0 < x < 1$ is half of $1$ $\endgroup$
    – Henry
    May 8, 2021 at 1:32

1 Answer 1


Your density function for the Erlang distribution is wrong, so I will correct that in my answer. (What you give is not a valid density function since it does not integrate to one.) My answer assumes this correction is made.

Yes, this is a mixture of an Erlang random variable and a uniform random variable (with equal probability). Specifically, if you let $X_0 \sim \text{U}(0,1)$ and $X_1 \sim \text{Erlang}(k,\lambda)$ then your random variable is the mixture:

$$X = X_Y \quad \quad \quad Y \sim \text{Bern}(\tfrac{1}{2}).$$

To see this, apply the law of total probability to get:

$$\begin{align} p(X=x) &= p(Y=0) \cdot p(X=x|Y=0) + p(Y=1) \cdot p(X=x|Y=1) \\[6pt] &= \tfrac{1}{2} \cdot p(X_0=x) + \tfrac{1}{2} \cdot p(X_1=x) \\[6pt] &= \tfrac{1}{2} \cdot \text{U}(x|0,1) + \tfrac{1}{2} \cdot \text{Erlang}(x|k,\lambda) \\[12pt] &= \begin{cases} \ 0 & & & \text{for } x \leqslant 0, \\[10pt] \tfrac{1}{2} + \tfrac{1}{2} \cdot \frac{\lambda^k x^{k-1} e^{-\lambda x}}{(k-1)!} & & & \text{for } 0 < x < 1, \\[6pt] \tfrac{1}{2} \cdot \frac{\lambda^k x^{k-1} e^{-\lambda x}}{(k-1)!} & & & \text{for } x \geqslant 1, \\[6pt] \end{cases} \end{align}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.