Documentation

CslibFrontier.Probability.EventCount

Expected counts of events indexed by a list #

If every event indexed by a list entry has measure at most B, their occurrence count has integral at most l.length * B. Repeated entries are counted with multiplicity, and the events need not be independent. The measure theorem also provides measurability of the count; it does not require the measure to be a probability measure or to have finite total mass.

The PMF corollary states the same bound as a weighted sum without a measurable-space hypothesis. It follows from the measure theorem by giving the sample space its discrete measurable structure and using PMF.lintegral_toMeasure.

Main results #

Extracted from the discrete and measure-valued locality-sensitive-hashing analyses in CslibFrontier.DataStructure.NearNeighbor.LSH and CslibFrontier.DataStructure.NearNeighbor.MeasureLSH.

theorem Cslib.Probability.measurable_and_lintegral_countP_le {X : Type u_1} {Ω : Type u_2} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (E : Ω → X → Prop) [(ω : Ω) → (x : X) → Decidable (E ω x)] (B : ENNReal) (l : List X) :
(∀ x ∈ l, MeasurableSet {ω : Ω | E ω x}) → (∀ x ∈ l, μ {ω : Ω | E ω x} ≤ B) → (Measurable fun (ω : Ω) => ↑(List.countP (fun (x : X) => decide (E ω x)) l)) ∧ ∫⁻ (ω : Ω), ↑(List.countP (fun (x : X) => decide (E ω x)) l) ∂μ ≤ ↑l.length * B

A list count of measurable events, each of measure at most B, is measurable and has Lebesgue integral at most l.length * B.

theorem Cslib.Probability.PMF.tsum_mul_countP_le {X : Type u_1} {Ω : Type u_2} (μ : PMF Ω) (E : Ω → X → Prop) [(ω : Ω) → (x : X) → Decidable (E ω x)] (B : ENNReal) (l : List X) (hE : ∀ x ∈ l, μ.toOuterMeasure {ω : Ω | E ω x} ≤ B) :
∑' (ω : Ω), μ ω * ↑(List.countP (fun (x : X) => decide (E ω x)) l) ≤ ↑l.length * B

A list count of events, each of probability at most B, has expectation at most l.length * B. Repeated entries are counted with multiplicity; no independence is required.