The Sample Complexity of Simple Binary Hypothesis Testing

Ankit Pensia, Varun S. Jog, Po-Ling Loh

Abstract

The sample complexity of simple binary hypothesis testing is the smallest number of i.i.d. samples required to distinguish between two distributions $p$ and $q$ in either: (i) the prior-free setting, with type-I error at most $\alpha$ and type-II error at most $\beta$; or (ii) the Bayesian setting, with Bayes error at most $\delta$ and prior distribution $(\alpha, 1-\alpha)$. This problem has only been studied when $\alpha = \beta$ (prior-free) or $\alpha = 1/2$ (Bayesian), and the sample complexity is known to be characterized by the Hellinger divergence between $p$ and $q$, up to multiplicative constants. In this paper, we derive a formula that characterizes the sample complexity (up to multiplicative constants that are independent of $p$, $q$, and all error parameters) for: (i) all $0 \le \alpha, \beta \le 1/8$ in the prior-free setting; and (ii) all $\delta \le \alpha/4$ in the Bayesian setting. In particular, the formula admits equivalent expressions in terms of certain divergences from the Jensen–Shannon and Hellinger families. The main technical result concerns an $f$-divergence inequality between members of the Jensen–Shannon and Hellinger families, which is proved by a combination of information-theoretic tools and case-by-case analyses. We explore applications of our results to robust and distributed (locally-private and communication-constrained) hypothesis testing.

Introduction

Hypothesis testing is a cornerstone of statistical inference. In its simplest form, an observer must decide which of two known distributions, $p$ or $q$, generated a set of i.i.d. observations. Historically, research has focused on two regimes: the single-sample regime ($n=1$) and the asymptotic regime ($n \to \infty$). While the asymptotic regime provides elegant results through the Neyman–Pearson lemma and KL-divergence, it often fails to provide practical guidance for finite-sample scenarios.

This paper addresses the "missing middle" by providing tight, non-asymptotic bounds on sample complexity—the exact number of observations $n$ required to achieve a specific level of accuracy. This lens is critical for modern learning theory and system design, where researchers need to know if a specific sample size is sufficient to maintain error rates below a desired threshold.

Methodology and Frameworks

The authors analyze sample complexity through two primary frameworks:

  1. The Prior-Free Formulation: This setting analyzes Type-I (false positive) and Type-II (false negative) errors separately. This is essential in high-stakes fields like medicine or security, where the cost of a false negative may far outweigh a false positive.
  2. The Bayesian Formulation: This treats errors as a weighted sum based on a "prior" belief about the likelihood of each distribution. This is useful when the relative frequency of the two hypotheses is known.

The core of the work involves deriving formulas that characterize sample complexity up to multiplicative constants. The authors move beyond the standard Hellinger divergence characterization (which was previously only known for symmetric error cases) to provide a more general result using divergences from the Jensen–Shannon and Hellinger families.

Key Results

The paper provides the first comprehensive set of tight results for the sample complexity of simple binary hypothesis testing across a broad range of error parameters:

  • Prior-Free Setting: Tight characterization for all $0 \le \alpha, \beta \le 1/8$.
  • Bayesian Setting: Tight characterization for all $\delta \le \alpha/4$.
  • Technical Innovation: The authors prove a new $f$-divergence inequality between the Jensen–Shannon and Hellinger families using information-theoretic tools and case-by-case analysis.
  • Operational Utility: The results are shown to be applicable to robust hypothesis testing (where distributions are perturbed) and distributed testing (under local privacy or communication constraints).

Discussion and Future Work

While this work provides a definitive look at simple hypothesis testing (where $p$ and $q$ are known), many real-world applications involve composite testing, where distributions belong to a broader family (e.g., any Gaussian distribution). Extending these tight sample complexity bounds to composite hypotheses remains a significant and natural next step for the field.

By filling the gap between single-sample and asymptotic results, this research provides a foundational tool for determining the fundamental limits of learning and inference with finite data.

Summary updated

BibTeX
@inproceedings{pensia2024sample,
  author = {Ankit Pensia and Varun S. Jog and Po-Ling Loh},
  title = {{The Sample Complexity of Simple Binary Hypothesis Testing}},
  booktitle = {Conference on Learning Theory},
  year = {2024},
  url = {https://openreview.net/forum?id=TtQ2IhYDVA},
}
Figure