Original source: http://blog.sina.com.cn/s/blog_c96053d60101n24f.html
In the PCA algorithm used in the variance, covariance matrix, where the variance formula is, covariance matrix formula for, at that time do not understand why the other than M, but M-1, then want to know why, the following is the answer you want.
AssumeXA set of random variables of the same distribution as the independent, the overallM, Random extractionNA random variable to form a sample,And is the overall value and variance , is constant is the mean and variance of the sample, as the sample is randomly extracted, > It's random, too.
It is important to note that because the sample is random, x1 ,x2 ,x3... > It's all random. The above can be seen, The expectation of this variable is the mean value of the population, so it can be said that the mean is unbiased.
Next look at the mean value of the sample variance:
Based on the variance formula, you can get:
therefore:
Here you can see that the expectation of sample variance is not unbiased, and to unbiased estimation, you should multiply the previous factor:
N-1 for both degrees of freedom, that is, in a capacity of n in the sample, when the n-1 variable, n Covariance is divided by m-1 principle and variance, because variance is a special case of covariance.
< Span style= "word-wrap:normal; Word-break:normal; " > this The discussion is more thorough:
http://www.zhihu.com/question/20099757
Unbiased estimation of sample variance and origin of (n-1)