Как указано в этом вопросе, максимальный ранг ковариационной матрицы равен где - размер выборки, поэтому, если размер ковариационной матрицы равен размеру выборки, он будет единственным. Я не могу понять, почему мы вычитаем из максимального ранга ковариационной матрицы.
covariance-matrix
linear-algebra
user3070752
источник
источник
Ответы:
Несмещенная оценка выборочной ковариационной матрицы при заданных точках данных x i ∈ R d равна C = 1n xi∈Rd где ˉ х =Σхя/ппредставляет собой среднее по всем точкам. Обозначим(xi- ˉ x )какzi. 1
Why does∑ziz⊤i have rank n−1 and not rank n , as it would seem because we are summing n rank-1 matrices?
The answer is that it happens becausezi are not independent. By construction, ∑zi=0 . So if you know n−1 of zi , then the last remaining zn is completely determined; we are not summing n independent rank-1 matrices, we are summing only n−1 independent rank-1 matrices and then adding one more rank-1 matrix that is fully linearly determined by the rest. This last addition does not change the overall rank.
We can see this directly if we rewrite∑zi=0 as
This result, by the way, hints to why the factor in the unbiased estimator of covariance is1n−1 and not 1n .
The geometric intuition that I alluded to in the comments above is that one can always fit a 1D line to any two points in 2D and one can always fit a 2D plane to any three points in 3D, i.e. the dimensionality of the subspace is alwaysn−1 ; this only works because we assume that this line (and plane) can be "moved around" in order to fit our points. "Positioning" this line (or plane) such that it passes through x¯ is equivalent of centering in the algebraic argument above.
источник
A bit shorter, I believe, explanation goes like this:
Let us define matrixn x m matrix x of sample data points where
n is a number of variables and m is a number of samples for each variable. Let us assume that none of the variables are linearly dependent.
The rank ofx is min(n,m) .
Let us define matrixn x m matrix z of rowwise centered variables:
The rank of centered data becomesmin(n,m−1) , because each data row is now subjected to constraint:
It basically means we can recreate the entirez matrix even if one of columns is removed.
The equation for sample covariance ofx becomes:
Clearly, the rank of covariance matrix is therank(zzT) .
By rank-nullity theorem:rank(zzT)=rank(z)=min(n,m−1) .
источник