1
$\begingroup$

Asymetric double exponential distribution $X \sim AL(p,\theta_1, \theta_2)$ has the following form of density function: $$ f(x) = p \theta_1 e^{−\theta_1x} \mathbb{1}_{x<0} + (1 − p) \theta_2 e^{\theta_2x} \mathbb{1}_{x\geq0} $$ I know the Inverse CDF method of simulation random variable, but in this case I think it is not possible, because CDF can not be presented in one simple form, so my question is:

How can I simulate this distribution?

$\endgroup$
1
$\begingroup$

Well, it should be fairly obvious, since $$\Pr[X \ge 0] = \int_{x=0}^\infty f_X(x) \, dx = 1-p,$$ and $$\Pr[X < 0] = p.$$ Thus to simulate realizations of $X$, all you need to do is simulate a $\operatorname{Bernoulli}(p)$ variable, and based on the value of this variable, simulate either an $-\operatorname{Exponential}(\theta_1)$ or $\operatorname{Exponential}(\theta_2)$ variable.

Incidentally, you have the signs reversed if $\theta_1, \theta_2 > 0$. Your present parametrization is valid only if $\theta_1, \theta_2 < 0$.

$\endgroup$
  • $\begingroup$ Thank you, I made a mistake, because my density function is not positive. It should be equal: $ f(x) = p \theta_1 e^{-\theta_1 x} \mathbb{1}_{x \geq 0} + (1-p) \theta_2 e^{\theta_2 x} \mathbb{1}_{x<0} $. My question now is: If I will simulate number which is less than $p$, then I have to simulate random variable with density $f(x) = p \theta_1 e^{-\theta_1 x}$ or $f(x) = \theta_1 e^{-\theta_1 x} $? $\endgroup$ – MathMen Jun 14 '17 at 17:29
  • $\begingroup$ @JonasAl-Hadad You simulate the respective random variable attached to the corresponding Bernoulli probability. So if for example $p = 0.3$, $\theta_1 = 5$, $\theta_2 = 9$, and you generate a $Y \sim \operatorname{Uniform}(0,1)$ variable and find that it is $y = 0.2 < p$, then you will generate a $\operatorname{Exponential}(\theta_1 = 5)$ variable and keep the sign positive. If you generated $y = 0.8 > p$, then you would generate $\operatorname{Exponential}(\theta_2 = 9)$ and flip the sign. $\endgroup$ – heropup Jun 14 '17 at 18:01

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.