Difference between sample variance and statistic variance 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.
However if we have this example,
let a sample $X_i = 1$ with probability $p$, and $0$ with probability $1-p$.
so if we define a statistic $\hat{p} = \frac{1}{N} \sum X_i$,
we find that $E(\hat{p}) = \frac{1}{N} N p = p$; and
working from first principle we can find that variance of $\hat{p}$ 
$= \textrm{var}(\frac{1}{N} * \sum X_i)$
$= \frac{1}{N^2} Np(1-p)$
$= \frac{p(1-p)}{N}$
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?
Thank you.
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)?
 A: 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 Cochran's theorem that describes the decomposition of the sums of squares.
A: 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.
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.
A: 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). 
