Calculate Correlation Coefficient r without cov(x,y), Correlation Coefficient r with population cov(x,y), Correlation Coefficient r with sample cov(x,y) from the following data
| X | Y |
| 300 | 800 |
| 350 | 900 |
| 400 | 1000 |
| 450 | 1100 |
| 500 | 1200 |
| 550 | 1300 |
| 600 | 1400 |
| 650 | 1500 |
| 700 | 1600 |
Solution:Mean
bar x = (sum x_i)/n=(300+350+400+450+500+550+600+650+700)/9=4500/9=500Mean
bar y = (sum y_i)/n=(800+900+1000+1100+1200+1300+1400+1500+1600)/9=10800/9=1200| x | y | X=(x-500)/50 | Y=(y-1200)/100 | X^2 | Y^2 | X*Y |
| 300 | 800 | -4 | -4 | 16 | 16 | 16 |
| 350 | 900 | -3 | -3 | 9 | 9 | 9 |
| 400 | 1000 | -2 | -2 | 4 | 4 | 4 |
| 450 | 1100 | -1 | -1 | 1 | 1 | 1 |
| 500 | 1200 | 0 | 0 | 0 | 0 | 0 |
| 550 | 1300 | 1 | 1 | 1 | 1 | 1 |
| 600 | 1400 | 2 | 2 | 4 | 4 | 4 |
| 650 | 1500 | 3 | 3 | 9 | 9 | 9 |
| 700 | 1600 | 4 | 4 | 16 | 16 | 16 |
| --- | --- | --- | --- | --- | --- | --- |
| 4500 | 10800 | sum X=0 | sum Y=0 | sum X^2=60 | sum Y^2=60 | sum X*Y=60 |
Correlation Coefficient r : r = (sum XY)/(sqrt(sum X^2) * sqrt(sum Y^2))=60/(sqrt(60) * sqrt(60))=60/(7.746 * 7.746)=1
Correlation Coefficient r with Population Cov(x,y) :
Population Cov(x,y) = (sum (x-bar x)(y-bar y))/(n)
=60/9
=6.6667
Population Standard deviation sigma = sqrt((sum (x - bar x)^2)/(n))
=sqrt(60/9)
=sqrt(6.6667)
=2.582
Population Standard deviation sigma = sqrt((sum (y - bar y)^2)/(n))
=sqrt(60/9)
=sqrt(6.6667)
=2.582
Now, r = (cov(x,y))/(sigma_x * sigma_y)
= (6.6667)/(2.582 * 2.582)
=1
Correlation Coefficient r with Sample Cov(x,y) :
Sample Cov(x,y) = (sum (x-bar x)(y-bar y))/(n-1)
=60/8
=7.5
Sample Standard deviation sigma = sqrt((sum (x - bar x)^2)/(n-1))
=sqrt(60/8)
=sqrt(7.5)
=2.7386
Sample Standard deviation sigma = sqrt((sum (y - bar y)^2)/(n-1))
=sqrt(60/8)
=sqrt(7.5)
=2.7386
Now, r = (cov(x,y))/(sigma_x * sigma_y)
= (7.5)/(2.7386 * 2.7386)
=1
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then