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.

Suppose that we have a multivariate Gamma-Exponential Distribution with pdf $$ p(x,y) = \frac{{{\theta _1}^{{\theta _2}}{\theta _3}}}{{\Gamma ({\theta _2})}}{x^{{\theta _2}}}{e^{ - {\theta _1}x - {\theta _3}xy}}$$

How can I generate random samples according to this distribution?

share|improve this question
    
@MahdiKhosravi Changing the size of the fonts is not desirable in general (and certainly not in the present case). Surely you can find more constructive ways to contribute? –  Did Jul 28 '13 at 7:17

1 Answer 1

up vote 2 down vote accepted

If you divide $p(x,y)$ by $\theta_3 x e^{-\theta _3x y}$, you would get $\frac{e^{-x \theta _1} x^{+\theta_2 - 1} \theta _1^{\theta _2}}{\Gamma\left(\theta _2\right)}$ which immediately shows that the marginal for $X$ is gamma with parameters $\theta_1$ and $\theta_2$ and that the conditional of $Y$ given $X=x$ is exponential with parameter $x\theta_3$. To sample from $p(x,y)$, start by sampling $X$ from a gamma distribution with parameters $\theta_1$ and $\theta_2$ and then sample an exponential for $Y$ with parameter given the the sampled value of $X$ multiplied by $\theta_3$. Repeat that as many times as the required random sample is.

share|improve this answer

Your Answer

 
discard

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.