-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
The code for the Gamma distribution is very incomplete -- the class only basically only contains code for random number generation from a Gamma distribution.
I implemented the pdf, cdf, icdf as well as unit tests, and noticed that the parameters are named $shape and $rate, which would seem congruent with alpha and beta as described in Wikipedia's description of the Gamma distribution.
Running the unit tests on Gamma::draw gives a sample of points that seem to be Gamma(alpha, 1/beta) distributed, suggesting that $rate is really $scale.
What is your preference? Changing the parameters to $shape and $scale or keeping $shape and $rate and correct Gamma::draw?