The Student Room Group

Product Moment Correlation Coefficient

Probably a silly question but here goes...

When calculating the Product Moment Correlation Coefficient you need to calculate terms with notation S_xx, S_yy, S_xy (I assume these are the moments?). And in the formula book you see something like this:

S_xx = Sum (x_i-xbar)^2 = Sum x_i^2 - (1/N) (Sum x_i)^2

(Where I've used _ to indicate symbols that are subscripts, ^ to indicate terms that are powers, xbar to indicate x with a bar on top (which is the mean of x) and Sum in place of a big sigma which would indicate a sum over the following terms)

My question is why does:

Sum (x_i-xbar)^2 = Sum x_i^2 - (1/N) (Sum x_i)^2

and not this:

Sum (x_i-xbar)^2 = Sum x_i^2 -2*x_i*x_i/N - (1/N) (Sum x_i)^2

I would have thought there would be a 2*x_i*x_i/N term when you multiply out the bracket.
Reply 1
Original post by biz2b
Probably a silly question but here goes...

When calculating the Product Moment Correlation Coefficient you need to calculate terms with notation S_xx, S_yy, S_xy (I assume these are the moments?). And in the formula book you see something like this:

S_xx = Sum (x_i-xbar)^2 = Sum x_i^2 - (1/N) (Sum x_i)^2

(Where I've used _ to indicate symbols that are subscripts, ^ to indicate terms that are powers, xbar to indicate x with a bar on top (which is the mean of x) and Sum in place of a big sigma which would indicate a sum over the following terms)

My question is why does:

Sum (x_i-xbar)^2 = Sum x_i^2 - (1/N) (Sum x_i)^2

and not this:

Sum (x_i-xbar)^2 = Sum x_i^2 -2*x_i*x_i/N - (1/N) (Sum x_i)^2

I would have thought there would be a 2*x_i*x_i/N term when you multiply out the bracket.


I'm too lazy to work out the algebra - it should be online or in a 'decent' stats book - but basically they're doing something like this:

(x - y)^2 = x^2 -2xy + y^2 and then using the fact that x_bar = (sum x)/ n to rewrite the sum.
Is this what you're asking:
Unparseable latex formula:

[br]\\[br]\sum (x_i-\bar{x})^2[br]\\[br]=\sum (x_i^2-2x_i\overline{x}+\overline{x}^2)[br]\\[br]=\sum x_i^2-2\overline{x}\sum x_i+n\overline{x}^2[br]\\[br]=\sum x_i^2-2n\overline{x}^2+n\overline{x}^2[br]\\[br]=\sum x_i^2-n\overline{x}^2[br]\\[br]=\sum x_i^2-\sum \overline{x}^2[br]


?
(edited 9 years ago)

Quick Reply

Latest