statsmodels.sandbox.distributions.extras.NormExpan_gen.interval¶
- NormExpan_gen.interval(confidence, *args, **kwds)¶
Confidence interval with equal areas around the median.
- Parameters:¶
- confidencearray_like
of
float
Probability that an rv will be drawn from the returned range. Each value should be in the range [0, 1].
- arg1, arg2, …array_like
The shape parameter(s) for the distribution (see docstring of the instance object for more information).
- locarray_like,
optional
location parameter, Default is 0.
- scalearray_like,
optional
scale parameter, Default is 1.
- confidencearray_like
- Returns:¶
Notes
This is implemented as
ppf([p_tail, 1-p_tail])
, whereppf
is the inverse cumulative distribution function andp_tail = (1-confidence)/2
. Suppose[c, d]
is the support of a discrete distribution; thenppf([0, 1]) == (c-1, d)
. Therefore, whenconfidence=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 top_tail
(usually strictly less).