# Math Help - Why Do these two things equate?

1. ## Why Do these two things equate?

Can anyone detail the steps to help me understand why:

Sum( (Xi - X-bar)^2 )/n (where the sum is 1 to n)
equals

(Sum ( (Xi)^2) - n*x-bar^2) / n where the summation is 1 to n.

I know this must be simple algebra but I cant seem to see it!

Any help with the logic/steps is appreciated

Thanks!

2. Originally Posted by B_Miner
Can anyone detail the steps to help me understand why:

Sum( (Xi - X-bar)^2 )/n (where the sum is 1 to n)
equals

(Sum ( (Xi)^2) - n*x-bar^2) / n where the summation is 1 to n.

I know this must be simple algebra but I cant seem to see it!

Any help with the logic/steps is appreciated

Thanks!
$\sum_{i=1}^{n} \frac{(x_i - \overline{x})^2}{n} = \sum_{i=1}^{n} \frac{x_i^2}{n} - 2 \overline{x} \sum_{i=1}^{n} \frac{x_i}{n} + \frac{1}{n} \sum_{i=1}^{n} \overline{x}^2$ $= \left( \sum_{i=1}^{n} \frac{x_i^2}{n} \right) - 2 (\overline{x}) (\overline{x}) + \frac{1}{n} (n \overline{x}^2) = \left( \sum_{i=1}^{n} \frac{x_i^2}{n} \right) - \frac{n \overline{x}^2}{n}$

$= \sum_{i=1}^{n} \left( \frac{x_i^2}{n} - \frac{\overline{x}^2}{n} \right) = \sum_{i=1}^{n} \left( \frac{x_i^2 - \overline{x}^2}{n}\right)$.