<p>For a shorter proof, here are a few things we need to know before we start:</p>

<p>$X_1, X_2 , ..., X_n$ are independent observations from a population with mean $\mu$ and variance $\sigma^{2}$</p>

<p>$\mathbb E(X_i) = \mu$ , $\mathbb{Var}(X_i)= \sigma^{2}$</p>

<p>$\mathbb E(X^2) = \sigma^{2} + \mu^{2}$</p>

<p>$\mathbb{Var}(X)=\mathbb E(X^2)-\mathbb [E(X)]^2$</p>

<p>$\mathbb E(\bar{X}^2) = \frac{\sigma^2}{n} + \mu^2$</p>

<hr>

<p>Let's try to show that $\mathbb E(s^2)= \mathbb E\left(\frac{\sum_{i=1}^n (X_i - \bar X)^2}{n-1}\right) = \sigma^{2}$</p>

<p>To make my life easier, I will omit the limits of summation from now onwards, but let it be known that we are always summing from $1$ to $n$.</p>

<p>$\mathbb E\left(\sum (X_i - \bar X)^2 \right) = \mathbb E\left(\sum X_{i}^2 - 2 \bar X \sum X_i + n \bar X^2 \right) = \sum \mathbb E(X_{i}^2) - \mathbb E\left(n \bar X^2 \right)$</p>

<p>$\sum \mathbb E(X_{i}^2) - \mathbb E\left(n \bar X^2 \right) = \sum \mathbb E(X_{i}^2) - n \mathbb E\left(\bar X^2\right) = n \sigma^2 + n \mu^2 - \sigma^2 -n \mu^2$</p>

<p>This simplifies to $(n-1) \sigma^2$</p>

<p>So far, we have shown that $\mathbb E\left(\sum (X_i - \bar X)^2 \right) = (n-1)\sigma^2$</p>

<p>$\mathbb E(s^2)= \mathbb E\left(\frac{\sum (X_i - \bar X)^2}{n-1}\right) = \frac{1}{n-1} \mathbb E\left(\sum (X_i - \bar X)^2 \right)$</p>

<p>$\mathbb E(s^2) = \frac {(n-1)\sigma^2}{n-1} = \sigma^2$</p>

<p>We have now shown that the sample variance is an unbiased estimator of the population variance.</p>

CC BY-SA 3.0
2015-03-16T21:58:00.370Z
2015-04-26T12:27:27.933Z
2015-04-26T12:27:27.933Z
Five σ
<p>Let's improve the "answers per question" metric of the site, by providing a variant of @FiveSigma 's answer that uses visibly the i.i.d. assumption (showing also its necessity).</p>

<p>We want to prove the unbiasedness of the sample-variance estimator, 
$$s^2 \equiv \frac{1}{n-1}\sum\limits_{i=1}^n(x_i-\bar x)^2$$</p>

<p>using an i.i.d. sample of size $n$, from a distribution having variance $\sigma^2$,</p>

<p>$$E(s^2) =?\; \sigma^2$$</p>

<p>First, write</p>

<p>$$s^2 \equiv \frac{n}{n-1} \frac{1}{n}\sum_{i=1}^n(x_i-\bar x)^2$$</p>

<p>Then</p>

<p>$$\frac{1}{n}\sum_{i=1}^n(x_i-\bar x)^2 = \frac 1n \left(\sum_{n=1}^n(x_i^2- 2\bar x x_i + \bar x^2)\right) = \frac 1n \sum_{n=1}^nx_i^2- 2\bar x \frac 1n \sum_{n=1}^nx_i + \bar x^2$$</p>

<p>Since $\bar x = \frac 1n \sum_{n=1}^nx_i$ we get</p>

<p>$$\frac{1}{n}\sum_{i=1}^n(x_i-\bar x)^2 =\frac 1n \sum_{n=1}^nx_i^2-  \bar x^2$$</p>

<p>We consider the expected value of the two components</p>

<p>$$E\left(\frac 1n \sum_{n=1}^nx_i^2\right) = \frac 1n \sum_{n=1}^nE(x_i^2)=E(X^2)$$</p>

<p>since the variables are identically distributed.</p>

<p>Also</p>

<p>$$\bar x ^2 = \left(\frac 1n \sum_{n=1}^nx_i\right)^2 = \frac 1{n^2}\left(\sum_{n=1}^nx_i^2 + \sum_{i\neq j}x_ix_j\right)$$</p>

<p>the second sum having $n^2-n$ elements. So
$$E(\bar x^2) = \frac 1{n^2}(nE(X^2)) + \frac 1{n^2}\left[(n^2-n)E(x_i)E(x_j)\right]$$</p>

<p>We were able to write $E(x_ix_j) = E(x_i)E(x_j)$ because the sample is comprised of independent RVs. More over they are identical so $E(x_i)E(x_j) = [E(X)]^2$. Therefore</p>

<p>$$E(\bar x^2) = \frac 1nE(X^2) + \frac {n-1}{n}[E(X)]^2$$</p>

<p>Bringing it all together,</p>

<p>$$E(s^2) = \frac {n}{n-1}\cdot \left[E(X^2) - \frac 1nE(X^2) - \frac {n-1}{n}[E(X)]^2\right]$$</p>

<p>$$= \frac {n}{n-1}\cdot \left[\frac {n-1}{n}E(X^2)  - \frac {n-1}{n}[E(X)]^2\right]$$</p>

<p>$$\implies E(s^2) = E(X^2) - [E(X)]^2 \equiv {\rm Var}(X)$$</p>

CC BY-SA 3.0
2015-03-17T00:47:51.507Z
2015-03-17T00:47:51.507Z
Alecos Papadopoulos
<p>I know that during my university time I had similar problems to find a complete proof, which shows exactly step by step why the estimator of the sample variance is unbiased.</p>

<p>The proof I used can be found under <a href="http://economictheoryblog.wordpress.com/2012/06/28/latexlatexs2/">http://economictheoryblog.wordpress.com/2012/06/28/latexlatexs2/</a></p>

<p>The proof itself is not very complicated but rather long. That also the reason why I am not writing it down here and probably it is not fair towards the person who actually provided it in the first place.</p>

CC BY-SA 3.0
2015-03-15T15:24:11.333Z
The proof is four-to-five lines _maximum_. I am aware of the link you pointed to, I was always amazed by the unnecessary length of it.
Alecos Papadopoulos
CC BY-SA 3.0
2015-03-15T12:20:27.320Z
2015-03-15T12:49:42.670Z
2015-03-15T12:49:42.670Z
Thomas Drew
<p>I have to prove that the sample variance is an unbiased estimator. What is is asked exactly is to show that following estimator of the sample variance is unbiased:</p>

<p>$s^2=\frac{1}{n-1}\sum\limits_{i=1}^n(x_i-\bar x)^2$</p>

<p>I already tried to find the answer myself, however I did not manage to find a complete proof. </p>

CC BY-SA 3.0
2017-01-17T18:15:41.267Z
@AlecosPapadopoulos, since you are the top user, this is a question for you (it could be on Meta instead, but what the hell). Obviously, the OP is purely statistical and would be on topic on Cross Validated but mostly off topic here. I wonder why no one indicated this before and did not try moving it to there.
Richard Hardy
CC BY-SA 3.0
2017-01-17T18:47:17.900Z
@RichardHardy If I am not mistaken, I have already posted an answer in this thread, isn't it so?:) Of course there exists the more sophisticated one using the annihilator matrix... As per on-topicness, since in undergraduate econometrics the basic Linear Regression model still looms large (with its unbiased OLS estimator), I believe it can be tolerated here too.
Alecos Papadopoulos
CC BY-SA 3.0
2017-01-17T19:29:13.803Z
@AlecosPapadopoulos, yes, my question was about on-topicness. I understand statistics is used in economics extensively, but since we have a dedicated statistical site, why not focus the statistical expertise there rather than scatter it around on many sites. So while the OP might be on topic here, it is "way more" on topic at Cross Validated. And when areas overlap, my hunch is that we should go for the better fit. (This must have been discussed on Meta, but I don't remember the relevant thread, so I might also be wrong.)
Richard Hardy
CC BY-SA 3.0
2017-01-17T19:35:35.187Z
@RichardHardy Don't trust R-squared that much!
Alecos Papadopoulos
CC BY-SA 3.0
2015-03-15T15:16:42.093Z
Please post what you have accomplished so far -and add the self-study /homework tag.
Alecos Papadopoulos
CC BY-SA 3.0
2015-03-15T18:22:38.033Z
@AlecosPapadopoulos  Is the homework tag really a thing? I've been removing those where I found them, as I didn't see a value in it.
FooBar
CC BY-SA 3.0
2015-03-15T19:35:43.980Z
@FooBar I am not sure this is a good idea. Our meta-threads indicate a rather strong opinion in favor of explicitly acknowledging homework questions as such, in the tags.
Alecos Papadopoulos
CC BY-SA 3.0
2015-03-15T19:46:23.047Z
@AlecosPapadopoulos could you link to me that discussion? I only found a question without answers: http://meta.economics.stackexchange.com/questions/1252/how-to-ask-a-homework-question
FooBar
CC BY-SA 3.0
2015-03-15T20:21:45.737Z
@Foobar http://meta.economics.stackexchange.com/questions/24/how-should-we-deal-with-homework-questions
Alecos Papadopoulos
CC BY-SA 3.0
2015-03-15T21:01:01.457Z
@AlecosPapadopoulos I remembered that one, actually. But none of these answers referred to "explicitly acknowledging homework questions as such", especially use of tags.
FooBar
CC BY-SA 3.0
2015-03-15T21:39:04.003Z
@FooBar "Acknowledgement" is mentioned in the question, which had 19 upvotes and zero downvotes. The use of tags speeds up things -you don't have to read the whole question in order to find somewhere in there that the OP reveals that this is homework.
Alecos Papadopoulos
CC BY-SA 3.0
2015-03-16T12:03:32.667Z
What I am trying to do is to prepare a handout for some students I tutor, as this preparation is a good opportunity to repeat my econometrics skills I guess a ''self-study'' tag should be correct.
Andreas Dibiasi
<econometrics><statistics><self-study>
Prove the sample variance is an unbiased estimator
Andreas Dibiasi
# Prove the sample variance is an unbiased estimator

(Asked by: username_0 on 2015-03-15)

I have to prove that the sample variance is an unbiased estimator. What is is asked exactly is to show that following estimator of the sample variance is unbiased:

$s^2=\frac{1}{n-1}\sum\limits\_{i=1}^n(x\_i-\bar x)^2$

I already tried to find the answer myself, however I did not manage to find a complete proof.

**Tags:** econometrics, statistics, self-study

> **Comments:**
> **username_2**: Please post what you have accomplished so far -and add the self-study /homework tag.  
> **username_3**: @username_2  Is the homework tag really a thing? I've been removing those where I found them, as I didn't see a value in it.  
> **username_2**: @username_3 I am not sure this is a good idea. Our meta-threads indicate a rather strong opinion in favor of explicitly acknowledging homework questions as such, in the tags.  
> **username_3**: @username_2 could you link to me that discussion? I only found a question without answers: http://meta.economics.stackexchange.com/questions/1252/how-to-ask-a-homework-question  
> **username_2**: @username_3 http://meta.economics.stackexchange.com/questions/24/how-should-we-deal-with-homework-questions  
> **username_3**: @username_2 I remembered that one, actually. But none of these answers referred to "explicitly acknowledging homework questions as such", especially use of tags.  
> **username_2**: @username_3 "Acknowledgement" is mentioned in the question, which had 19 upvotes and zero downvotes. The use of tags speeds up things -you don't have to read the whole question in order to find somewhere in there that the OP reveals that this is homework.  
> **username_0**: What I am trying to do is to prepare a handout for some students I tutor, as this preparation is a good opportunity to repeat my econometrics skills I guess a ''self-study'' tag should be correct.  
> **username_1**: @username_2, since you are the top user, this is a question for you (it could be on Meta instead, but what the hell). Obviously, the OP is purely statistical and would be on topic on Cross Validated but mostly off topic here. I wonder why no one indicated this before and did not try moving it to there.  
> **username_2**: @username_1 If I am not mistaken, I have already posted an answer in this thread, isn't it so?:) Of course there exists the more sophisticated one using the annihilator matrix... As per on-topicness, since in undergraduate econometrics the basic Linear Regression model still looms large (with its unbiased OLS estimator), I believe it can be tolerated here too.  
> **username_1**: @username_2, yes, my question was about on-topicness. I understand statistics is used in economics extensively, but since we have a dedicated statistical site, why not focus the statistical expertise there rather than scatter it around on many sites. So while the OP might be on topic here, it is "way more" on topic at Cross Validated. And when areas overlap, my hunch is that we should go for the better fit. (This must have been discussed on Meta, but I don't remember the relevant thread, so I might also be wrong.)  
> **username_2**: @username_1 Don't trust R-squared that much!  

---

## 3 answers

### Answer by username_5 on 2015-03-15. Score: 9 | Accepted answer

I know that during my university time I had similar problems to find a complete proof, which shows exactly step by step why the estimator of the sample variance is unbiased.

The proof I used can be found under <http://economictheoryblog.wordpress.com/2012/06/28/latexlatexs2/>

The proof itself is not very complicated but rather long. That also the reason why I am not writing it down here and probably it is not fair towards the person who actually provided it in the first place.

> **Comments:**
> **username_2**: The proof is four-to-username_4 lines _maximum_. I am aware of the link you pointed to, I was always amazed by the unnecessary length of it.  

---

### Answer by username_4 on 2015-03-16. Score: 20

For a shorter proof, here are a few things we need to know before we start:

$X\_1, X\_2 , ..., X\_n$ are independent observations from a population with mean $\mu$ and variance $\sigma^{2}$

$\mathbb E(X\_i) = \mu$ , $\mathbb{Var}(X\_i)= \sigma^{2}$

$\mathbb E(X^2) = \sigma^{2} + \mu^{2}$

$\mathbb{Var}(X)=\mathbb E(X^2)-\mathbb [E(X)]^2$

$\mathbb E(\bar{X}^2) = \frac{\sigma^2}{n} + \mu^2$

---

Let's try to show that $\mathbb E(s^2)= \mathbb E\left(\frac{\sum\_{i=1}^n (X\_i - \bar X)^2}{n-1}\right) = \sigma^{2}$

To make my life easier, I will omit the limits of summation from now onwards, but let it be known that we are always summing from $1$ to $n$.

$\mathbb E\left(\sum (X\_i - \bar X)^2 \right) = \mathbb E\left(\sum X\_{i}^2 - 2 \bar X \sum X\_i + n \bar X^2 \right) = \sum \mathbb E(X\_{i}^2) - \mathbb E\left(n \bar X^2 \right)$

$\sum \mathbb E(X\_{i}^2) - \mathbb E\left(n \bar X^2 \right) = \sum \mathbb E(X\_{i}^2) - n \mathbb E\left(\bar X^2\right) = n \sigma^2 + n \mu^2 - \sigma^2 -n \mu^2$

This simplifies to $(n-1) \sigma^2$

So far, we have shown that $\mathbb E\left(\sum (X\_i - \bar X)^2 \right) = (n-1)\sigma^2$

$\mathbb E(s^2)= \mathbb E\left(\frac{\sum (X\_i - \bar X)^2}{n-1}\right) = \frac{1}{n-1} \mathbb E\left(\sum (X\_i - \bar X)^2 \right)$

$\mathbb E(s^2) = \frac {(n-1)\sigma^2}{n-1} = \sigma^2$

We have now shown that the sample variance is an unbiased estimator of the population variance.


---

### Answer by username_2 on 2015-03-17. Score: 4

Let's improve the "answers per question" metric of the site, by providing a variant of @FiveSigma 's answer that uses visibly the i.i.d. assumption (showing also its necessity).

We want to prove the unbiasedness of the sample-variance estimator,
$$s^2 \equiv \frac{1}{n-1}\sum\limits\_{i=1}^n(x\_i-\bar x)^2$$

using an i.i.d. sample of size $n$, from a distribution having variance $\sigma^2$,

$$E(s^2) =?\; \sigma^2$$

First, write

$$s^2 \equiv \frac{n}{n-1} \frac{1}{n}\sum\_{i=1}^n(x\_i-\bar x)^2$$

Then

$$\frac{1}{n}\sum\_{i=1}^n(x\_i-\bar x)^2 = \frac 1n \left(\sum\_{n=1}^n(x\_i^2- 2\bar x x\_i + \bar x^2)\right) = \frac 1n \sum\_{n=1}^nx\_i^2- 2\bar x \frac 1n \sum\_{n=1}^nx\_i + \bar x^2$$

Since $\bar x = \frac 1n \sum\_{n=1}^nx\_i$ we get

$$\frac{1}{n}\sum\_{i=1}^n(x\_i-\bar x)^2 =\frac 1n \sum\_{n=1}^nx\_i^2- \bar x^2$$

We consider the expected value of the two components

$$E\left(\frac 1n \sum\_{n=1}^nx\_i^2\right) = \frac 1n \sum\_{n=1}^nE(x\_i^2)=E(X^2)$$

since the variables are identically distributed.

Also

$$\bar x ^2 = \left(\frac 1n \sum\_{n=1}^nx\_i\right)^2 = \frac 1{n^2}\left(\sum\_{n=1}^nx\_i^2 + \sum\_{i\neq j}x\_ix\_j\right)$$

the second sum having $n^2-n$ elements. So
$$E(\bar x^2) = \frac 1{n^2}(nE(X^2)) + \frac 1{n^2}\left[(n^2-n)E(x\_i)E(x\_j)\right]$$

We were able to write $E(x\_ix\_j) = E(x\_i)E(x\_j)$ because the sample is comprised of independent RVs. More over they are identical so $E(x\_i)E(x\_j) = [E(X)]^2$. Therefore

$$E(\bar x^2) = \frac 1nE(X^2) + \frac {n-1}{n}[E(X)]^2$$

Bringing it all together,

$$E(s^2) = \frac {n}{n-1}\cdot \left[E(X^2) - \frac 1nE(X^2) - \frac {n-1}{n}[E(X)]^2\right]$$

$$= \frac {n}{n-1}\cdot \left[\frac {n-1}{n}E(X^2) - \frac {n-1}{n}[E(X)]^2\right]$$

$$\implies E(s^2) = E(X^2) - [E(X)]^2 \equiv {\rm Var}(X)$$


---

