
Several important distributions are special cases of the Gamma
distribution. When the shape parameter is 1
, the Gamma is an
exponential distribution with parameter
Gamma(shape, rate = 1)
A Gamma
object.
The shape parameter. Can be any positive number.
The rate parameter. Can be any positive number. Defaults
to 1
.
We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail.
In the following, let shape
= rate
=
Support:
Mean:
Variance:
Probability density function (p.m.f):
Cumulative distribution function (c.d.f):
Moment generating function (m.g.f):
set.seed(27)
X <- Gamma(5, 2)
X
random(X, 10)
pdf(X, 2)
log_pdf(X, 2)
cdf(X, 4)
quantile(X, 0.7)
cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 7))
Run the code above in your browser using DataLab