Difference between sample variance and statistic variance - Cross Validated most recent 30 from stats.stackexchange.com 2019-08-23T05:04:34Z https://stats.stackexchange.com/feeds/question/25221 http://www.creativecommons.org/licenses/by-sa/3.0/rdf https://stats.stackexchange.com/q/25221 3 Difference between sample variance and statistic variance John Tan https://stats.stackexchange.com/users/10101 2012-03-25T07:58:59Z 2012-05-02T22:14:37Z <p>Conceptually we learn that the sample variance formula, we have to divide by n-1 such that it gives the correct estimation for the true variance.</p> <p>However if we have this example,</p> <p>let a sample $X_i = 1$ with probability $p$, and $0$ with probability $1-p$.</p> <p>so if we define a statistic $\hat{p} = \frac{1}{N} \sum X_i$,</p> <p>we find that $E(\hat{p}) = \frac{1}{N} N p = p$; and</p> <p>working from first principle we can find that variance of $\hat{p}$ </p> <p>$= \textrm{var}(\frac{1}{N} * \sum X_i)$</p> <p>$= \frac{1}{N^2} Np(1-p)$</p> <p>$= \frac{p(1-p)}{N}$</p> <p>So my question is that is this variance obtained the same as the sample variance formula (since there is no divide by n-1 term)? If not which should be the correct answer?</p> <p>Thank you.</p> <p>Edit: Is it because the N-1 formula is talking about the sample variance, and my example we are actually looking at the variance of the sample mean (i.e. sample mean variance)?</p> https://stats.stackexchange.com/questions/25221/-/25729#25729 0 Answer by Gschneider for Difference between sample variance and statistic variance Gschneider https://stats.stackexchange.com/users/9444 2012-04-02T20:23:36Z 2012-04-02T20:23:36Z <p>The n vs. n-1 denominator in the sample variance is a common source of confusion for students. To see where the difference comes from, try calculating the method of moments estimator of the variance, and then the maximum likelihood estimator of the variance.</p> <p>One explanation for the use of n-1 is that we start of with n data values, and therefore n degrees of freedom, but before we get the sample variance, we need to estimate the mean, (we plug x-bar into the sample variance formula) so we have used 1 degree of freedom, and thus, are left with n-1.</p> https://stats.stackexchange.com/questions/25221/-/27585#27585 2 Answer by StasK for Difference between sample variance and statistic variance StasK https://stats.stackexchange.com/users/5739 2012-05-02T21:43:42Z 2012-05-02T21:43:42Z <p>In your example, you are indeed confusing the variance of the mean with the variance of the population. To understand where the $N-1$ factor is coming from, you would have to follow the geometry of a multivariate normal distribution and <a href="http://www.stat.columbia.edu/~fwood/Teaching/w4315/Fall2009/lecture_cochran.pdf" rel="nofollow">Cochran's theorem</a> that describes the decomposition of the sums of squares.</p> https://stats.stackexchange.com/questions/25221/-/27587#27587 0 Answer by Michael Chernick for Difference between sample variance and statistic variance Michael Chernick https://stats.stackexchange.com/users/11032 2012-05-02T22:14:37Z 2012-05-02T22:14:37Z <p>The statement that the true answer for the sample variance is to divide by N-1 is a misstatement. There is no "true" answer. Dividing by N-1 gives you an unbiased estimate. As stated earlier the maximum likelihood estimate is obtained by dividing by N. It has a slight bias on the low side. I think it is unfortunate that in elementary statistics courses unbiasedness is emphasized. But an unbiased estimate is not always best. Best is most accurate and that is measured by mean square error which is the square of the bias plus the variance. For an unbiased estimate the bias squared is 0 but if the variance is large ther can be an estimate with small bias and small enough variance to have smaller mean square error than the unbiased one. Also as mentioned before there could be confusion between the population variance and the variance of the mean. The variance of the mean is 1/N times the population variance and the variance of the sample mean is 1/N times the sample variance. The term sample variance is commonly used to mean the unbiased estimator of the population variance and hence has the factor 1/(N-1). </p>