Previous topic


Next topic



scipy.special.gdtria(p, b, x, out=None) = <ufunc 'gdtria'>

Inverse of gdtr vs a.

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


p : array_like

Probability values.

b : array_like

b parameter values of gdtr(a, b, x). b is the “shape” parameter of the gamma distribution.

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.


a : ndarray

Values of the a parameter such that p = gdtr(a, b, x). 1/a is the “scale” parameter of the gamma distribution.

See also

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


Wrapper for the CDFLIB [R425] Fortran routine cdfgam.

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


[R425](1, 2) Barry Brown, James Lovato, and Kathy Russell, CDFLIB: Library of Fortran Routines for Cumulative Distribution Functions, Inverses, and Other Parameters.
[R426](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.


First evaluate gdtr.

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

Verify the inverse.

>>> gdtria(p, 3.4, 5.6)