scipy.special.bdtrin#
- scipy.special.bdtrin(k,y,p,out=None)=<ufunc'bdtrin'>#
Inverse function to
bdtrwith respect ton.Finds the number of eventsn such that the sum of the terms 0 throughk of the Binomial probability density for events with probabilityp isequal to the given cumulative probabilityy.
- Parameters:
- karray_like
Number of successes (float).
- yarray_like
Cumulative probability (probability ofk or fewer successes innevents).
- parray_like
Success probability (float).
- outndarray, optional
Optional output array for the function values
- Returns:
- nscalar or ndarray
The number of eventsn such thatbdtr(k, n, p) = y.
See also
Notes
Formula 26.5.24 of[1] (or equivalently[2]) is used to reduce the binomialdistribution to the cumulative incomplete beta distribution.
Computation ofn involves a search for a value that produces the desiredvalue ofy. The search relies on the monotonicity ofy withn.
Wrapper for the CDFLIB[3] Fortran routinecdfbin.
References
[1]Milton Abramowitz and Irene A. Stegun, eds.Handbook of Mathematical Functions with Formulas,Graphs, and Mathematical Tables. New York: Dover, 1972.
[2]NIST Digital Library of Mathematical Functionshttps://dlmf.nist.gov/8.17.5#E5
[3]Barry Brown, James Lovato, and Kathy Russell,CDFLIB: Library of Fortran Routines for Cumulative DistributionFunctions, Inverses, and Other Parameters.