# Need help understanding this equality

mkkrnfoo85
Hello, I am really bothered by this because I can't seem to be able to prove the following is true.

$$\sum_{i=1}^n (x_i - u)^2 = \sum_{i=1}^n (x_i - x_{avg})^2 + n(x_{avg} - u)^2$$

for $$u = constant$$
and $$x_{avg} = \frac{\sum x_i}{n}$$

I just can't seem to grasp how I can prove that the right-side equals the left-side. Any push in the right direction would be extremely helpful.

-Mark

Last edited:

Staff Emeritus
What've you tried doing? Have you tried expanding the RHS and using the definition of xavg? What do you get after doing this?

Homework Helper
Your definition of "xavg" is wrong. You need
$$x_{avg}= \frac{\sum x_i}{n}$$
so $\sum x_i= nx_{avg}$

Multiply it out on the left: $\sum (x_i^2- 2ux_i+ u^2)= \sum x_i^2- 2u\sum x_i+ u^2 \sum 1$
Of course, $\sum x_i= nx_{avg}$ and $\sum 1$= n so that is $\sum x_i^2- 2nux_{avg}+ nu^2$

Now do the same on the right and you should be able to cancel some things and arrive at the same answer.

mkkrnfoo85
oh that helped a lot. Thx, cristo and halls, and thx for the correction. I got to the conclusion:

$$n(u^2-2ux_{avg}) == n(u^2-2ux_{avg})$$

=).

I had one more question. I need to know this relation to use in a proof in my 'probability' class. Is there an intuitive way to look at the equality to make it seem more obvious, and/or easier to memorize? Any takes on that would be helpful. Thanks again.

-Mark