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
Second-moment bilinear form
Given a linear functional on an algebra over the real numbers, the second-moment bilinear form is the mapping defined by for all .
The second-moment bilinear form evaluated at equals
Given a linear functional on an algebra over the real numbers, the second-moment bilinear form evaluated at elements is equal to .
Covariance bilinear form
For a linear functional on a bilinear algebra over the real numbers, the covariance bilinear form is the mapping from to defined by . This construction generalizes the statistical notion of covariance to any algebra equipped with a linear functional, without requiring properties such as associativity or commutativity.
Let be an algebra over the real numbers and be a linear functional. For any elements , the value of the covariance bilinear form of at is given by .
Commutativity of multiplication implies symmetry of the covariance form
Let be a bilinear algebra over and be a linear functional. If the multiplication in is commutative (i.e., for all ), then the covariance bilinear form defined by is symmetric.
Variance of with respect to ()
For a linear functional on a bilinear algebra over the real numbers and an element , the variance of with respect to is defined as . This is equivalent to the diagonal of the covariance bilinear form, evaluated at .
Let be a bilinear algebra over and be a linear functional. For any element , the covariance bilinear form evaluated at is equal to the variance of with respect to . That is, .
Centering of with respect to ()
Given a linear functional on a unital algebra and an element , the centering of with respect to is defined as , where is the identity element of .
A normalized functional maps centered elements to zero
Let be a unital algebra over and be a linear functional. If is normalized such that , then for any element , the value of the functional on the centered element is zero. That is, .
Let be a unital algebra over and let be a linear functional such that . Suppose that the identity element satisfies and for all . For any , let the centering of an element with respect to be defined as . Then the covariance of and , defined by the bilinear form , is equal to the value of the functional on the product of the centered elements:
