Robust Le Cam–Birgé and Scheffé pairwise tests #
This module constructs robust pairwise hypothesis tests between finite discrete distributions:
- Hellinger Le Cam–Birgé test (
leCamBirgeTest): compares the product of clipped midpoint likelihood-ratio square rootsbirgeWeight q₀ q₁ (x i) = √((q₀ + 2 q₁) / (2 q₀ + q₁))against threshold1. Unlike the bare likelihood ratioq₀^n ≤ q₁^n,birgeWeighttakes values in[1 / √2, √2]everywhere, making it robust under arbitrary Hellinger perturbations: under any unknown distributionpwith10 * h(p, q₀) ≤ h(q₀, q₁)(in particularh(p, q₀) ≤ rwhen10 * r ≤ h(q₀, q₁)), the probability of rejectingq₀is at mostReal.exp (-n * h²(q₀, q₁) / 25)(this1/3–2/3clippedbirgeWeightformulation and its explicit constants are proved in this library; see [LC73] and [Bir83] as background). - Total-variation Scheffé test (
scheffeTest): compares the empirical mass of the Scheffé setscheffeSet q₀ q₁ = {a | q₁(a) < q₀(a)}against the midpoint(q₀(A) + q₁(A)) / 2. Under any distributionpwithdist p q₀ + γ ≤ dist q₀ q₁ / 2(in particulardist p q₀ ≤ rand3 * r + 2 * γ ≤ dist p q₁), the error probability is at mostReal.exp (-2 * n * γ ^ 2)(this Hoeffding-based formulation and proof are this library's formulation; see [DL01] as background).
Main definitions #
Cslib.Probability.HypothesisSelection.birgeWeight,Cslib.Probability.HypothesisSelection.leCamBirgeTest: Birgé's bounded likelihood-ratio statistic and pairwise Hellinger test.Cslib.Probability.HypothesisSelection.scheffeSet,Cslib.Probability.HypothesisSelection.empiricalMass,Cslib.Probability.HypothesisSelection.scheffeTest: Scheffé witness set, empirical frequency, and pairwise TV test.
Main results #
Cslib.Probability.HypothesisSelection.sum_mul_birgeWeight_le_of_mul: Hellinger-ball drift bound∑ a, p(a) * birgeWeight q₀ q₁ a ≤ 1 - h²(q₀, q₁) / 25when10 * h(p, q₀) ≤ h(q₀, q₁).Cslib.Probability.HypothesisSelection.leCamBirgeTest_false_le,Cslib.Probability.HypothesisSelection.leCamBirgeTest_true_le: two-sided exponential error bounds forleCamBirgeTest.Cslib.Probability.HypothesisSelection.abs_empiricalMass_sub_ge_le: Hoeffding concentration forempiricalMass.Cslib.Probability.HypothesisSelection.scheffeTest_false_le,Cslib.Probability.HypothesisSelection.scheffeTest_true_le: one-sided exponential error bounds forscheffeTest.
References #
- L. Le Cam, Convergence of estimates under dimensionality restrictions, Ann. Statist. 1(1), 38–53, 1973 (bibliographic metadata only; article text not inspected).
- L. Birgé, Approximation dans les espaces métriques et théorie de l'estimation, Z. Wahrsch. Verw. Gebiete 65, 181–237, 1983 (bibliographic metadata only; article text not inspected).
- L. Devroye, G. Lugosi, Combinatorial Methods in Density Estimation (bibliographic metadata only; book text not inspected, no chapter/theorem numbers claimed).
Clipped midpoint likelihood-ratio square root used by Le Cam and Birgé's pairwise Hellinger
test: √((q₀(a) + 2 q₁(a)) / (2 q₀(a) + q₁(a))), defaulting to 1 when both distributions vanish
at a. It always lies in [1 / √2, √2].
Explicit formula for birgeWeight q₀ q₁ a in terms of q₀ a and q₁ a.
Positivity of birgeWeight q₀ q₁ a.
Upper bound birgeWeight q₀ q₁ a ≤ √2.
Swapping q₀ and q₁ inverts birgeWeight q₀ q₁ a.
Lower bound 1 / √2 ≤ birgeWeight q₀ q₁ a.
General Hellinger drift bound for birgeWeight under an arbitrary distribution p:
∑ a, p(a) * birgeWeight q₀ q₁ a ≤ 1 - h²(q₀, q₁) / 4 + 2 (√2 - 1) h²(p, q₀) + 2 h(p, q₀) h(q₀, q₁).
Robust Hellinger-ball drift bound: whenever 10 * hellingerDist p q₀ ≤ hellingerDist q₀ q₁,
∑ a, (p a).toReal * birgeWeight q₀ q₁ a ≤ 1 - hellingerSq q₀ q₁ / 25.
Markov bound for the product of Birgé weights over n i.i.d. draws from p.
Le Cam–Birgé pairwise Hellinger test: outputs true (favoring q₀) iff
∏ i, birgeWeight q₀ q₁ (x i) < 1, and false (favoring q₁) otherwise.
Type-I robustness of leCamBirgeTest: if p is close to q₀ relative to the separation
h(q₀, q₁) (10 * h(p, q₀) ≤ h(q₀, q₁)), then leCamBirgeTest q₀ q₁ rejects q₀ with
probability at most Real.exp (-n * h²(q₀, q₁) / 25).
Type-II robustness of leCamBirgeTest: if 10 * h(p, q₁) ≤ h(q₀, q₁), then
leCamBirgeTest q₀ q₁ accepts q₀ (= true) with probability at most
Real.exp (-n * h²(q₀, q₁) / 25).
Radius specialization of leCamBirgeTest_false_le: if h(p, q₀) ≤ r and
10 * r ≤ h(q₀, q₁), the rejection probability is at most Real.exp (-4 * n * r ^ 2).
Radius specialization of leCamBirgeTest_true_le: if h(p, q₁) ≤ r and
10 * r ≤ h(q₀, q₁), the false-acceptance probability is at most Real.exp (-4 * n * r ^ 2).
A distribution's Scheffé set against itself is empty.
Scheffé's identity: the probability gap on scheffeSet q₀ q₁ equals dist q₀ q₁.
Empirical mass assigned to A : Finset α by a sample tuple x : Fin n → α.
Lower-tail Hoeffding concentration for empiricalMass A x.
Upper-tail Hoeffding concentration for empiricalMass A x.
Two-sided Hoeffding concentration for empiricalMass A x:
P^{\otimes n}(γ ≤ |empiricalMass A x - p(A)|) ≤ 2 * Real.exp (-2 * n * γ ^ 2).
Pairwise Scheffé TV test between q₀ and q₁: outputs true (favoring q₀) iff the
empirical frequency of scheffeSet q₀ q₁ is at least (q₀(A) + q₁(A)) / 2.
Robust Type-I bound for scheffeTest: under any p with dist p q₀ + γ ≤ dist q₀ q₁ / 2,
the probability of outputting false is at most Real.exp (-2 * n * γ ^ 2).
Robust Type-II bound for scheffeTest: under any p with dist p q₁ + γ ≤ dist q₀ q₁ / 2,
the probability of outputting true is at most Real.exp (-2 * n * γ ^ 2).