Documentation

PFR.ForMathlib.Uniform

structure ProbabilityTheory.IsUniform {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] (H : Set S) (X : ΩS) (μ : MeasureTheory.Measure Ω := by volume_tac) :

The assertion that the law of X is the uniform probability measure on a finite set H. While in applications H will be non-empty finite set, X measurable, and and μ a probability measure, it could be technically convenient to have a definition that works even without these hypotheses. (For instance, isUniform would be well-defined, but false, for infinite H).

This should probably be refactored, requiring instead that μ.map X = uniformOn H.

Instances For
    theorem ProbabilityTheory.exists_isUniform {S : Type uS} [MeasurableSpace S] [MeasurableSingletonClass S] (H : Finset S) (h : H.Nonempty) :
    ∃ (Ω : Type uS) (x : MeasurableSpace Ω) (X : ΩS) (μ : MeasureTheory.Measure Ω), MeasureTheory.IsProbabilityMeasure μ Measurable X IsUniform (↑H) X μ (∀ (ω : Ω), X ω H) FiniteRange X

    Uniform distributions exist.

    theorem ProbabilityTheory.IsUniform.comp {Ω : Type uΩ} {S : Type uS} {T : Type uT} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [DecidableEq T] {H : Finset S} (h : IsUniform (↑H) X μ) {f : ST} (hf : Function.Injective f) :
    IsUniform (↑(Finset.image f H)) (f X) μ

    The image of a uniform random variable under an injective map is uniform on the image.

    Uniform distributions exist, version giving a measure space

    Uniform distributions exist, version with a Finite set rather than a Finset and giving a measure space

    theorem ProbabilityTheory.IsUniform.ae_mem {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} {H : Set S} (h : IsUniform H X μ) :
    ∀ᵐ (ω : Ω) μ, X ω H

    A uniform random variable on H almost surely takes values in H.

    theorem ProbabilityTheory.IsUniform.nonempty {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} {H : Finset S} (h : IsUniform (↑H) X μ) [ : NeZero μ] :

    Uniform random variables only exist for non-empty sets H.

    theorem ProbabilityTheory.IsUniform.measure_preimage_of_nmem {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} {H : Set S} (h : IsUniform H X μ) {s : S} (hs : sH) :
    μ (X ⁻¹' {s}) = 0

    A "unit test" for the definition of uniform distribution.

    theorem ProbabilityTheory.IsUniform.measureReal_preimage_of_nmem {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} {H : Set S} (h : IsUniform H X μ) {s : S} (hs : sH) :
    μ.real (X ⁻¹' {s}) = 0

    Another "unit test" for the definition of uniform distribution.

    theorem ProbabilityTheory.IsUniform.measure_preimage_of_mem {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] {H : Finset S} (h : IsUniform (↑H) X μ) (hX : Measurable X) {s : S} (hs : s H) :
    μ (X ⁻¹' {s}) = μ Set.univ / (Nat.card { x : S // x H })

    A "unit test" for the definition of uniform distribution.

    theorem ProbabilityTheory.IsUniform.measureReal_preimage_of_mem {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] {H : Finset S} [MeasureTheory.IsProbabilityMeasure μ] (h : IsUniform (↑H) X μ) (hX : Measurable X) {s : S} (hs : s H) :
    μ.real (X ⁻¹' {s}) = 1 / (Nat.card { x : S // x H })

    A "unit test" for the definition of uniform distribution.

    theorem ProbabilityTheory.IsUniform.measureReal_preimage_of_mem' {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] {H : Finset S} [MeasureTheory.IsProbabilityMeasure μ] (h : IsUniform (↑H) X μ) (hX : Measurable X) {s : S} (hs : s H) :
    (MeasureTheory.Measure.map X μ).real {s} = 1 / (Nat.card { x : S // x H })
    theorem ProbabilityTheory.IsUniform.measure_preimage {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] {H : Finset S} (h : IsUniform (↑H) X μ) (hX : Measurable X) (H' : Set S) :
    μ (X ⁻¹' H') = μ Set.univ * (Nat.card ↑(H' H)) / (Nat.card { x : S // x H })

    P(UHH)=|HH||H|

    theorem ProbabilityTheory.IsUniform.measureReal_preimage {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] {H : Finset S} (h : IsUniform (↑H) X μ) (hX : Measurable X) (H' : Set S) :
    μ.real (X ⁻¹' H') = μ.real Set.univ * (Nat.card ↑(H' H)) / (Nat.card { x : S // x H })

    P(UHH)=|HH||H|

    theorem ProbabilityTheory.IsUniform.nonempty_preimage_of_mem {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] [NeZero μ] {H : Finset S} (h : IsUniform (↑H) X μ) (hX : Measurable X) {s : S} (hs : s H) :
    theorem ProbabilityTheory.IsUniform.full_measure {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} {H : Set S} [MeasurableSpace S] [DiscreteMeasurableSpace S] (h : IsUniform H X μ) (hX : Measurable X) :
    theorem ProbabilityTheory.IsUniform.of_identDistrib {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} {H : Set S} [MeasurableSpace S] [DiscreteMeasurableSpace S] {Ω' : Type u_1} [MeasurableSpace Ω'] (h : IsUniform H X μ) {X' : Ω'S} {μ' : MeasureTheory.Measure Ω'} (h' : IdentDistrib X X' μ μ') (hH : MeasurableSet H) :
    IsUniform H X' μ'

    A copy of a uniform random variable is also uniform.

    theorem ProbabilityTheory.IsUniform.measure_preimage_ne_zero {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] {H : Finset S} [NeZero μ] (h : IsUniform (↑H) X μ) (hX : Measurable X) {H' : Set S} (h' : (H' H).Nonempty) :
    μ (X ⁻¹' H') 0

    P(UHH)0 if H intersects H and the measure is non-zero.

    theorem ProbabilityTheory.IsUniform.restrict {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {X : ΩS} {μ : MeasureTheory.Measure Ω} [MeasurableSpace S] [DiscreteMeasurableSpace S] {H : Set S} (h : IsUniform H X μ) (hX : Measurable X) (H' : Set S) :
    IsUniform (H' H) X μ[|X ⁻¹' H']

    If X is uniform w.r.t. μ on H, then X is uniform w.r.t. μ conditioned by H on HH.

    theorem ProbabilityTheory.IdentDistrib.of_isUniform {Ω : Type uΩ} {S : Type uS} [ : MeasurableSpace Ω] {μ : MeasureTheory.Measure Ω} {H : Set S} [MeasurableSpace S] [DiscreteMeasurableSpace S] {Ω' : Type u_1} [MeasurableSpace Ω'] {μ' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.IsProbabilityMeasure μ'] [Finite H] [Countable S] {X : ΩS} {X' : Ω'S} (hX : Measurable X) (hX' : Measurable X') (hX_unif : IsUniform H X μ) (hX'_unif : IsUniform H X' μ') :
    IdentDistrib X X' μ μ'

    A random variable is uniform iff its distribution is.