Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

In a simulation, I am trying to find the value of $d_i$ where:

$\displaystyle d_i \sim \frac{\epsilon_i}{\lambda_i}$ where $\epsilon_i$ is i.i.d. exponentially distributed with parameter = 1 and $i=1...n$.

Conditional on $\lambda_i$ the $d_i$ have an exponential distribution of $\lambda_i$. I know the value of $\lambda_i$ but I don't know how to find the value of $d_i$. What are the steps should I undertake to find $d_i$? How relevant is the $\epsilon_i$?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

All you need to do is simulate $\epsilon_i$ and then divide by $\lambda_i$.

So for example if $U_i$ is uniformly distributed on $[0,1)$ then you can take $\epsilon_i = -\log_e (1-U_i)$ and $d_i = \dfrac{-\log_e (1-U_i)}{\lambda_i}$.

share|improve this answer
ok perfect. Thanks. So does the exponential distribution of $\lambda_i$ matter? –  ChuckM Jul 12 '12 at 7:53
So yes, I ran my simulation with your suggestion and everything works as predicted. Thanks again! –  ChuckM Jul 12 '12 at 8:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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