Previous Up Next

20.4.11  Gamma distribution

The probability density function for the gamma distribution.

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

gammad(2,1,3)
     
3
e3
          
The cumulative distribution function for the gamma distribution.

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 7.3.15),

  igamma(a,x,1)=
1
Γ(a)
x


0
 etta−1dt.

Examples

gammad_cdf(2,1,0.5)
     
0.090204010431           
gammad_cdf(2,1,0.5,1.5)
     
0.351970589198           
The inverse distribution function for the gamma distribution.

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

Example

gammad_icdf(2,1,0.5)
     
1.67834699002           

Previous Up Next