Definition: The sample variance of a set of samples from a particular realization of a stationary stochastic process is defined as average squared magnitude after removing the known mean:
The sample variance is a unbiased estimator of the true variance when the mean is known, i.e.,
This is easy to show by taking the expected value:
When the mean is unknown, the sample mean is used in its place:
The normalization by instead of is necessary to make the sample variance be an unbiased estimator of the true variance. This adjustment is necessary because the sample mean is correlated with the term in the sample variance expression. This is revealed by replacing with in the calculation of (C.22).