mqr.inference.proportion.
confint_1sample#
- mqr.inference.proportion.confint_1sample(count, nobs, conf=0.95, bounded='both', method='agresti-coull')#
Confidence interval for proportion count / nobs.
Following [1], use the ‘wilson-cc’ or ‘jeffreys’ method for small sample size, and use the ‘agresti-coull’ or ‘jeffreys’ for larger sample sizes. The authors recommend n = 40 as the boundary between small and large.
- Parameters:
- countint
Number of “true” observations.
- nobsint
Total observations.
- conffloat, optional
Confidence level that determines the width of the interval.
- bounded{‘both’, ‘below’, ‘above’}, optional
Which sides of the interval to close.
- method{‘agresti-coull’, ‘jeffreys’, ‘wilson’, ‘wilson-cc’}, optional
- ‘agresti-coull’Agresti-Coull interval, see [1].‘jeffreys’Jeffreys interval (a Bayesian method), see [1].‘wilson’Wilson method without continuity correction (method 3 in [2]).‘wilson-cc’Wilson method with continuity correction (method 4 in [2]).(other)Everything else is passed to
sm..proportion_confint
.
- Returns:
References