Conditioning discrete distributions on events #
PMF.filter p s h conditions p on an event s of positive probability. This file relates
conditioning to the other operations on discrete distributions.
- Conditioning on an event that contains the support changes nothing
(
filter_eq_self_of_support_subset). - The probability of
tunderpconditioned ons, times the probability ofs, is the probability ofs ∩ t(toOuterMeasure_filter_mul_eq_inter). Conditioning onsand then ontis conditioning ons ∩ t(filter_filter). - Conditioning commutes with relabeling when the event is a preimage (
filter_map). - In the law
μ.bind fun a => (K a).map (a, ·), which drawsafromμand thenbfromK a, conditioning on an event aboutaconditionsμand keeps the kernel (filter_bind_pair). - If
bis drawn independently ofa, a rectangles ×ˢ thas probabilityPr[s] Pr[t](toOuterMeasure_bind_pair_prod), and conditioning on it conditions each factor (filter_bind_pair_prod). In particular, the condition onadoes not affect the law ofb(map_snd_filter_bind_pair_prod).
Main results #
Cslib.Probability.PMF.filter_eq_self_of_support_subset: conditioning on an almost sure event.Cslib.Probability.PMF.toOuterMeasure_filter_mul_eq_inter,Cslib.Probability.PMF.filter_filter: conditioning on an intersection.Cslib.Probability.PMF.filter_map: conditioning on a preimage commutes with relabeling.Cslib.Probability.PMF.filter_bind_pair: conditioning the first stage of a two-stage law.Cslib.Probability.PMF.toOuterMeasure_bind_pair_prod,Cslib.Probability.PMF.filter_bind_pair_prod,Cslib.Probability.PMF.map_snd_filter_bind_pair_prod: rectangles under independent pairs.
theorem
Cslib.Probability.PMF.filter_bind_pair
{α : Type u_1}
{β : Type u_2}
(μ : PMF α)
(K : α → PMF β)
(s : Set α)
(h : ∃ z ∈ Prod.fst ⁻¹' s, z ∈ (μ.bind fun (a : α) => PMF.map (fun (x : β) => (a, x)) (K a)).support)
(hs : ∃ a ∈ s, a ∈ μ.support)
:
Drawing a from μ and then b from K a, and conditioning on an event about a, is
drawing a from μ conditioned on that event and then b from K a.
theorem
Cslib.Probability.PMF.toOuterMeasure_bind_pair_prod
{α : Type u_1}
{β : Type u_2}
(μ : PMF α)
(ν : PMF β)
(s : Set α)
(t : Set β)
:
(μ.bind fun (a : α) => PMF.map (fun (x : β) => (a, x)) ν).toOuterMeasure (s ×ˢ t) = μ.toOuterMeasure s * ν.toOuterMeasure t
Under independent draws, a rectangle has the product of the probabilities of its sides.
theorem
Cslib.Probability.PMF.filter_bind_pair_prod
{α : Type u_1}
{β : Type u_2}
(μ : PMF α)
(ν : PMF β)
(s : Set α)
(t : Set β)
(h : ∃ z ∈ s ×ˢ t, z ∈ (μ.bind fun (a : α) => PMF.map (fun (x : β) => (a, x)) ν).support)
(hs : ∃ a ∈ s, a ∈ μ.support)
(ht : ∃ b ∈ t, b ∈ ν.support)
:
Under independent draws, conditioning on a rectangle s ×ˢ t conditions the first draw on
s and the second on t, and keeps them independent.
theorem
Cslib.Probability.PMF.map_snd_filter_bind_pair_prod
{α : Type u_1}
{β : Type u_2}
(μ : PMF α)
(ν : PMF β)
(s : Set α)
(t : Set β)
(h : ∃ z ∈ s ×ˢ t, z ∈ (μ.bind fun (a : α) => PMF.map (fun (x : β) => (a, x)) ν).support)
(ht : ∃ b ∈ t, b ∈ ν.support)
:
Conditioning on an independent coordinate. Under independent draws, conditioning on
s ×ˢ t gives the second draw the law of ν conditioned on t: the condition s on the first
draw has no effect on it.