How can we simulate an exponential random variable with $\lambda = 2\,$?

140 Views Asked by At

How can we simulate an exponential random variable with $\lambda = 2$, if we already have a generator of exponential distribution with $\lambda = 1$?

2

There are 2 best solutions below

0
On BEST ANSWER

Notice that

$$\mathbb P(X\leqslant x) = 1 - e^{-\lambda x}.$$

Hence,

$$\mathbb P(cX\leqslant x) = \mathbb P(X\leqslant x/c) = 1 - e^{-\lambda x/c}$$

In order to simulate $1-e^{-2x}$, you need $\lambda/c = 2$. Since $\lambda = 1$, you need $c=1/2$.

0
On

Halve your random value. If $X\sim\operatorname{Exp}(1)$ then $X/\lambda\sim\operatorname{Exp}(\lambda)$.