# scipy.special.gdtrib¶

scipy.special.gdtrib(a, p, x, out=None) = <ufunc 'gdtrib'>

Inverse of gdtr vs b.

Returns the inverse with respect to the parameter b of p = gdtr(a, b, x), the cumulative distribution function of the gamma distribution.

Parameters: a : array_like a parameter values of gdtr(a, b, x). 1/a is the “scale” parameter of the gamma distribution. p : array_like Probability values. x : array_like Nonnegative real values, from the domain of the gamma distribution. out : ndarray, optional If a fourth argument is given, it must be a numpy.ndarray whose size matches the broadcast result of a, b and x. out is then the array returned by the function. b : ndarray Values of the b parameter such that p = gdtr(a, b, x). b is the “shape” parameter of the gamma distribution.

gdtr
CDF of the gamma distribution.
gdtria
Inverse with respect to a of gdtr(a, b, x).
gdtrix
Inverse with respect to x of gdtr(a, b, x).

Notes

Wrapper for the CDFLIB [R427] Fortran routine cdfgam.

The cumulative distribution function p is computed using a routine by DiDinato and Morris [R428]. Computation of b involves a seach for a value that produces the desired value of p. The search relies on the monotinicity of p with b.

References

 [R427] (1, 2) Barry Brown, James Lovato, and Kathy Russell, CDFLIB: Library of Fortran Routines for Cumulative Distribution Functions, Inverses, and Other Parameters.
 [R428] (1, 2) DiDinato, A. R. and Morris, A. H., Computation of the incomplete gamma function ratios and their inverse. ACM Trans. Math. Softw. 12 (1986), 377-393.

Examples

First evaluate gdtr.

>>> from scipy.special import gdtr, gdtrib
>>> p = gdtr(1.2, 3.4, 5.6)
>>> print(p)
0.94378087442


Verify the inverse.

>>> gdtrib(1.2, p, 5.6)
3.3999999999723882


#### Previous topic

scipy.special.gdtria

#### Next topic

scipy.special.gdtrix