Uniform distributions and probability mass functions #
This file defines two related notions of uniform distributions, which will be unified in the future.
Uniform distributions #
Defines the uniform distribution for any set with finite measure.
Main definitions #
IsUniform X s ℙ μ
: A random variableX
has uniform distribution ons
underℙ
if the push-forward measure agrees with the rescaled restricted measureμ
.
Uniform probability mass functions #
This file defines a number of uniform PMF
distributions from various inputs,
uniformly drawing from the corresponding object.
Main definitions #
PMF.uniformOfFinset
gives each element in the set equal probability,
with 0
probability for elements not in the set.
PMF.uniformOfFintype
gives all elements equal probability,
equal to the inverse of the size of the Fintype
.
PMF.ofMultiset
draws randomly from the given Multiset
, treating duplicate values as distinct.
Each probability is given by the count of the element divided by the size of the Multiset
TODO #
A random variable X
has uniform distribution on s
if its push-forward measure is
(μ s)⁻¹ • μ.restrict s
.
Equations
Instances For
A real uniform random variable X
with support s
has expectation
(λ s)⁻¹ * ∫ x in s, x ∂λ
where λ
is the Lebesgue measure.
The density of the uniform measure on a set with respect to itself. This allows us to abstract away the choice of random variable and probability space.
Equations
Instances For
Check that indeed any uniform random variable has the uniformPDF.
Alternative way of writing the uniformPDF.
Alias of PMF.uniformOfFinset_apply_of_notMem
.
Alias of PMF.ofMultiset_apply_of_notMem
.