The cvar function divides by the total number
of values, mn, rather than mn
− 1. To find the covariance corresponding to a denominator of mn − 1, multiply the result of this function by mn / (mn − 1). Dividing by the "sample size minus
one," rather than the sample size, provides a better estimate for
the true population variance.