MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch16.RowCovariance

theorem MindFormal.covariance_eq_sub_of_integrable {X : Type u_1} [MeasurableSpace X] (μ : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure μ] (f g : X → ℝ) (hf : MeasureTheory.Integrable f μ) (hg : MeasureTheory.Integrable g μ) (hfg : MeasureTheory.Integrable (fun (x : X) => f x * g x) μ) :
ProbabilityTheory.covariance f g μ = ∫ (x : X), f x * g x ∂μ - (∫ (x : X), f x ∂μ) * ∫ (x : X), g x ∂μ

Covariance expansion under exactly the first and product moments used by PM1.2. No square-integrability assumption is added.

theorem MindFormal.row_mean_covariance {X : Type u_1} {K : Type u_2} [MeasurableSpace X] [Fintype K] (μ : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure μ] (H w : K → X → ℝ) (d : X → ℝ) (hH : ∀ (k : K), MeasureTheory.Integrable (H k) μ) (hw : ∀ (k : K), MeasureTheory.Integrable (w k) μ) (hHw : ∀ (k : K), MeasureTheory.Integrable (fun (x : X) => H k x * w k x) μ) (balance : ∫ (x : X), d x ∂μ = ∑ k : K, ∫ (x : X), H k x * w k x ∂μ) :
∑ k : K, (∫ (x : X), H k x ∂μ) * ∫ (x : X), w k x ∂μ = ∫ (x : X), d x ∂μ - ∑ k : K, ProbabilityTheory.covariance (H k) (w k) μ

Componentwise mean/covariance form of a balanced full matrix row.