27
1

Improving Pearson's chi-squared test: hypothesis testing of distributions -- optimally

Abstract

Pearson's chi-squared test, from 1900, is the standard statistical tool for "hypothesis testing on distributions": namely, given samples from an unknown distribution QQ that may or may not equal a hypothesis distribution PP, we want to return "yes" if P=QP=Q and "no" if PP is far from QQ. While the chi-squared test is easy to use, it has been known for a while that it is not "data efficient", it does not make the best use of its data. Precisely, for accuracy ϵ\epsilon and confidence δ\delta, and given nn samples from the unknown distribution QQ, a tester should return "yes" with probability >1δ>1-\delta when P=QP=Q, and "no" with probability >1δ>1-\delta when PQ>ϵ|P-Q|>\epsilon. The challenge is to find a tester with the \emph{best} tradeoff between ϵ\epsilon, δ\delta, and nn. We introduce a new tester, efficiently computable and easy to use, which we hope will replace the chi-squared tester in practical use. Our tester is found via a new non-convex optimization framework that essentially seeks to "find the tester whose Chernoff bounds on its performance are as good as possible". This tester is 1+o(1)1+o(1) optimal, in that the number of samples nn needed by the tester is within 1+o(1)1+o(1) factor of the samples needed by \emph{any} tester, even non-linear testers (for the setting: accuracy ϵ\epsilon, confidence δ\delta, and hypothesis PP). We complement this algorithmic framework with matching lower bounds saying, essentially, that "our tester is instance-optimal, even to 1+o(1)1+o(1) factors, to the degree that Chernoff bounds are tight". Our overall non-convex optimization framework extends well beyond the current problem and is of independent interest.

View on arXiv
Comments on this paper