Probability mass functions #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file is about probability mass functions or discrete probability measures:
a function α → ℝ≥0∞ such that the values have (infinite) sum 1.
Construction of monadic pure and bind is found in probability_mass_function/monad.lean,
other constructions of pmfs are found in probability_mass_function/constructions.lean.
Given p : pmf α, pmf.to_outer_measure constructs an outer_measure on α,
by assigning each set the sum of the probabilities of each of its elements.
Under this outer measure, every set is Carathéodory-measurable,
so we can further extend this to a measure on α, see pmf.to_measure.
pmf.to_measure.is_probability_measure shows this associated measure is a probability measure.
Conversely, given a probability measure μ on a measurable space α with all singleton sets
measurable, μ.to_pmf constructs a pmf on α, setting the probability mass of a point x
to be the measure of the singleton set {x}.
Tags #
probability mass function, discrete probability measure
A probability mass function, or discrete probability measures is a function α → ℝ≥0∞ such
that the values have (infinite) sum 1.
Instances for pmf
Equations
- pmf.fun_like = {coe := λ (p : pmf α) (a : α), p.val a, coe_injective' := _}
The support of a pmf is the set where it is nonzero.
Equations
Construct an outer_measure from a pmf, by assigning measure to each set s : set α equal
to the sum of p x for for each x ∈ α
Equations
- p.to_outer_measure = measure_theory.outer_measure.sum (λ (x : α), ⇑p x • measure_theory.outer_measure.dirac x)
Slightly stronger than outer_measure.mono having an intersection with p.support
Since every set is Carathéodory-measurable under pmf.to_outer_measure,
we can further extend this outer_measure to a measure on α
Equations
Instances for pmf.to_measure
Given that α is a countable, measurable space with all singleton sets measurable,
we can convert any probability measure into a pmf, where the mass of a point
is the measure of the singleton set under the original measure.
The measure associated to a pmf by to_measure is a probability measure