Bernoulli distribution: bind, variance, posterior, stochastic order #
Binding a kernel through Ber(x, y, p) is the p-mixture of its two values, as is a lower
integral against it, and the variance of a real observable under Ber(x, y, p) is
p * (1 - p) * (f x - f y) ^ 2. Conditioning on an observation that both points emit with
positive likelihood, the posterior mass of a point is strictly increasing in its Bernoulli prior.
Main results #
ProbabilityTheory.bernoulliMeasure_bind:Ber(x, y, p).bind f = p • f x + (1 - p) • f y.ProbabilityTheory.lintegral_bernoulliMeasure:∫⁻ z, f z ∂Ber(x, y, p) = p * f x + (1 - p) * f y.ProbabilityTheory.variance_bernoulliMeasure:Var[f; Ber(x, y, p)] = p * (1 - p) * (f x - f y) ^ 2.ProbabilityTheory.strictMono_posterior_bernoulliMeasure:StrictMono fun p : I ↦ ((κ†Ber(x, y, p)) u).real {x}.ProbabilityTheory.bernoulliMeasure_stochasticLE:Ber(x, y, p) ≤ₛₜ Ber(x, y, q)fory ≤ xandp ≤ q, through a monotone coupling.
[UPSTREAM] candidates for Mathlib.Probability.Distributions.Bernoulli and
Mathlib.Probability.Kernel.Posterior.
The law of a two-valued random variable is Bernoulli.
At an observation that both points emit with positive likelihood, the posterior mass of a point is strictly increasing in its Bernoulli prior: a state that is more likely a priori is more likely a posteriori.
Bernoulli measures on a pair y ≤ x are coupled monotonically in the weight of the upper
point: the coupling moves the extra mass q - p from y up to x.
The Bernoulli measure on a pair y ≤ x is stochastically increasing in the weight of x.