Несмещенная оценка выборочной ковариационной матрицы при заданных точках данных x i ∈ R d равна C = 1nxi∈Rdгде ˉ х =Σхя/ппредставляет собой среднее по всем точкам. Обозначим(xi- ˉ x )какzi. 1
C=1n−1∑i=1n(xi−x¯)(xi−x¯)⊤,
x¯=∑xi/n(xi−x¯)zi фактор не меняет ранг, и каждый член в сумме имеет (по определению) ранг
1, поэтому суть вопроса заключается в следующем:
1n−11
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 because zi 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
zn=−∑i=1n−1zi,
and now plug it into the above expression:
∑i=1nziz⊤i=∑i=1n−1ziz⊤i+(−∑i=1n−1zi)z⊤n=∑i=1n−1zi(zi−zn)⊤.
Now there is only n−1 terms left in the sum and it becomes clear that the whole sum can have at most rank n−1.
This result, by the way, hints to why the factor in the unbiased estimator of covariance is 1n−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 always n−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.