naginterfaces.library.stat.pdf_​gamma

naginterfaces.library.stat.pdf_gamma(x, a, b)[source]

pdf_gamma returns the value of the probability density function (PDF) for the gamma distribution with shape parameter and scale parameter at a point .

For full information please refer to the NAG Library document for g01kf

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/g01/g01kff.html

Parameters
xfloat

, the value at which the PDF is to be evaluated.

afloat

, the shape parameter of the gamma distribution.

bfloat

, the scale parameter of the gamma distribution.

Returns
pdffloat

The value of the PDF.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

Computation abandoned owing to overflow due to extreme parameter values.

Notes

The gamma distribution has PDF

If then an algorithm based directly on the gamma distribution’s PDF is used. For values outside this range, the function is calculated via the Poisson distribution’s PDF as described in Loader (2000) (see Further Comments).

References

Loader, C, 2000, Fast and accurate computation of binomial probabilities ((not yet published))