The empirical second-moment matrix #
For a finite sample v : ฮน โ n โ ๐ of vectors over โ or โ, the uncentered empirical
second-moment matrix is
Mฬ = rโปยน โแตข vแตข vแตขแดด, with entries Mฬโโ = rโปยน โแตข vแตขโ conj (vแตขโ),
where r = card ฮน. It is the mean (TauCeti.finiteMean) of the rank-one matrices vแตข vแตขแดด,
so it is Hermitian and positive semidefinite. Evaluated on random samples it is the natural
estimator of a population second-moment matrix E[V Vแดด]; each of its entries is a sample mean of
products of coordinates, which is what makes the second-moment bounds for sample means apply to it
entry by entry.
Main declarations #
TauCeti.sampleSecondMoment: the empirical second-moment matrix of a finite sample.TauCeti.sampleSecondMoment_apply: its entries are sample means of coordinate products.TauCeti.isHermitian_sampleSecondMoment,TauCeti.posSemidef_sampleSecondMoment: it is Hermitian, and positive semidefinite in finite dimension.Matrix.sampleCovariance: the sample covariance matrixX Xแดด / nof ap ร ndata matrix, whose columns are the samples;Matrix.sampleCovariance_eq_sampleSecondMomentidentifies it with the empirical second-moment matrix of the columns, andMatrix.isHermitian_sampleCovarianceandMatrix.posSemidef_sampleCovariancegive Hermitian and positive semidefinite.Matrix.re_trace_sampleCovariance: its real trace is the column-normalized sum of squared entry norms.
References #
- R. Vershynin, High-Dimensional Probability (2018), ยง4.7: the sample covariance matrix.
The uncentered empirical second-moment matrix rโปยน โแตข vแตข vแตขแดด of a finite sample
v : ฮน โ n โ ๐, where r = card ฮน: the mean of the rank-one matrices vแตข vแตขแดด. The empty sample
has second-moment matrix 0.
Instances For
The real trace of a sample covariance matrix is the column-normalized sum of squared entry norms. This holds for empty index types, with the usual zero conventions.