A More Powerful Two-Sample Test in High Dimensions using Random Projection

Miles Lopes, Laurent Jacob, Martin J. WainwrightNeurIPS 2011

Introduction

In classical statistics, the Hotelling $T^2$ test is the gold standard for determining if two groups have significantly different mean vectors. However, this classical approach encounters a fatal flaw in high-dimensional settings: it requires inverting a sample covariance matrix. When the number of features ($p$) exceeds the sample size ($n$), this matrix becomes singular and non-invertible, causing the traditional test to fail.

To circumvent this, previous high-dimensional tests (such as those by Chen & Qin or Srivastava & Du) typically assume the covariance matrix is diagonal or ignore correlations between features to keep the math tractable. Unfortunately, this "diagonalization" discards valuable structural information. This paper introduces a novel two-sample test that remains computationally feasible in high dimensions while actively leveraging the underlying correlation structure of the data to increase statistical power.

The Projected Hotelling Procedure

The authors propose a deceptively simple "Projected Hotelling" procedure that combines random projection with the classical $T^2$ statistic.

The three-step Projected Hotelling procedure.

The method operates in two main steps:

  1. Random Projection: Map the $p$-dimensional data points into a lower $k$-dimensional space using a random matrix $P_k$ populated with independent and identically distributed (i.i.d.) Gaussian entries. The authors suggest setting $k \approx n/2$.
  2. Classical Test: Apply the standard Hotelling $T^2$ test to these newly projected $k$-dimensional samples.

Why does this work? In high dimensions, variance (noise) accumulates across all $p$ dimensions, obscuring any shift in the mean. Random projection reduces the dimensionality—effectively slashing the noise—while preserving the "signal" (the distance between the two means) with high probability. Because the new dimension $k$ is strictly less than $n$, the covariance matrix in the projected space is invertible, allowing the seamless use of the powerful classical $T^2$ statistic. Furthermore, because this method reduces the problem back to a classical setting, it can provide exact level-$\alpha$ critical values for Gaussian data, unlike many competing tests that only offer approximate p-values.

Experimental Setup and Key Insights

The paper evaluates the method using both synthetic and real-world datasets:

  • Synthetic Data: Multivariate normal distributions with varying covariance structures (diagonal vs. random) and different "spectral decay" rates (how quickly the eigenvalues of the covariance matrix drop off).
  • Gene Expression Data: 1,680 two-sample problems derived from three genomic studies (ovarian, myeloma, and colorectal cancers), comparing gene sets from the MSigDB database to identify differential expression.

A key theoretical insight from the paper is the advantage of a low "effective dimension." The test is most powerful when most of the variance is captured by a small number of principal components. In these scenarios, random projection effectively filters out the "junk" dimensions that do not contribute to the mean shift. Consequently, unlike competing tests that perform poorly when features are highly correlated, the Random Projection (RP) method actually gains power from correlation. The projection step exploits this concentrated variance to make the mean shift more apparent.

Key Results

The authors derive a closed-form expression for the test's asymptotic power as $(p, n) \to \infty$, proving that their test is asymptotically superior to the Chen-Qin (CQ) and Srivastava-Du (SD) tests under specific conditions related to the covariance spectrum.

Performance comparison including ROC curves for synthetic data and False Positive Rates for genomic data.

Empirical results strongly support the theory:

  • ROC Performance: In simulations with "fast spectral decay" (where a few features dominate the variance), the RP test significantly outperformed all competitors, including kernel-based methods like Maximum Mean Discrepancy (MMD).
  • Real-World Reliability: On the cancer gene expression dataset, the RP test proved to be more reliable. Competing tests (SD and CQ) committed too many Type I errors (false positives) at low p-value thresholds. In contrast, the RP test's false positive rate remained closely aligned with the nominal level $\alpha$.

Limitations and Future Work

While powerful, the proposed method has a few limitations:

  • Randomness: The test result inherently depends on the specific random matrix $P_k$ drawn. While theoretical guarantees suggest it works for "almost all" projections, a single "unlucky" draw could theoretically impact results, though the authors note this is rare in practice.
  • Gaussian Assumption: The theoretical power results are derived assuming multivariate normal distributions. While the test is likely robust, its performance on heavy-tailed or highly non-normal data in high dimensions remains an area for future exploration.
  • Choice of $k$: The authors suggest $k = n/2$ as a practical heuristic, but optimizing the projection dimension $k$ for specific dataset characteristics is an open problem for further refinement.

Summary updated

BibTeX
@inproceedings{lopes2011more,
  author = {Miles Lopes and Laurent Jacob and Martin J. Wainwright},
  title = {{A More Powerful Two-Sample Test in High Dimensions using Random Projection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2011},
}
Figure