# Homework Help: Statistics Sum of Squares x*y Proof

1. Sep 13, 2014

### laz0r

1. The problem statement, all variables and given/known data

Prove that

$$\sum[(x_{i} - \overline{x})(y_{i} - \overline{y})] = \sum[(x_{i} - \overline{x})y_{i}]$$

2. Relevant equations
None.

3. The attempt at a solution
I tried using the fact that the sum of the mean values is just the mean value, because the sum of a constant is simply a constant, and I expanded out the first sum, but I didn't end up anywhere.

$$\sum[x_{i}y_{i}] - \overline{y}\sum(x_{i}) - \overline{x}\sum(y_{i}) + \overline(x)\overline(y)$$

I have no idea where to go from here, so some inspiration would be much appreciated.

2. Sep 13, 2014

### Ray Vickson

I assume you have n values $x_1, \ldots, x_n$ and $y_1, \ldots,y_n$. In that case your last term above, $\bar{x} \bar{y}$ is incorrect. Can You see why? You can also do other simplifications, but if I say more I will essentially be doing the question for you.

3. Sep 13, 2014

### LCKurtz

Notice that your first and third terms give what is on the right side of the equation. So you are left with showing$$-\sum x_i\bar y + \sum \bar y \bar x = 0$$You're pretty close...

4. Sep 13, 2014

### laz0r

Ok, so I actually did end up getting somewhere and didn't realize it =)

EDIT:

I've done proof

$$\sum[(x_{i}-\overline{x})y_{i}] + \sum[\overline{y}(\overline{x} - x_{i})]$$

Playing around in excel has taught me that $$\sum[\overline{y}(\overline{x} - x_{i})]$$ is actually just equal to zero, because your subtracting an array of x values from the mean and then just multiplying them by a constant, $$\overline{y}$$, then adding them, which nets you zero.

Last edited: Sep 13, 2014
5. Sep 13, 2014

### Ray Vickson

Try writing out a few small examples, such as for n = 2 or n = 3. These are small enough that you can write down everything explicitly and see exactly what is going on.

6. Sep 13, 2014

### laz0r

I've figured out why, but I'm not sure how to explain it symbolically, do you think I would need to elaborate more or is my edited explanation good enough in your view?

Thanks for the help!

7. Sep 13, 2014

### LCKurtz

$\bar x$ and $\sum x_i$ are related to each other. How?

8. Sep 13, 2014

### laz0r

I'm a little bit rusty on my operation of sums, so excuse me if this is incorrect, but can I do this?

$$[(\overline{y})/n][\sum x_{i}] - \overline{y}[\sum x_{i}] = [(\overline{y}^2)/n][\sum(x_{i} - x_{i})]$$

Then what tends to zero appears to be obvious

9. Sep 13, 2014

### LCKurtz

I don't follow that at all. Why don't you just answer my question at the top?

10. Sep 13, 2014

### laz0r

They're related by

$$\overline{x} = [\sum x_{i}]/n$$

11. Sep 13, 2014

### LCKurtz

So you could use $\sum x_i = n\bar x$. Do you see how you might use that to get$$\sum \bar y(\bar x - x_i) = 0\text{?}$$

12. Sep 13, 2014

### laz0r

Wow, it appears my brain took a nap today.

Thank you for your help lol, I appreciate it.

13. Sep 13, 2014

### LCKurtz

So amuse me and show the finishing steps...

14. Sep 13, 2014

### laz0r

Sorry, I'm very slow at typing this latex code..

$$\overline{y}*[\sum(\overline{x} - x_{i})] = 0$$

$$[\sum(\overline{x} - x_{i})] = 0$$

$$\sum(\overline{x}) - \sum(x_{i}) = 0$$

$$n(\overline{x}) - n(\overline{x}) = 0$$

LHS = RHS

used

$$\sum(c) = n*c$$

Where n is the upper bound and 1 is the lower bound of the sum

15. Sep 13, 2014

### LCKurtz

Good. Thanks for finishing it up.