Sample-based distribution testers #
A k-sample tester for a property P of distributions on a finite type α is a randomized
decision rule T : (Fin k → α) → PMF Bool applied to k independent samples of the unknown
distribution p (Cslib.Probability.PMF.iid p k). It must accept every p ∈ P with probability
at least 2 / 3 and accept with probability at most 1 / 3 every p at statistical distance at
least ε from all of P (IsTester) Canonne. Statistical distance is the total
variation distance dist of the metric space on PMF α scoped to Cslib.Probability.PMF. The
tester is a semantic Markov kernel: this file counts samples and does not bound running time.
Le Cam's two-point method in mixture form (one_third_le_dist_iid_bind) turns a tester into a
lower bound: the k-sample distribution of any p ∈ P is at statistical distance at least
1 / 3 from every mixture of k-sample distributions of distributions ε-far from P. Testers
transport along bijections of the domain (IsTester.map_equiv) and, more generally, along any
randomized map F of the samples that sends P into a property P' and far distributions to far
distributions (IsTester.bind_pi): a tester for P' run on the mapped samples tests P.
A k-sample closeness tester (IsClosenessTester) receives k independent samples of each of
two unknown distributions p and q (acceptProb₂). It must accept with probability at least
2 / 3 when p = q and with probability at most 1 / 3 when p and q are at statistical
distance at least ε Canonne. A two-sample rule run on both sample tuples passed
independently through a randomized map F accepts p, q with the probability that the rule
accepts p.bind F, q.bind F (acceptProb₂_bind_pi). With m + k samples of each distribution,
the acceptance probability averages, over the first m samples of each, the acceptance
probability of the rule on the other k (acceptProb₂_append).
Main definitions #
Cslib.DistributionTesting.acceptProb: the acceptance probability of a decision rule onkindependent samples.Cslib.DistributionTesting.IsTester: thek-sample tester property with proximityε.Cslib.DistributionTesting.acceptProb₂: the acceptance probability of a decision rule onkindependent samples of each of two distributions.Cslib.DistributionTesting.IsClosenessTester: thek-sample closeness tester property.
Main results #
Cslib.DistributionTesting.abs_acceptProb_sub_le: acceptance probabilities differ by at most the statistical distance of the sample distributions.Cslib.DistributionTesting.one_third_le_dist_iid_bind: Le Cam's method for testers.Cslib.DistributionTesting.IsTester.map_equiv,.comp_equiv_uniform: relabelling the domain.Cslib.DistributionTesting.acceptProb_bind_pi,IsTester.bind_pi: reductions along a randomized map of the samples.Cslib.DistributionTesting.acceptProb₂_pure,acceptProb₂_pure_eq_one_sub: deterministic two-sample rules.Cslib.DistributionTesting.acceptProb₂_bind_pi: two-sample reductions along a randomized map.Cslib.DistributionTesting.acceptProb₂_append: conditioning on the first samples of each distribution.
References #
Unfolding lemma for acceptProb.
T is a k-sample tester for the property P with proximity ε: it accepts every member of
P with probability at least 2 / 3, and accepts with probability at most 1 / 3 every
distribution at statistical distance at least ε from all of P.
Unfolding lemma for acceptProb₂.
T is a k-sample closeness tester with proximity ε: given k independent samples of each
of two unknown distributions, it accepts with probability at least 2 / 3 when they are equal and
with probability at most 1 / 3 when they are at statistical distance at least ε.
The two-sample acceptance probability as an expectation over both sample tuples.
Conditioning on the first samples. With m + k samples of each distribution, the
acceptance probability averages, over the first m samples x₁, y₁ of each, the acceptance
probability of the rule with x₁, y₁ fixed on the other k samples.
Le Cam's method for testers: if T is a k-sample tester for P, then the k-sample
distribution of any p ∈ P is at statistical distance at least 1 / 3 from every mixture of
k-sample distributions of distributions that are ε-far from P.
Relabelling the samples of a decision rule along a bijection.
Running a decision rule on samples passed independently through a randomized map F accepts
p with the probability that the rule accepts p.bind F.
Running a two-sample decision rule on both sample tuples passed independently through a
randomized map F accepts p, q with the probability that the rule accepts p.bind F, q.bind F.
Reduction along a randomized map. If F sends every member of P into P' and every
distribution ε-far from P to one ε'-far from P', then a k-sample tester for P' with
proximity ε', run on the samples passed independently through F, is a k-sample tester for P
with proximity ε.
A uniformity tester transports along any bijection of the domain.