arXiv Science⌕ Search

arXiv · 2611.29512

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 $O(kN)$ operations for $k$ values and $N$ quadrature nodes, and $N$ does not grow with the sample size, so an interval takes less than a millisecond for any $n$. Second, an experimental comparison with the published intervals: for $n \le 30$, 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 $10^{-12}$ of the range of the values. So the interval is exact, narrow and fast, and we recommend it.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Louis Abraham. 2026-11-22. Exact, narrow and fast: Use the Gaffke confidence interval for the mean of a discrete bounded variable. https://arxiv.science/abs/2611.29512

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

SULA: Robust Langevin Sampling via Drift-Diffusion Saturation

The unadjusted Langevin algorithm (ULA) and its stochastic-gradient variant, SGLD, are workhorses of modern Bayesian machine learning, but can be fragile when faced with a target distribution possessing a non-Lipschitz drift. In such settings, the conditional expected squared jump distance can grow rapidly, leading to numerical instability or the need for prohibitively small step-sizes. We propose the saturated unadjusted Langevin algorithm (SULA) that pairs a saturated gradient drift with a gradient-informed state-dependent diffusion, while preserving first-order consistency with the Langevin diffusion. The two coefficients are chosen so that the conditional expected squared jump distance is independent of the gradient. Under suitable conditions, we establish first-order weak convergence to the Langevin diffusion, geometric ergodicity of the discretized Markov chain for a fixed step-size, and an $O(h)$ bound on the invariant-measure bias for smooth test functions with polynomial growth. We also develop a stochastic-gradient variant, SG-SULA, using a gradient rescaling motivated by a Gaussian cumulative distribution function identity under Gaussian gradient noise. Numerical experiments demonstrate that SULA is less sensitive to the choice of step-size than existing Langevin discretizations on the targets considered, and that SG-SULA provides competitive predictive performance in Bayesian inference problems.

stat.CO↗

A generalized ensemble-marginalized Kalman filter for semilinear time-dependent PDEs with noisy boundary conditions

Uncertainty in boundary data is a major source of bias in PDE-constrained inverse problems, yet it is often neglected by treating measured boundary records as exact inputs. The ensemble-marginalized Kalman filter (EnMKF) removes this bias for linear parabolic problems with noisy boundaries by modeling boundary values as a linear Gaussian control, estimating them with a Kalman filter, and marginalizing their uncertainty from the prediction step. We extend this construction to semilinear time-dependent PDEs by exploiting time discretizations in which the boundary enters the discrete dynamics affinely, such as IMEX schemes that treat the linear part implicitly and the nonlinear reaction explicitly. For such discretizations the boundary uncertainty can still be marginalized one step at a time, yielding a deterministic covariance inflation term without any additional sampling. For second-order-in-time problems, the same per-step marginalization fails because the sensitivity of the discrete velocity to boundary errors scales like the inverse time step; we introduce an error-state EnMKF that propagates temporally correlated boundary-error realizations according to the innovations-form dynamics of the control Kalman filter. Parameter-dependent observation operators are treated by augmenting the ensemble with predicted observations and projecting the marginalization term into observation space. Numerical experiments on contaminant transport with nonlinear decay and on nonlinear cable vibration demonstrate reduced boundary-induced parameter bias, avoidance of ensemble collapse at small ensemble sizes, and improved state and flux estimates relative to standard ensemble Kalman filters.

stat.CO↗

Sub-Cauchy Sampling: Escaping the Dark Side of the Moon

We introduce a Markov chain Monte Carlo algorithm based on Sub-Cauchy Projection, a geometric transformation that generalizes stereographic projection by mapping Euclidean space into a spherical cap of a hyper-sphere, referred to as the complement of the dark side of the moon. We prove that our proposed method is uniformly ergodic for sub-Cauchy targets, namely targets whose tails are at most as heavy as a multidimensional Cauchy distribution, and show empirically its performance for challenging high-dimensional problems. The simplicity and broad applicability of our approach open new opportunities for Bayesian modeling and computation with heavy-tailed distributions in settings where most existing methods are unreliable.

stat.CO↗