Abstract
We study distribution-free goodness-of-fit tests with the proposed Binary Expansion Approximation of UniformiTY (BEAUTY) approach. This method generalizes Euler's formula and approximates the characteristic function of any copula through a linear combination of expectations of binary interactions from marginal binary expansions. This theory enables a unification of many important tests of independence via approximations from specific quadratic forms of symmetry statistics. To achieve robust power, we examine test statistics with data-adaptive weights, referred to as the Binary Expansion Adaptive Symmetry Test (BEAST). For any given alternative, we demonstrate that the Neyman-Pearson test can be approximated by an oracle weighted sum of symmetry statistics. The BEAST improves the empirical power of many existing tests against a wide spectrum of common alternatives and delivers a clear interpretation of dependency forms when significant.
Introduction
Testing whether two variables are independent is a cornerstone of statistical inference, yet it remains a challenging task. Traditional methods often suffer from "blind spots"—specific types of relationships they are unable to detect. For instance, Spearman’s $\rho$ is highly effective at identifying linear trends but fails to detect perfectly circular relationships. Conversely, while a $\chi^2$ test can capture complex patterns, it often lacks power in simple linear scenarios.
The fundamental difficulty lies in the fact that no single "fixed-weight" test can be uniformly consistent across all possible alternative distributions. Most existing tests utilize a deterministic weight matrix to prioritize specific types of dependencies. If the actual dependency in the data does not align with these weights, the test loses significant power. To address this, we introduce a framework that allows a test to "shape" itself to the data, providing robust power across a wide spectrum of linear and nonlinear relationships.
The BEAUTY Framework
Our approach is rooted in a novel discretization of continuous variables termed BEAUTY (Binary Expansion Approximation of UniformiTY). This theoretical framework uses binary expansions to approximate the characteristic functions of distributions through several key steps:
- Binary Expansion (The Bits): Any continuous random variable can be represented by its binary expansion—a sequence of bits. By analyzing these bits, we can examine interactions at varying levels of resolution.
- The BEAUTY Equation: We derive a "Binary Euler’s Equation," generalizing the classic $e^{ix} = \cos x + i \sin x$. For a binary variable $A \in \{-1, 1\}$, we show that $e^{iAx} = \cos x + iA \sin x$. This transformation turns complex exponentiation into a simple linear polynomial, bridging harmonic analysis and discrete bit-wise operations.
- Unification of Tests: We demonstrate that many classic independence tests, including Spearman’s $\rho$, the $\chi^2$ test, and Distance Correlation, are specific quadratic forms of these binary symmetry statistics. The primary distinction between these tests is simply the weight matrix they employ.
The BEAST Methodology
To overcome the limitations of fixed-weight tests, we propose the Binary Expansion Adaptive Symmetry Test (BEAST). Rather than relying on predetermined weights, BEAST utilizes data-adaptive weights to eliminate blind spots:
- Resampling (Subsampling): This is used to estimate the optimal weights for the specific dataset being analyzed.
- Regularization (Soft-thresholding): This process filters out noise and focuses on the most significant binary interactions, effectively exploiting the "sparsity" of the underlying dependency.
We also define an "Oracle" version of the test—a theoretical benchmark representing the maximum achievable power if the alternative distribution were known perfectly. We show that for any alternative, the most powerful test can be approximated by a weighted sum of symmetry statistics, providing a ceiling for the performance of feasible tests.
Experimental Evaluation
We evaluated BEAST using both synthetic simulations and real-world data:
Synthetic Simulations
We tested several challenging scenarios in $p=2$ and $p=3$ dimensions, including Bivariate Normal (linear), Parabolic, Circle, Checkerboard, Sine, and Double Helix patterns.
- Superior Power: In nonlinear scenarios like the "Circle" or "Sine" patterns, BEAST (and its Oracle counterpart) outperformed traditional tests like Distance Correlation and the $\chi^2$ test by substantial margins.
- Robustness: While Spearman’s $\rho$ remains the most effective for Bivariate Normal cases, BEAST remained highly competitive while offering far greater versatility across all other scenarios.
Hipparcos Star Catalog
To demonstrate interpretability, we applied BEAST to the Hipparcos Star Catalog, which contains the galactic coordinates and brightness (magnitude) of the 256 brightest stars. BEAST successfully identified a dependency between stellar brightness and galactic latitude. Crucially, the test pointed to the clustering of the brightest stars near the galactic plane (the Milky Way's disk), providing a scientifically meaningful explanation for the statistical significance.
Conclusion and Future Work
BEAST offers a powerful, interpretable, and distribution-free approach to independence testing. Unlike "black-box" methods, BEAST allows researchers to trace significant results back to specific bits, identifying exactly where and at what resolution a dependency exists.
Future research will focus on refining parameter tuning, specifically the choice of "depth" $D$ (the number of bits) and the threshold $\lambda$ for regularization. Additionally, we aim to close the computational gap between the practical BEAST and the theoretical Oracle power, and explore extending the binary expansion framework to other statistical challenges, such as two-sample tests and tests for Gaussianity.
Summary updated