Hellinger distance and the Bhattacharyya coefficient #
The Bhattacharyya coefficient BC(p, q) = ∑' a, √((p a).toReal * (q a).toReal), squared Hellinger
distance h²(p, q) = 1 - BC(p, q) = (∑' a, (√(p a).toReal - √(q a).toReal)²) / 2, and Hellinger
distance h(p, q) = √(h²(p, q)) on discrete distributions (PMF α).
No competing MetricSpace (PMF α) instance is registered because Cslib.Probability.PMF already
uses that typeclass slot for half-L¹ statistical distance (dist); instead, symmetry,
definiteness, and hellingerDist_triangle are exposed directly.
Main definitions #
Cslib.Probability.PMF.bhattacharyya: the Bhattacharyya coefficient∑' a, √((p a).toReal * (q a).toReal).Cslib.Probability.PMF.hellingerSq: the squared Hellinger distance1 - bhattacharyya p q.Cslib.Probability.PMF.hellingerDist: the Hellinger distance√(hellingerSq p q) ∈ [0, 1].
Main results #
Cslib.Probability.PMF.bhattacharyya_nonneg,bhattacharyya_le_one,bhattacharyya_eq_one_iff,bhattacharyya_eq_zero_iff: elementary bounds and equality/disjointness characterizations.Cslib.Probability.PMF.hellingerDist_triangle: the triangle inequality forhellingerDist.Cslib.Probability.PMF.hellingerSq_le_dist,dist_le_sqrt_two_mul_hellingerDist,dist_le_hellingerDist_mul_sqrt_two_sub_hellingerSq: comparison with total variation distance (dist, half-L¹, and MathlibtvDistcorollaries).Cslib.Probability.PMF.bhattacharyya_pi,bhattacharyya_iid,hellingerSq_pi_le_sum,hellingerSq_iid_le: product andiidtensorization.Cslib.Probability.PMF.hellingerDist_bind_le,hellingerDist_map_le,hellingerSq_bind_le_sum: data processing and joint convexity.Cslib.Probability.PMF.dist_iid_le_sqrt_two_mul_nat_mul_hellingerDist:dist (iid p n) (iid q n) ≤ √(2 * n) * hellingerDist p q.
References #
- Alexandre B. Tsybakov, Introduction to Nonparametric Estimation, Springer,
2009, Section 2.4 (note Tsybakov scales squared Hellinger by
2, whereas we normalizeh(p, q) ∈ [0, 1]). - Clément L. Canonne, Topics and Techniques in Distribution Testing, Foundations
and Trends in Communications and Information Theory, 2022; locators checked against the
author-hosted draft (March 10, 2024): Appendix B (Definition B.1,
(B.3),(B.6), Lemma B.1) and Section 3.1 ((3.3)).
The Bhattacharyya coefficient ∑' a, √((p a).toReal * (q a).toReal) between two discrete
distributions. It lies in [0, 1], equals 1 iff p = q, and equals 0 iff the supports are
disjoint.
The squared Hellinger distance 1 - bhattacharyya p q between two discrete distributions.
The Hellinger distance √(1 - bhattacharyya p q) between two discrete distributions.
The Hellinger distance satisfies the triangle inequality on finite types.
Lower bound on half-L¹ statistical distance: h²(p, q) ≤ dist p q.
Le Cam's sharp upper bound relating statistical distance and Hellinger distance:
dist p q ^ 2 ≤ hellingerSq p q * (2 - hellingerSq p q).
Le Cam's sharp upper bound: dist p q ≤ h(p, q) * √(2 - h²(p, q)).
Upper bound on half-L¹ statistical distance: dist p q ≤ √2 * hellingerDist p q.
Lower bound on Mathlib's full-L¹ total variation distance: 2 * h²(p, q) ≤ tvDist p q.
Upper bound on Mathlib's full-L¹ total variation distance:
tvDist p q ≤ 2 * √2 * hellingerDist p q.
Tensorization of the Bhattacharyya coefficient for n i.i.d. draws:
BC(iid p n, iid q n) = BC(p, q) ^ n.
Exact formula for the squared Hellinger distance between n-fold i.i.d. distributions.
Subadditivity of squared Hellinger distance for n-fold i.i.d. distributions.
Subadditivity of Hellinger distance for n-fold i.i.d. distributions:
h(iid p n, iid q n) ≤ √n * h(p, q).
Product-distribution TV bound via squared Hellinger distance:
dist (pi p) (pi q) ≤ √(2 * ∑ i, h²(p i, q i)).
Acceptance bound for n i.i.d. samples:
dist (iid p n) (iid q n) ≤ √(2 * n) * hellingerDist p q.
Square roots of outcome weights, with each coordinate weighted by the square root of its sampling probability.
Mixing nonnegative weights contracts the squared difference of their square roots. This is the single-outcome form of joint convexity used when only acceptance is scored.
Data processing inequality for the Bhattacharyya coefficient: applying a shared Markov kernel
kernel never decreases bhattacharyya.
Injective relabeling preserves the Bhattacharyya coefficient.
Injective relabeling preserves squared Hellinger distance.
Injective relabeling preserves Hellinger distance.