# Correlation. Im stuck, Pls help

#### sweetx

##### New Member
Im in desperate need and im stuck: Can someone plsease tell me where im going wrong with this question.

Calculate the sample correlation between test score and assembly time.
Test Score Assembly Time
(minutes)
(x) (y)
40 16
50 14
60 12
75 10
80 8
85 10
90 7
-----------------------------------
540 77

MY WORK:
X^2=1600,2500,3600,5625,6400,7225,8100=35050
y^2=256,196,144,100,64,100,49=909
X*Y=640,700,720,750,640,850,630=4930

ss(xy)=4930-(540*77/7)=-1010
ss(x)=35050-(291600/7)=-6607.142
ss(y)=909-(5929/7)=62

Correlation Coefficient is:
r=-1010/(square root of -6607.142 * 62)=???????

This is where i get stuck. Everytime i try to calculate the answer i come up with an error. Can someone pls tell me if i did this correctly. I cant seem to get the answer to the coefficient

#### PeterVincent

##### New Member
sweetx,

Not sure what formula you are using for r.

Here is what I would do:

calc mean of x, x' the normal way, x'= SX/n
calc mean of y, y' the normal way, y'=SX/n

SSX = SIGMA((x - x')^2) over all of x
SSY = SIGMA((y - y')^2) over all of y
SXY = SIGMA((x - x')(y - y')) over all x, y

r = SXY/(root(SSX) * root(SSY))

Peter

#### yupeh

##### New Member
you should not get a negative SSX and SSY since it is a "sum of squares", which is always nonnegative... if you got negative SSX and SSY , in your case the SSX, the computation for r will really be an error or cannot be computed because it is not possible to square root a negative integer...