With Scipy gamma distribution, one can only specify shape, loc, and scale. How do I create a gamma variable with shape and rate?
Inverse scale (1/scale
) is rate parameter.
So if you have shape
and rate
you can create gamma rv with this code
>>> from scipy.stats import gamma
>>> rv = gamma(shape, scale = 1.0/rate)
Read more about different parametrizations of Gamma distribution on Wikipedia: http://en.wikipedia.org/wiki/Gamma_distribution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With