Uniform experiments as averages #
An experiment that starts by drawing a uniformly from a finite type and then runs f a outputs
b with probability the average over a of the probability that f a outputs b
(toReal_uniformOfFintype_bind_apply). In particular, a Boolean function g of a uniform sample
is true with probability the density of the set where g is true
(toReal_uniformOfFintype_map_apply_true). These translate experiments written with PMF.bind
into the vocabulary of Finset.expect (𝔼) and Finset.dens.
Main results #
Cslib.Probability.PMF.sum_le_affine: average pointwise affine bounds.Cslib.Probability.PMF.sum_map_mul,.sum_bind_mul: average deterministic and random scores.Cslib.Probability.PMF.tsum_map_mul,.tsum_bind_mul: the same laws for extended nonnegative scores over arbitrary types.Cslib.Probability.PMF.sq_tsum_le_tsum_sq: Jensen's inequalityE[g]² ≤ E[g²]for a[0, 1]-valued score.Cslib.Probability.PMF.toReal_uniformOfFintype_bind_apply: a uniform first stage averages the second stages.Cslib.Probability.PMF.toReal_uniformOfFintype_map_apply: output probabilities are densities.Cslib.Probability.PMF.toReal_uniformOfFintype_map_apply_true: the probability that a Boolean function of a uniform sample istrueis a density.
theorem Cslib.Probability.PMF.toReal_uniformOfFintype_map_apply {α : Type u_1} {β : Type u_2} [Fintype α] [Nonempty α] [DecidableEq β] (f : α → β) (b : β) :
The mass of an output of a uniform sample is the density of its fiber.
theorem Cslib.Probability.PMF.toReal_uniformOfFintype_map_apply_true {α : Type u_1} [Fintype α] [Nonempty α] (g : α → Bool) :
A Boolean function g of a uniform sample is true with probability the density of the set
where g is true.