Exact, narrow and fast: Use the Gaffke confidence interval for the mean of a discrete bounded variable
Abstract
Survey ratings, test scores and many other data take a few known values, and we often want a confidence interval for their mean. For small samples, or for means close to the smallest or largest value, the usual intervals cover the true mean much less often than they claim. The interval of Gaffke generalizes the Clopper-Pearson interval to any finite set of values, and a recent proof of Gaffke's conjecture shows that its coverage is at least the nominal level for every sample size and every distribution. Its endpoints, however, are quantiles of a weighted sum of Dirichlet variables, with no closed form. This note makes three contributions. First, a fast and accurate algorithm for the endpoints: a Fourier inversion integral on a line through the saddle point gives tail probabilities with a small relative error, a Gauss-Legendre rule on geometric panels converges at the same rate wherever the singularities are, and a Newton iteration needs 2.6 evaluations per endpoint on average. The cost is operations for values and quadrature nodes, and does not grow with the sample size, so an interval takes less than a millisecond for any . Second, an experimental comparison with the published intervals: for , the Gaffke interval is the shortest of the intervals that keep the level, 17 to 20% shorter than the betting interval of Waudby-Smith and Ramdas and 19 to 37% shorter than Anderson's, while the shorter intervals (Wald, Student, profile likelihood, Bayesian) cover the mean less than 50% of the time for some distributions. Third, tested Python and R packages and a web page, with endpoints accurate to of the range of the values. So the interval is exact, narrow and fast, and we recommend it.
Create a lesson
Related papers
orderStatMoments: Exact Means, Variances, and Covariances of Order Statistics in R
Shared title terminology · Zheyang Wu, Tiejun Tong
Fast likelihood evaluation for multivariate sensory discrimination models
Shared title terminology · Philip Greengard, Fangfang Hong, David H. Brainard et al.
Exact Online Q_n Estimation: Exploiting Sliding-Window Rank Invariance
Shared title terminology · Robin Nunkesser
WAIVES: Weak-form Asymptotically-unbiased Instrumental-Variable Estimation for SDEs
Shared title terminology · Hamza Ruzayqat, David M. Bortz, Vanja Dukić
Conditional Stochastic User Equilibrium as a Gibbs Distribution: Tractable Flow Laws and Exact Path-Free Sampling
Shared title terminology · Tianyue Qiao, Lijun Sun
AIDA: Analysis of Interval Data in R
Shared title terminology · Catarina P. Loureiro, M. Rosário Oliveira, Paula Brito