bundles / scipy latest / scipy / stats / _probability_distribution / _ProbabilityDistribution / iccdf
function
scipy.stats._probability_distribution:_ProbabilityDistribution.iccdf
Signature
def iccdf ( self , p , / , method ) Summary
Inverse complementary cumulative distribution function.
Extended Summary
The inverse complementary cumulative distribution function ("inverse CCDF"), denoted , is the argument for which the complementary cumulative distribution function evaluates to .
When a strict "inverse" of the complementary cumulative distribution function does not exist (e.g. discrete random variables), the "inverse CCDF" is defined by convention as the smallest value within the support for which is no greater than .
iccdf accepts p for .
Parameters
p: array_likeThe argument of the inverse CCDF.
method: {None, 'formula', 'complement', 'inversion'}The strategy used to evaluate the inverse CCDF. By default (
None), the infrastructure chooses between the following options, listed in order of precedence.'formula': use a formula for the inverse CCDF itself'complement': evaluate the inverse CDF at the complement ofp'inversion': solve numerically for the argument at which the CCDF is equal top
Not all
methodoptions are available for all distributions. If the selectedmethodis not available, aNotImplementedErrorwill be raised.
Returns
out: arrayThe inverse CCDF evaluated at the provided argument.
Notes
Suppose a probability distribution has support . The inverse CCDF returns its minimum value of at and its maximum value of at . Because the CCDF has range , the inverse CCDF is only defined on the domain ; for and , iccdf returns nan.
Examples
Instantiate a distribution with the desired parameters:import numpy as np from scipy import stats X = stats.Uniform(a=-0.5, b=0.5)✓
X.iccdf(0.25)
✗np.allclose(X.iccdf(0.25), X.icdf(1-0.25))
✓X.iccdf([-0.1, 0, 1, 1.1])
✓See also
Aliases
-
scipy.stats._distribution_infrastructure._ProbabilityDistribution.iccdf