Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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|cite|improve this question
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|cite|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.