statsmodels.stats.rates.tolerance_int_poisson#

statsmodels.stats.rates.tolerance_int_poisson(count, exposure, prob=0.95, exposure_new=1.0, method=None, alpha=0.05, alternative='two-sided')[source]#

Tolerance interval for a poisson observation

Parameters:
countarray_like

Observed count, number of events.

exposurearray_like

Currently this is total exposure time of the count variable.

probfloat or array_like in (0, 1), optional

Probability of poisson interval, often called “content”. With known parameters, each tail would have at most probability 1 - prob / 2 in the two-sided interval.

exposure_newfloat, optional

Exposure of the new or predicted observation.

methodstr, optional

Method to used for confidence interval of the estimate of the poisson rate, used in confint_poisson. This is required, there is currently no default method.

alphafloat or array_like in (0, 1), optional

Significance level for the confidence interval of the estimate of the Poisson rate. Nominal coverage of the confidence interval is 1 - alpha.

alternative{“two-sided”, “larger”, “smaller”}, optional

The tolerance interval can be two-sided or one-sided. Alternative “larger” provides the upper bound of the confidence interval, larger counts are outside the interval.

Returns:
tuple (low, upp)

Limits of tolerance interval. The tolerance interval is a closed interval, that is both low and upp are in the interval.

Notes

Verified against R package tolerance poistol.int.

References

[1]

Hahn, Gerald J., and William Q. Meeker. 1991. Statistical Intervals: A Guide for Practitioners. 1st ed. Wiley Series in Probability and Statistics. Wiley. https://doi.org/10.1002/9780470316771.

[2]

Hahn, Gerald J., and Ramesh Chandra. 1981. “Tolerance Intervals for Poisson and Binomial Variables.” Journal of Quality Technology 13 (2): 100-110. https://doi.org/10.1080/00224065.1981.11980998.