# Thread: simplifying the correlation coefficient

1. ## simplifying the correlation coefficient

Hi,

I am trying to understand the following simplification.
I cannot see how to get from the one step to the other.

$
\sum (x_i - \bar{x})(y_i - \bar{y})
$

we get

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

and then (how do they get to this step?)

$
\sum (x y) -n\bar{x}\bar{y} -n\bar{x}\bar{y} +n\bar{x}\bar{y}
$

and then (very obviously)
$
\sum (x y) -n\bar{x}\bar{y}
$

It can be seen on wolfram mathworld:
Correlation Coefficient -- from Wolfram MathWorld

I get the following.
$
\sum (x_i y_i) + n\bar{x}\bar{y} -n(\bar{x}\sum y_i + \bar{y}\sum x_i)
$

How does the simplification from step 2 to step 3 happen.
My simplification is not the same, and I don't see how to make it simpler.

Thanks
Regards
Craig

2. $\displaystyle \overline{x}=\frac{\sum{x}}{n},$ so $\displaystyle n\overline{x}=\sum{x}.$