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 $$ f(x; a, b) = {x^{a-1}e^{-x/b}\over b^a \Gamma(a)} $$
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 $$ F(x; a, b) = \cases{ 1-Q(a,{x\over b}) & for $x \ge 0$ \cr \cr 0 & for $x < 0$ } $$
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 $$ E[X] = ab $$
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 $$ V[X] = ab^2 $$
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 $$ D[X] = b\sqrt{a} $$
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 $$ SK[X] = {2\over \sqrt{a}} $$
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 $$ KU[X] = {6\over a} $$
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]