# Proving a property of $(n-1)s^2$

I would appreciate your help as I climb the stats learning curve!

I want to prove the following:

"Let $x_1, x_2, ... , x_n$ be any numbers and let $\overline x = (x_1 + x_2 + ... + x_n)/n$

Then show:

$(n-1)s^2 =\sum(x_i-\overline x)^2 = \sum(x_i^2 - n\overline x^2)$, where $s^2$ is the observed value of the sample variance $S^2$.

So far I have:

\begin{align} s^2 &= \frac{\sum(x_i - \overline x)^2}{n-1} \\ (n-1)s^2 &= \sum(x_i - \overline x)^2 \\ &= \sum(x_i^2 - 2x_i\overline x + \overline x^2) \\ &= \sum(x_i^2) - 2\frac{\sum(x_i)\sum(x_i)}{n} +\sum(\overline x^2) \\ &= \sum(x_i^2) - 2\frac{\sum(x_i)\sum(x_i)}{n} + \sum(\frac{\sum(x_i)}{n}) \end{align}

As you can probably tell, I'm new to stats and would greatly appreciate any help. This is where I am stuck. I can't seem to figure out how to get from this point to the desired result, esp. given all the sum notations. Could someone point me in the right direction?

Also, I realize that what you are given in the problem is super important, so if it seems like I left out information, please tell me! I look to this community for help in my journey up this learning curve.

• Please add the [self-study] tag & read its wiki. May 23, 2016 at 19:40
• Thanks gung. Just updated and read the wiki. Very excited! :) May 23, 2016 at 19:50

## 1 Answer

I think there's a parenthesis confounding you

\begin{align} s^2 &= \frac{\sum(x_i - \overline x)^2}{n-1} \\ (n-1)\cdot s^2 &= \sum(x_i - \overline x)^2 \\ &= \sum(x_i^2 - 2x_i\overline x + \overline x^2) \\ &= \sum(x_i^2)-2\overline x \cdot\sum x_i +n\cdot\overline x^{2} \\ &= \sum(x_i^2)-2n\cdot\overline x^{2} +n\cdot\overline x^{2}\\ &= \sum(x_i^2)-n\cdot\overline x^{2} \end{align}

• Hi @Firebug, thank you so much for your solution. Just a quick question. It seems you are treating $\overline x$ as a constant here when you pull it out of the summation in the third step. Is that acceptable? I rewrote $\overline x$ as $\frac{\sum(x_i)}{n}$ because I thought it couldn't be treated as a constant. In addition, I believe you have $\sum(x_i) = n\overline x$. Is that justified as well? Thank you kindly! May 23, 2016 at 20:26
• Yes, it is acceptable, because $\sum_j \frac{\sum_i x_i}{n} = \sum_j \overline x$ doesn't depend at all on the index $j$. May 23, 2016 at 20:28
• And $\overline x = \frac{\sum_i x_i}{n} \therefore \sum x_i = n \cdot \overline x$. May 23, 2016 at 20:31
• Thank you so much for your solutions Firebug. So appreciated. May 23, 2016 at 20:36
• sorry didn't mean to leave a comment :X May 26, 2016 at 23:33