Differentially Private Hypothesis Testing, Revisited

Yue Wang, Jaewoo Lee, Daniel Kifer

Abstract

In this paper, we consider methods for performing hypothesis tests on data protected by a statistical disclosure control technology known as differential privacy. Previous approaches to differentially private hypothesis testing either perturbed the test statistic with random noise having large variance (and resulted in a significant loss of power) or added smaller amounts of noise directly to the data but failed to adjust the test in response to the added noise (resulting in biased, unreliable $p$-values). In this paper, we develop a variety of practical hypothesis tests that address these problems. Using a different asymptotic regime that is more suited to hypothesis testing with privacy, we show a modified equivalence between chi-squared tests and likelihood ratio tests. We then develop differentially private likelihood ratio and chi-squared tests for a variety of applications on tabular data (i.e., independence, sample proportions, and goodness-of-fit tests). Experimental evaluations on small and large datasets using a wide variety of privacy settings demonstrate the practicality and reliability of our methods.

1. Introduction

Hypothesis testing is a fundamental tool in scientific research, used to determine if observed patterns in data are statistically significant. However, when dealing with sensitive individual data, researchers must often employ Differential Privacy (DP) to protect participant anonymity. DP works by adding calibrated random noise to the data. A critical challenge arises when standard statistical tests are applied to this noisy data: they often produce inaccurate $p$-values because they do not account for the additional variance introduced by the privacy mechanism. This paper introduces a suite of "privacy-aware" tests designed to maintain statistical validity under DP.

2. The Problem: Bias in Private Testing

Traditional hypothesis tests assume that any deviation from the null hypothesis is due to sampling error. When DP is applied via "input perturbation," noise is added directly to the raw counts of a dataset.

A standard 2x2 contingency table representing categorical data, such as gender vs. voting behavior.

As shown in Figure 2, a typical contingency table contains integer counts. Applying a DP mechanism like the Laplace mechanism transforms these into noisy, non-integer values, as illustrated in Figure 1.

A noisy contingency table where differential privacy noise (e.g., Laplace noise) has been added to the original counts.

If a researcher runs an "off-the-shelf" chi-squared test on the noisy data in Figure 1, the test will interpret the privacy noise as part of the sample's signal. This leads to biased $p$-values and a high rate of false positives (Type I errors), causing researchers to see patterns where none exist.

3. Methodology: A New Asymptotic Framework

The core innovation of this work is a new asymptotic regime. In classical statistics, as the sample size $n \to \infty$, the sampling error vanishes. However, in DP, if the privacy budget $\epsilon$ remains constant, the privacy noise does not disappear at the same rate. The authors propose a model where the ratio of privacy noise to the square root of the sample size remains constant ($std(noise)/\sqrt{n} = \kappa$).

Using this framework, the authors derived:

  • Modified Likelihood Ratio (LR) and Chi-Squared ($\chi^2$) Tests: These tests incorporate the known variance of the added Laplace noise into their null distributions.
  • Simulation-Based $p$-values: Since the resulting distributions are mathematically complex, the authors provide algorithms to sample the null distribution and compute accurate $p$-values via simulation.
  • Permutation Testbed: A tool for evaluating the performance of various statistics under DP, which revealed that non-traditional statistics like the "Diff" statistic (absolute difference between actual and expected counts) can be highly effective due to their constant sensitivity.

4. Experimental Results

The proposed methods were evaluated across several datasets, including the Czech Car Factory Workers study ($n=1,841$), the Rochdale Survey ($n=665$), and a massive 2014 NYC Taxi dataset ($n \approx 165$ million).

4.1 Reliability and Power

Q-Q plots, which compare calculated $p$-values against a theoretical uniform distribution, showed that the authors' methods align almost perfectly with the ideal diagonal. In contrast, previous methods exhibited significant "upward bends," indicating a high frequency of false discoveries. Furthermore, the private tests demonstrated high statistical power, successfully identifying signals even in small, noisy datasets.

4.2 Scalability to Big Data

On the NYC Taxi dataset, the authors demonstrated that their methods could produce reliable results even with extremely high privacy settings (e.g., $\epsilon = 0.0001$). This proves that the "privacy-aware" approach is robust even when the signal-to-noise ratio is very low, making it suitable for large-scale administrative data.

5. Conclusion

This research demonstrates that valid hypothesis testing is possible under differential privacy, provided the statistical tests are modified to account for the privacy mechanism. By moving away from "off-the-shelf" tests and adopting a privacy-aware asymptotic regime, researchers can protect individual privacy without sacrificing the integrity of their scientific conclusions. Future work remains in developing entirely new test statistics optimized specifically for the constraints of differential privacy.

Summary updated

BibTeX
@misc{wang2015differentially,
  author = {Yue Wang and Jaewoo Lee and Daniel Kifer},
  title = {{Differentially Private Hypothesis Testing, Revisited}},
  year = {2015},
  eprint = {1511.03376},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.03376},
}
Figure