Can someone please show me how to solve this step by step. I'm trying to understand the whole concept but I'm getting confused...

Find the sample linear correlation coefficient between x and y:
x: 5, 2, 2
y: 7, 4, 7
x^2: 25, 4, 4
y^2: 49, 16, 49
xy: 35, 18, 14

I know how to find the correlation coefficient (r), it's SS(xy) / sqr root of SS(x)SS(y)
But when I solve that I get 9....I know r has to be between 0 and 1 so that can't be right at all... Help!

2 answers

Nevermind!

I had SS(x) = 6, and SS(y) = 6, but I kept thinking SS(xy) = 54...I wasn't solving completely. SS(xy) = 3,...so r = .5
sum(x) = 9
Sum(y) = 18
sum(x^2) = 33
sum(y^2) = 114
sum( xy) = 57
n = 3

r = 3(57)-(9)(18)/sqrt(3(33)-9^2)sqrt(3(114)-18^2)

r = (171-162)/sqrt(99-81)sqrt(342-324)

r = 9/sqrt(18)sqrt(18)

r = 9/18 = .5