Documentation

Dynamics.Independent

Independent coordinates: conditioning, factorization, moments #

Tools for Distribution.independent p, the law of a random point x : ι → α whose coordinates x i ~ p i are independent (the basic factorization independent_expect_prod and the marginal independent_expect_eval are in Dynamics.Distribution).

The uniform analogues for avg over dependent products ∀ i, β i (avg_pi_prod, avg_pi_eval, avg_pi_split) are in Dynamics.Uniform.

Conditioning on one coordinate #

theorem Dynamics.Distribution.independent_weight_update {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) (x : ι → α) (i : ι) (a : α) :
(independent p).weight x * (p i).weight a = (p i).weight (x i) * (independent p).weight (Function.update x i a)

Moving the weight of one coordinate: w(x) p_i(a) = p_i(x i) w(x[i ↦ a]).

theorem Dynamics.Distribution.independent_expect_update {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) (i : ι) (F : (ι → α) → ℝ) :
(independent p).expect F = (independent p).expect fun (x : ι → α) => (p i).expect fun (a : α) => F (Function.update x i a)

Resampling one coordinate: replacing the coordinate i of an independent point by an independent copy does not change the law.

theorem Dynamics.Distribution.independent_expect_eq_sum_update {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) (i : ι) (F : (ι → α) → ℝ) :
(independent p).expect F = ∑ b : α, (p i).weight b * (independent p).expect fun (x : ι → α) => F (Function.update x i b)

Conditioning on one coordinate: the expectation is the average, over the value b of coordinate i, of the expectation with that coordinate set to b.

theorem Dynamics.Distribution.independent_expect_fin_succ {α : Type u_2} [Fintype α] {m : ℕ} (q : Distribution α) (f : (Fin (m + 1) → α) → ℝ) :
(independent fun (x : Fin (m + 1)) => q).expect f = ∑ b : α, q.weight b * (independent fun (x : Fin m) => q).expect fun (r : Fin m → α) => f (Fin.cons b r)

Conditioning on the first coordinate: an i.i.d. product over Fin (m + 1) is the average, over the first coordinate b, of the product over Fin m with b prepended.

theorem Dynamics.Distribution.independent_prob_fin_succ {α : Type u_2} [Fintype α] {m : ℕ} (q : Distribution α) (s : (Fin (m + 1) → α) → Prop) :
(independent fun (x : Fin (m + 1)) => q).prob s = ∑ b : α, q.weight b * (independent fun (x : Fin m) => q).prob fun (r : Fin m → α) => s (Fin.cons b r)

Probabilities under an i.i.d. product over Fin (m + 1), conditioned on the first coordinate.

Factorization #

theorem Dynamics.Distribution.independent_expect_mul_of_update {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) (i : ι) (g : α → ℝ) (G : (ι → α) → ℝ) (hG : ∀ (x : ι → α) (a : α), G (Function.update x i a) = G x) :
((independent p).expect fun (x : ι → α) => g (x i) * G x) = (p i).expect g * (independent p).expect G

Independence of one coordinate: if G does not depend on the coordinate i, then 𝔼[g(x i) G(x)] = 𝔼[g] 𝔼[G].

theorem Dynamics.Distribution.independent_expect_pair {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) {i j : ι} (hij : i ≠ j) (f : α → α → ℝ) :
((independent p).expect fun (x : ι → α) => f (x i) (x j)) = (p i).expect fun (a : α) => (p j).expect fun (b : α) => f a b

Two distinct coordinates of an independent product are independent.

Moments of sums of centred coordinates #

theorem Dynamics.Distribution.independent_expect_mul_centred {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) {i j : ι} (hij : i ≠ j) (g : α → ℝ) (hg : (p i).expect g = 0) (G : α → ℝ) :
((independent p).expect fun (x : ι → α) => g (x i) * G (x j)) = 0

Two distinct coordinates are independent; for centred functions the mixed moment vanishes.

theorem Dynamics.Distribution.independent_expect_sum_sq {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) (W : ι → α → ℝ) (hW : ∀ (i : ι), (p i).expect (W i) = 0) :
((independent p).expect fun (x : ι → α) => (∑ i : ι, W i (x i)) ^ 2) = ∑ i : ι, (p i).expect fun (a : α) => W i a ^ 2

Second moment of a sum of independent centred coordinates.

theorem Dynamics.Distribution.independent_expect_mul_three {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) (W : ι → α → ℝ) (hW : ∀ (i : ι), (p i).expect (W i) = 0) (i j k : ι) :
((independent p).expect fun (x : ι → α) => W i (x i) * W j (x j) * W k (x k)) = if j = i ∧ k = i then (p i).expect fun (a : α) => W i a ^ 3 else 0

The mixed third moments of independent centred coordinates vanish unless the three indices agree.

theorem Dynamics.Distribution.independent_expect_sum_cube {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (p : ι → Distribution α) (W : ι → α → ℝ) (hW : ∀ (i : ι), (p i).expect (W i) = 0) :
((independent p).expect fun (x : ι → α) => (∑ i : ι, W i (x i)) ^ 3) = ∑ i : ι, (p i).expect fun (a : α) => W i a ^ 3

Third moment of a sum of independent centred coordinates.

Coordinatewise combination of independent families #

theorem Dynamics.Distribution.expect_expect_coord {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] {β : Type u_3} {γ : Type u_4} [Fintype β] [Fintype γ] (P : ι → Distribution α) (Q : ι → Distribution β) (R : ι → Distribution γ) (φ : ι → α → β → γ) [DecidableEq γ] (hR : ∀ (i : ι) (c : γ), (R i).weight c = ∑ a : α, ∑ b : β, if φ i a b = c then (P i).weight a * (Q i).weight b else 0) (H : (ι → γ) → ℝ) :
((independent P).expect fun (x : ι → α) => (independent Q).expect fun (y : ι → β) => H fun (i : ι) => φ i (x i) (y i)) = (independent R).expect H

Coordinatewise combination: if x ~ independent P and y ~ independent Q are independent, and R i is the law of φ i a b for a ~ P i, b ~ Q i, then fun i => φ i (x i) (y i) has law independent R.

theorem Dynamics.Distribution.expect_mul_of_dep {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (P : ι → Distribution α) (S : Finset ι) {F G : (ι → α) → ℝ} (hF : ∀ (ω ω' : ι → α), (∀ i ∈ S, ω i = ω' i) → F ω = F ω') (hG : ∀ (ω ω' : ι → α), (∀ i ∉ S, ω i = ω' i) → G ω = G ω') :
((independent P).expect fun (ω : ι → α) => F ω * G ω) = (independent P).expect F * (independent P).expect G

Independence of disjoint sets of coordinates: under an independent product, a function of the coordinates in S and a function of the coordinates outside S are uncorrelated.