bundles / scipy latest / scipy / stats / _distn_infrastructure / rv_generic / interval
function
scipy.stats._distn_infrastructure:rv_generic.interval
Signature
def interval ( self , confidence , * args , ** kwds ) Summary
Confidence interval with equal areas around the median.
Parameters
confidence: array_like of floatProbability that an rv will be drawn from the returned range. Each value should be in the range [0, 1].
arg1, arg2, ...: array_likeThe shape parameter(s) for the distribution (see docstring of the instance object for more information).
loc: array_like, optionallocation parameter, Default is 0.
scale: array_like, optionalscale parameter, Default is 1.
Returns
a, b: ndarray of floatend-points of range that contain
100 * alpha %of the rv's possible values.
Notes
This is implemented as ppf([p_tail, 1-p_tail]), where ppf is the inverse cumulative distribution function and p_tail = (1-confidence)/2. Suppose [c, d] is the support of a discrete distribution; then ppf([0, 1]) == (c-1, d). Therefore, when confidence=1 and the distribution is discrete, the left end of the interval will be beyond the support of the distribution. For discrete distributions, the interval will limit the probability in each tail to be less than or equal to p_tail (usually strictly less).
Aliases
-
scipy.stats._distn_infrastructure.rv_generic.interval