1
$\begingroup$

I'm looking for an effective method to sample from a Gamma distribution that has the shape parameter not integer.

However, I found everywhere the method to sample from a Gamma with an integer shape (that is as a matter of fact an Erlang distribution).

I found this paper about an method for sampling from a Gamma. Unfortunately, I don't understand how to implement it!

Any suggestion?

$\endgroup$
1
$\begingroup$

See Devroye "Non-Uniform Random Variate Generation" Section IX.3.2 (it is freely available online). Several algorithms are explained in detail there with pseudo-code, so it will be quick to code.

-- Monseigneur Myriel

$\endgroup$
1
  • $\begingroup$ You are welcome! $\endgroup$
    – Learner
    Dec 19 '12 at 12:18

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.