A Fast, Closed-Form Bandwidth Selector for the Beta Kernel Density Estimator
Johan Hallberg Szabadváry
TL;DR
The paper tackles boundary bias in kernel density estimation for unit-interval data by advocating the Beta kernel as superior to Gaussian approaches. It introduces the Beta Reference Rule, a fast closed-form bandwidth selector derived from the AMISE of a Beta reference distribution, supplemented by a MoM-based parameter estimation and a principled fallback for U-/J-shaped densities, achieving $O(1)$ computation. Empirical results show the rule matches or surpasses slower LSCV-based methods in accuracy while delivering massive speedups, with real-world validation demonstrating reduced boundary artifacts. The authors also provide an open-source Python package (beta-kde) to facilitate immediate adoption and discuss directions for extending the framework to multivariate and other asymmetric kernels.
Abstract
The Beta kernel estimator offers a theoretically superior alternative to the Gaussian kernel for unit interval data, eliminating boundary bias without requiring reflection or transformation. However, its adoption remains limited by the lack of a reliable bandwidth selector; practitioners currently rely on iterative optimization methods that are computationally expensive and prone to instability. We derive the ``\rot,'' a fast, closed-form bandwidth selector based on the unweighted Asymptotic Mean Integrated Squared Error (AMISE) of a beta reference distribution. To address boundary integrability issues, we introduce a principled heuristic for U-shaped and J-shaped distributions. By employing a method-of-moments approximation, we reduce the bandwidth selection complexity from iterative optimization to $\mathcal{O}(1)$. Extensive Monte Carlo simulations demonstrate that our rule matches the accuracy of numerical optimization while delivering a speedup of over 35,000 times. Real-world validation on socioeconomic data shows that it avoids the ``vanishing boundary'' and ``shoulder'' artifacts common to Gaussian-based methods. We provide a comprehensive, open-source Python package to facilitate the immediate adoption of the Beta kernel as a drop-in replacement for standard density estimation tools.
