Previous topic

scipy.special.bdtri

Next topic

scipy.special.bdtrin

scipy.special.bdtrik

scipy.special.bdtrik(y, n, p) = <ufunc 'bdtrik'>

Inverse function to bdtr with respect to k.

Finds the number of successes k such that the sum of the terms 0 through k of the Binomial probability density for n events with probability p is equal to the given cumulative probability y.

Parameters:

y : array_like

Cumulative probability (probability of k or fewer successes in n events).

n : array_like

Number of events (float).

p : array_like

Success probability (float).

Returns:

k : ndarray

The number of successes k such that bdtr(k, n, p) = y.

See also

bdtr

Notes

Formula 26.5.24 of [R318] is used to reduce the binomial distribution to the cumulative incomplete beta distribution.

Computation of k involves a seach for a value that produces the desired value of y. The search relies on the monotinicity of y with k.

Wrapper for the CDFLIB [R319] Fortran routine cdfbin.

References

[R318](1, 2) Milton Abramowitz and Irene A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972.
[R319](1, 2) Barry Brown, James Lovato, and Kathy Russell, CDFLIB: Library of Fortran Routines for Cumulative Distribution Functions, Inverses, and Other Parameters.