Physlib

PhyslibAlpha.AlgebraicFramework.Algebra.Statistics

Statistics of a linear functional on a bilinear algebra

i. Overview

Second moments and covariance use only a bilinear multiplication and a linear functional. They do not intrinsically require an order, positivity, associativity, commutativity, or the Jordan identity. This file defines them at that level so ordered Jordan algebras and self-adjoint parts of star algebras can share one canonical construction.

For `omega : E ->_l[R] R`, the covariance is packaged as the bilinear form

`(a, b) |-> omega (a * b) - omega a * omega b`.

Commutativity of the product is used only to prove symmetry. A unit and the normalization `omega 1 = 1` are used only for centering identities. Positivity is deliberately left to the ordered specialization.

ii. Key definitions and results

  • `LinearMap.secondMomentForm`
  • `LinearMap.covarianceForm`
  • `LinearMap.variance`
  • `LinearMap.centered`
  • `LinearMap.apply_centered`
  • `LinearMap.apply_centered_mul_centered`

iii. Table of contents

  • A. Second moments and covariance
  • B. Centering a normalized functional

A. Second moments and covariance

B. Centering a normalized functional

10 declarations

definition

Second-moment bilinear form ω(ab)\omega(ab)

Given a linear functional ω:E→R\omega : E \to \mathbb{R} on an algebra EE over the real numbers, the second-moment bilinear form is the mapping E×E→RE \times E \to \mathbb{R} defined by (a,b)↦ω(a⋅b)(a, b) \mapsto \omega(a \cdot b) for all a,b∈Ea, b \in E.

theorem

The second-moment bilinear form evaluated at (a,b)(a, b) equals ω(a⋅b)\omega(a \cdot b)

Given a linear functional ω:E→R\omega : E \to \mathbb{R} on an algebra EE over the real numbers, the second-moment bilinear form evaluated at elements a,b∈Ea, b \in E is equal to ω(a⋅b)\omega(a \cdot b).

definition

Covariance bilinear form (a,b)↦ω(ab)−ω(a)ω(b)(a, b) \mapsto \omega(ab) - \omega(a)\omega(b)

For a linear functional ω:E→R\omega : E \to \mathbb{R} on a bilinear algebra EE over the real numbers, the covariance bilinear form is the mapping from E×EE \times E to R\mathbb{R} defined by (a,b)↦ω(a⋅b)−ω(a)ω(b)(a, b) \mapsto \omega(a \cdot b) - \omega(a)\omega(b). This construction generalizes the statistical notion of covariance to any algebra equipped with a linear functional, without requiring properties such as associativity or commutativity.

theorem

covarianceForm(ω)(a,b)=ω(ab)−ω(a)ω(b)\text{covarianceForm}(\omega)(a, b) = \omega(ab) - \omega(a)\omega(b)

Let EE be an algebra over the real numbers and ω:E→R\omega: E \to \mathbb{R} be a linear functional. For any elements a,b∈Ea, b \in E, the value of the covariance bilinear form of ω\omega at (a,b)(a, b) is given by ω(a⋅b)−ω(a)ω(b)\omega(a \cdot b) - \omega(a)\omega(b).

theorem

Commutativity of multiplication implies symmetry of the covariance form

Let EE be a bilinear algebra over R\mathbb{R} and ω:E→R\omega : E \to \mathbb{R} be a linear functional. If the multiplication in EE is commutative (i.e., a⋅b=b⋅aa \cdot b = b \cdot a for all a,b∈Ea, b \in E), then the covariance bilinear form defined by (a,b)↦ω(a⋅b)−ω(a)ω(b)(a, b) \mapsto \omega(a \cdot b) - \omega(a)\omega(b) is symmetric.

definition

Variance of aa with respect to ω\omega (ω(a2)−ω(a)2\omega(a^2) - \omega(a)^2)

For a linear functional ω:E→R\omega : E \to \mathbb{R} on a bilinear algebra EE over the real numbers and an element a∈Ea \in E, the variance of aa with respect to ω\omega is defined as ω(a2)−(ω(a))2\omega(a^2) - (\omega(a))^2. This is equivalent to the diagonal of the covariance bilinear form, evaluated at (a,a)(a, a).

theorem

Covω(a,a)=Varω(a)Cov_{\omega}(a, a) = Var_{\omega}(a)

Let EE be a bilinear algebra over R\mathbb{R} and ω:E→R\omega: E \to \mathbb{R} be a linear functional. For any element a∈Ea \in E, the covariance bilinear form evaluated at (a,a)(a, a) is equal to the variance of aa with respect to ω\omega. That is, covarianceForm(ω)(a,a)=variance(ω,a)\text{covarianceForm}(\omega)(a, a) = \text{variance}(\omega, a).

definition

Centering of aa with respect to ω\omega (a−ω(a)⋅1a - \omega(a) \cdot 1)

Given a linear functional ω:E→R\omega : E \to \mathbb{R} on a unital algebra EE and an element a∈Ea \in E, the centering of aa with respect to ω\omega is defined as a−ω(a)⋅1a - \omega(a) \cdot 1, where 11 is the identity element of EE.

theorem

A normalized functional maps centered elements to zero

Let EE be a unital algebra over R\mathbb{R} and ω:E→R\omega : E \to \mathbb{R} be a linear functional. If ω\omega is normalized such that ω(1)=1\omega(1) = 1, then for any element a∈Ea \in E, the value of the functional on the centered element is zero. That is, ω(a−ω(a)⋅1)=0\omega(a - \omega(a) \cdot 1) = 0.

theorem

ω(centered a⋅centered b)=ω(ab)−ω(a)ω(b)\omega(\text{centered } a \cdot \text{centered } b) = \omega(ab) - \omega(a)\omega(b)

Let EE be a unital algebra over R\mathbb{R} and let ω:E→R\omega : E \to \mathbb{R} be a linear functional such that ω(1)=1\omega(1) = 1. Suppose that the identity element 11 satisfies 1⋅x=x1 \cdot x = x and x⋅1=xx \cdot 1 = x for all x∈Ex \in E. For any a,b∈Ea, b \in E, let the centering of an element xx with respect to ω\omega be defined as x−ω(x)⋅1x - \omega(x) \cdot 1. Then the covariance of aa and bb, defined by the bilinear form Covω(a,b)=ω(ab)−ω(a)ω(b)\text{Cov}_\omega(a, b) = \omega(ab) - \omega(a)\omega(b), is equal to the value of the functional on the product of the centered elements: ω((a−ω(a)⋅1)(b−ω(b)⋅1))=ω(ab)−ω(a)ω(b)\omega\big((a - \omega(a) \cdot 1)(b - \omega(b) \cdot 1)\big) = \omega(ab) - \omega(a)\omega(b)