Skip to content

Parameters in Gamma distribution #22

@mossadal

Description

@mossadal

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions