Macaulay2 » Documentation
Packages » Probability :: gammaDistribution
next | previous | forward | backward | up | index | toc

gammaDistribution -- gamma distribution

Synopsis

Description

The gamma distribution. When alpha is an integer (also known as the Erlang distribution), this is waiting time until the alphath event in a Poisson process where lambda is the expected number of events in one unit of time. In particular, when alpha is 1, this is the exponential distribution.

i1 : X = gammaDistribution(5, 0.6)

o1 = Gamma(5,.6)

o1 : ContinuousProbabilityDistribution
i2 : density_X 2

o2 = .0156139079455286

o2 : RR (of precision 53)
i3 : probability_X 3

o3 = .0364066610010834

o3 : RR (of precision 53)
i4 : quantile_X 0.4

o4 = 6.91289313411757

o4 : RR (of precision 53)
i5 : random X

o5 = 13.1175639516228

o5 : RR (of precision 53)

Caveat

Some probability texts define the gamma distribution using a scale parameter instead of a rate parameter. They are reciprocals of one another.

Ways to use gammaDistribution :

For the programmer

The object gammaDistribution is a method function.