Documentation

CslibFrontier.Probability.Product.ConditionalExpectation

Method of conditional expectations on finite product spaces #

For an independent product distribution PMF.pi p on ∀ i : ι, α i, fixing the coordinates in fixed : Finset ι to the values of x and drawing the remaining coordinates independently from p gives the product law fixedPi p fixed x. When x is supported on fixed, this coincides with conditioning PMF.pi p on the cylinder event {y | ∀ i ∈ fixed, y i = x i} (filter_pi_cylinder).

The conditional expectation condExpect p f fixed x of f : (∀ i, α i) → ℝ satisfies:

Consequently, every free coordinate admits a supported value not increasing condExpect (exists_condExpect_insert_le) and a supported value not decreasing it (exists_le_condExpect_insert).

Main definitions #

Main results #

References #

noncomputable def Cslib.Probability.PMF.fixedPi {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (fixed : Finset ι) (x : (i : ι) → α i) :
PMF ((i : ι) → α i)

Product distribution where coordinates in fixed are pinned to x and coordinates outside fixed are drawn independently from p.

noncomputable def Cslib.Probability.PMF.condExpect {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) (fixed : Finset ι) (x : (i : ι) → α i) :

Conditional expectation of f under PMF.pi p given that coordinates in fixed take the values x i.

@[simp]
theorem Cslib.Probability.PMF.fixedPi_empty {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (x : (i : ι) → α i) :
fixedPi p ∅ x = pi p
@[simp]
theorem Cslib.Probability.PMF.condExpect_empty {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) (x : (i : ι) → α i) :
condExpect p f ∅ x = ∑ y : (i : ι) → α i, ((pi p) y).toReal * f y
@[simp]
theorem Cslib.Probability.PMF.fixedPi_univ {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (x : (i : ι) → α i) :
@[simp]
theorem Cslib.Probability.PMF.condExpect_univ {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) (x : (i : ι) → α i) :
theorem Cslib.Probability.PMF.fixedPi_congr {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (fixed : Finset ι) {x x' : (i : ι) → α i} (hx : ∀ i ∈ fixed, x i = x' i) :
fixedPi p fixed x = fixedPi p fixed x'
theorem Cslib.Probability.PMF.condExpect_congr {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) (fixed : Finset ι) {x x' : (i : ι) → α i} (hx : ∀ i ∈ fixed, x i = x' i) :
condExpect p f fixed x = condExpect p f fixed x'
theorem Cslib.Probability.PMF.filter_pi_cylinder {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (fixed : Finset ι) (x : (i : ι) → α i) (hx : ∀ i ∈ fixed, x i ∈ (p i).support) (hsupp : ∃ y ∈ {y : (i : ι) → α i | ∀ i ∈ fixed, y i = x i}, y ∈ (pi p).support) :
(pi p).filter {y : (i : ι) → α i | ∀ i ∈ fixed, y i = x i} hsupp = fixedPi p fixed x

When x has positive probability on every coordinate in fixed, conditioning pi p on the cylinder {y | ∀ i ∈ fixed, y i = x i} yields fixedPi p fixed x.

theorem Cslib.Probability.PMF.sum_mul_condExpect_insert {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) {fixed : Finset ι} {i : ι} (hi : i ∉ fixed) (x : (i : ι) → α i) :
∑ a : α i, ((p i) a).toReal * condExpect p f (insert i fixed) (Function.update x i a) = condExpect p f fixed x

Coordinate averaging (tower law): for any free coordinate i ∉ fixed, the p i-weighted average of condExpect p f (insert i fixed) (Function.update x i a) equals condExpect p f fixed x.

theorem Cslib.Probability.PMF.exists_condExpect_insert_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) {fixed : Finset ι} {i : ι} (hi : i ∉ fixed) (x : (i : ι) → α i) :
∃ a ∈ (p i).support, condExpect p f (insert i fixed) (Function.update x i a) ≤ condExpect p f fixed x

Method of conditional expectations (minimization step): for any free coordinate i ∉ fixed, some supported value a ∈ (p i).support satisfies condExpect p f (insert i fixed) (Function.update x i a) ≤ condExpect p f fixed x.

theorem Cslib.Probability.PMF.exists_le_condExpect_insert {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : ι → Type u_2} [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) {fixed : Finset ι} {i : ι} (hi : i ∉ fixed) (x : (i : ι) → α i) :
∃ a ∈ (p i).support, condExpect p f fixed x ≤ condExpect p f (insert i fixed) (Function.update x i a)

Method of conditional expectations (maximization step): for any free coordinate i ∉ fixed, some supported value a ∈ (p i).support satisfies condExpect p f fixed x ≤ condExpect p f (insert i fixed) (Function.update x i a).

theorem Cslib.Probability.PMF.condExpect_uniform_bool_add {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → ℝ) {fixed : Finset ι} {i : ι} (hi : i ∉ fixed) (x : ι → Bool) :
condExpect (fun (x : ι) => uniformOfFintype Bool) f (insert i fixed) (Function.update x i true) + condExpect (fun (x : ι) => uniformOfFintype Bool) f (insert i fixed) (Function.update x i false) = 2 * condExpect (fun (x : ι) => uniformOfFintype Bool) f fixed x

On the uniform Boolean cube ι → Bool, fixing a free coordinate i ∉ fixed to true and false splits condExpect into two halves summing to 2 * condExpect.