Universally consistent K-sample tests via dependence measures

Sambit Panda, Cencheng Shen, Ronan Perry, Jelle Zorn, Antoine Lutz, Carey E. Priebe, Joshua T Vogelstein

TL;DR

This paper introduces a novel transformation that converts the K-sample testing problem into an independence testing problem. This allows any universally consistent dependence measure, like distance correlation or the Hilbert-Schmidt independence criterion, to be used for K-sample testing, offering a more general and powerful approach than traditional methods.

What Problem Does This Paper Address?

The K-sample testing problem aims to determine if multiple groups of data points are drawn from the same underlying distribution. Traditional methods like ANOVA and MANOVA are limited as they primarily focus on differences in means and assume specific distributional forms (e.g., Gaussian). While nonparametric methods exist to test distributional differences, applying them to the K-sample case can be complex. This paper bridges the gap by showing how to leverage the power of universally consistent independence tests for the K-sample problem, making a wider range of sophisticated statistical tools applicable.

Methods

The core of this paper is a population transformation that converts K-sample testing into a two-variable independence test. Given K datasets $U_1, \dots, U_K$, they construct two new random variables:

  1. U: A mixture distribution formed by randomly selecting one of the $U_k$ datasets based on predefined probabilities $\pi_k$.
  2. V: A categorical variable indicating which of the K datasets the observation in U originated from (represented as a one-hot encoding).

The key theoretical result (Theorem 1) states that the K original distributions are identical if and only if U and V are independent. This transforms the K-sample problem into testing the independence of U and V.

For practical implementation, they propose a sample method:

  • Concatenate all data points into a single large dataset U.
  • Create a corresponding label matrix V using one-hot encoding based on the original group membership.
  • Apply any sample dependence measure $\tau(\cdot, \cdot)$ to the pair (U, V).
  • Use a permutation test to compute the p-value.

The paper also demonstrates theoretical equivalences:

  • Distance Covariance (Dcov) on (U, V) is equivalent to the Energy statistic for two-sample testing (Theorem 2).
  • Hilbert-Schmidt Independence Criterion (Hsic) on (U, V) is equivalent to Maximum Mean Discrepancy (MMD) for two-sample testing (Theorem 3).
  • Dcov on (U, V) is equivalent to the Disco statistic for K-sample testing when sample sizes are equal (Theorem 4).

Datasets

The paper does not introduce new datasets. Instead, it uses simulated data to evaluate the performance of its proposed methods. The simulations involve generating data from various univariate and multivariate distributions (Gaussian, polynomial, trigonometric, geometric, etc.) to test different scenarios like sample size differences, mean differences, and variance differences.

Key Insights and Ideas

  • Unifying Framework: The most significant insight is the demonstration that K-sample testing can be universally reduced to a two-variable independence test. This unification is powerful because it allows any existing universally consistent dependence measure to be directly applied to K-sample problems.
  • Leveraging Independence Measures: This framework unlocks the potential of advanced dependence measures (like Dcov, Hsic, Mgc) that are designed to detect complex, nonlinear relationships, which traditional ANOVA/MANOVA methods struggle with.
  • Theoretical Equivalence: The paper establishes concrete theoretical links between established two-sample and K-sample statistics (Energy, MMD, Disco) and their corresponding independence measures (Dcov, Hsic) under the proposed transformation. This provides a deeper understanding of these methods.
  • Universality: The approach guarantees universally consistent K-sample testing, meaning that as sample size increases, the power to detect any distributional difference (not just mean differences) approaches 1.

Key Results

The simulations demonstrate the effectiveness of the proposed approach:

  • Validity: In scenarios with no distributional differences (only sample size differences), all tested methods (ANOVA, Dcov, Hsic) maintained a type-1 error rate around 0.05.
  • Consistency: In scenarios with mean and variance differences, dependence measures (Dcov, Hsic) showed consistent power to detect these differences.
  • Superiority over ANOVA: For variance differences, Hsic outperformed ANOVA, highlighting the advantage of dependence measures in detecting non-mean-related distributional shifts. Dcov showed better performance for mean differences, while Hsic excelled at variance differences, suggesting that different dependence measures might be sensitive to different types of distributional changes.
  • Multivariate Simulations: Additional simulations with various multivariate distributions confirmed that dependence measures generally achieve higher testing power than traditional methods like Manova, especially when distributions differ in ways other than just the mean.

Limitations and Future Work

  • Computational Cost: While theoretically powerful, the permutation test used for p-value calculation can be computationally intensive, especially for large datasets or a high number of permutations. The paper mentions faster alternatives like chi-square tests could be explored.
  • Choice of Dependence Measure: The paper shows that different dependence measures have varying finite-sample powers and sensitivities to different types of distributional differences. While the framework is universal, selecting the "best" dependence measure for a specific problem might still require domain knowledge or empirical evaluation.
  • Future Work: The authors suggest exploring faster testing procedures and further investigating the finite-sample properties and optimal choices of dependence measures within this framework. The paper also implicitly points towards applying this framework to real-world problems where detecting complex distributional differences is crucial.

Summary updated

BibTeX
@inproceedings{panda2024universally,
  author = {Sambit Panda and Cencheng Shen and Ronan Perry and Jelle Zorn and Antoine Lutz and Carey E. Priebe and Joshua T Vogelstein},
  title = {{Universally consistent K-sample tests via dependence measures}},
  booktitle = {Statistics},
  year = {2024},
  doi = {10.1016/j.spl.2024.110278},
}
Figure