Next: Beta Random Variable, Previous: Lognormal Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]
The gamma distribution is a two-parameter family of probability distributions. Maxima uses the parameterization using the shape and scale for the first and second parameters of the distribution.
Returns the value at x of the density function of a
\(\Gamma\left(a,b\right)\)
random variable, with \(a,b>0\). To make use of this function, write first load("distrib")
.
The shape parameter is \(a\), and the scale parameter is \(b\).
The pdf is
Returns the value at x of the distribution function of a \(\Gamma\left(a,b\right)\) random variable, with \(a,b>0\).
The cdf is
where \(Q(a,z)\) is the gamma_incomplete_regularized function.
(%i1) load ("distrib")$
(%i2) cdf_gamma(3,5,21); 1 (%o2) 1 - gamma_incomplete_regularized(5, -) 7
(%i3) float(%); (%o3) 4.402663157376807e-7
Returns the q-quantile of a
\(\Gamma\left(a,b\right)\)
random variable, with \(a,b>0\); in other words, this is the inverse of cdf_gamma
. Argument q must be an element of \([0,1]\). To make use of this function, write first load("distrib")
.
Returns the mean of a
\(\Gamma\left(a,b\right)\)
random variable, with \(a,b>0\). To make use of this function, write first load("distrib")
.
The mean is
Returns the variance of a
\(\Gamma\left(a,b\right)\)
random variable, with \(a,b>0\). To make use of this function, write first load("distrib")
.
The variance is
Returns the standard deviation of a
\(\Gamma\left(a,b\right)\)
random variable, with \(a,b>0\). To make use of this function, write first load("distrib")
.
The standard deviation is
Returns the skewness coefficient of a
\(\Gamma\left(a,b\right)\)
random variable, with \(a,b>0\). To make use of this function, write first load("distrib")
.
The skewness coefficient is
Returns the kurtosis coefficient of a
\(\Gamma\left(a,b\right)\)
random variable, with \(a,b>0\). To make use of this function, write first load("distrib")
.
The kurtosis coefficient is
Returns a
\(\Gamma\left(a,b\right)\)
random variate, with \(a,b>0\). Calling random_gamma
with a third argument n, a random sample of size n will be simulated.
The implemented algorithm is a combination of two procedures, depending on the value of parameter a:
For \(a>=1\), Cheng, R.C.H. and Feast, G.M. (1979). Some simple gamma variate generators. Appl. Stat., 28, 3, 290-295.
For \(0<a<1\), Ahrens, J.H. and Dieter, U. (1974). Computer methods for sampling from gamma, , poisson and binomial cdf_tributions. Computing, 12, 223-246.
To make use of this function, write first load("distrib")
.
Next: Beta Random Variable, Previous: Lognormal Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]