Previous Up Next

9.4.11  The gamma distribution

The probability density function for the gamma distribution: gammad

The gamma distribution depends on two parameters, a>0 and b>0; the value of the density function at x ≥ 0 is

gammad(a,b,x) = xa−1ebxba/Γ(a)     (8)

The gammad command computes this density function.


Example.
Input:

gammad(2,1,3)

Output:

3
e3

The cumulative distribution function for the gamma distribution: gammad_cdf

The gamma_cdf command computes the cumulative distribution function for the gamma distribution.

It turns out that

gammad_cdf(n,x) = igamma(abx, 1)

where igamma is the incomplete gamma function (see Section 6.8.15),

  igamma(a,x,1) = 
x


0
 etta−1dt/Γ(a).


Examples.

The inverse distribution function for the gamma distribution: gammad_icdf

The gammad_icdf command computes the inverse distribution for the gamma distribution.


Example.
Input:

gammad_icdf(2,1,0.5)

Output:

1.67834699002

Previous Up Next