Gamma {distributions3} | R Documentation |
Create a Gamma distribution
Description
Several important distributions are special cases of the Gamma
distribution. When the shape parameter is 1
, the Gamma is an
exponential distribution with parameter . When the
and
, the Gamma is a equivalent to
a chi squared distribution with n degrees of freedom. Moreover, if
we have
is
and
is
, a function of these two variables
of the form
.
This last property frequently appears in another distributions, and it
has extensively been used in multivariate methods. More about the Gamma
distribution will be added soon.
Usage
Gamma(shape, rate = 1)
Arguments
shape |
The shape parameter. Can be any positive number. |
rate |
The rate parameter. Can be any positive number. Defaults
to |
Details
We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail.
In the following, let be a Gamma random variable
with parameters
shape
= and
rate
= .
Support:
Mean:
Variance:
Probability density function (p.m.f):
Cumulative distribution function (c.d.f):
Moment generating function (m.g.f):
Value
A Gamma
object.
See Also
Other continuous distributions:
Beta()
,
Cauchy()
,
ChiSquare()
,
Erlang()
,
Exponential()
,
FisherF()
,
Frechet()
,
GEV()
,
GP()
,
Gumbel()
,
LogNormal()
,
Logistic()
,
Normal()
,
RevWeibull()
,
StudentsT()
,
Tukey()
,
Uniform()
,
Weibull()
Examples
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))