# Tricky Summation

1. Aug 16, 2010

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

I have this nasty summation and I am close to finding a way to calculate it with my graphing calculator. I just need to iron out the details. If I can rewrite the summation on terms of $\bar{x}$, $\bar{y}$ and $\sum x_iy_i$ I will be all set. I will explain these terms in a moment. First, here is the sum:

$$S_{xy} = \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})$$

Where $x_i$ and $y_i$ are the x and y (sample) averages.

If I do out the multiplication I get

$$S_{xy} = \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})$$

$$= \sum x_iy_i - x_i\bar{y} - y_i\bar{x} + \bar{x}\bar{y}$$

$$= \sum x_iy_i - \bar{y}\sum x_i - \bar{x}\sum y_i +\sum\bar{x}\bar{y}$$

Now I it is just the last term $\sum\bar{x}\bar{y}$ that is bothering me. I think the answer is obvious, but I would like confirmation: is the expression $\sum\bar{x}\bar{y}$ identical to $n*(\bar{x}\bar{y})$ ?

It must be. I don't know why I am doubting this.

2. Aug 16, 2010

### rock.freak667

Yes

$$\sum\bar{x}\bar{y} = n\bar{x}\bar{y}$$

Also remember that

$$\sum x_i = n \bar{x}$$

$$\sum y_i = n \bar{y}$$

So what does

$$- \bar{y}\sum x_i - \bar{x}\sum y_i +\sum\bar{x}\bar{y}$$

become?

3. Aug 16, 2010

Oh neat. Looks like it reduces to $-n\bar{x}\bar{y}$

Yes?

4. Aug 16, 2010

### rock.freak667

Yes

Which can also be written as (1/n)∑xi∑yi

5. Aug 16, 2010

I like this. If I could write it all on terms of xbar, ybar, and n, that would be best. I think that the sum(xi*yi) term can be written in terms of these. I'll post back I'm a moment. Thanks again!!

Hmmm... I am not seeing an easy way to write $\sum x_iy_i$ in terms of $\bar{x}$, $\bar{x}$, and n. Perhaps there isn't one?

Last edited: Aug 16, 2010
6. Aug 17, 2010

"I am not seeing an easy way to write in terms of $\bar x$, $\bar y$ , and n. Perhaps there isn't one?"