Documentation

CslibFrontier.Probability.StatisticalDistance.ClosedForm

Closed forms for statistical distance #

Closed forms for cslib's statistical distance dist on finite PMFs. The distance from a point mass PMF.pure a is the mass the other distribution places off a (dist_pure_left). On Bool, the distance is the difference of the probabilities of true (dist_bool). Between uniform distributions on finite sets A and B with |A| ≤ |B|, it is the fraction of B outside A (dist_uniformOfFinset_of_card_le).

Main results #

theorem Cslib.Probability.PMF.dist_pure_left {α : Type u_1} [Fintype α] (a : α) (q : PMF α) :
dist (PMF.pure a) q = 1 - (q a).toReal

The statistical distance from a point mass is the mass the other distribution places elsewhere.

Statistical distance on Bool is the difference of the probabilities of true.

theorem Cslib.Probability.PMF.dist_uniformOfFinset_of_card_le {α : Type u_1} [Fintype α] [DecidableEq α] {A B : Finset α} (hA : A.Nonempty) (hB : B.Nonempty) (hAB : A.card ≤ B.card) :
dist (uniformOfFinset A hA) (uniformOfFinset B hB) = ↑(B \ A).card / ↑B.card

The statistical distance between uniform distributions on finite sets A and B with |A| ≤ |B| is the fraction of B outside A.

theorem Cslib.Probability.PMF.dist_uniformOfFinset_le {α : Type u_1} [Fintype α] [DecidableEq α] {A B : Finset α} (hA : A.Nonempty) (hB : B.Nonempty) {k m : ℕ} (hm : 0 < m) (hmA : m ≤ A.card) (hmB : m ≤ B.card) (hBA : (B \ A).card ≤ k) (hAB : (A \ B).card ≤ k) :
dist (uniformOfFinset A hA) (uniformOfFinset B hB) ≤ ↑k / ↑m

Uniform distributions on finite sets of size at least m > 0 that differ by at most k elements on each side are within statistical distance k / m.