Let x=xi and y=yi
Let ui=xi−2 and vi=yi−5
Then it is given that,
n=10,∑ui=30,∑vi=40,∑u2i=900,∑v2i=800,∑uivi=480
∴¯¯¯u=∑uin=3010=3
¯¯¯v=∑vin=4010=4
Since the correlation coefficient is independent of change of origin and scale, correlation coefficient between x and y is
r(x,y)=r(u,v)
=1n∑uivi−¯¯¯u¯¯¯v√1n∑u2i−(¯¯¯u)2⋅√1n∑v2i−(¯¯¯¯¯v2)
=48010−3×4√90010−(3)2⋅√80010−(4)2
=48−12√81⋅√64=369×8=48=0.5