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
Class-Y Class-X | 90 - 100 | 100 - 110 | 110 - 120 | 120 - 130 |
50 - 55 | 4 | 7 | 5 | 2 |
55 - 60 | 6 | 10 | 7 | 4 |
60 - 65 | 6 | 12 | 10 | 7 |
65 - 70 | 3 | 8 | 6 | 3 |
Solution:
| | C.I.`(y)` | 90 - 100 | 100 - 110 | 110 - 120 | 120 - 130 | | | | |
| | M.V.`(y)` | 95 | 105 | 115 | 125 | | | | |
C.I.`(x)` | M.V.`(x)` | `dy` `dx` | -1 | 0 | 1 | 2 | `f_x` | `fdx` | `fdx^2` | `fdxdy` |
50 - 55 | 52.5 | -1 | [4]4 | [0]7 | [-5]5 | [-4]2 | 18 | -18 | 18 | -5 |
55 - 60 | 57.5 | 0 | [0]6 | [0]10 | [0]7 | [0]4 | 27 | 0 | 0 | 0 |
60 - 65 | 62.5 | 1 | [-6]6 | [0]12 | [10]10 | [14]7 | 35 | 35 | 35 | 18 |
65 - 70 | 67.5 | 2 | [-6]3 | [0]8 | [12]6 | [12]3 | 20 | 40 | 80 | 18 |
| | `f_y` | 19 | 37 | 28 | 16 | 100 | 57 | 133 | 31 |
| | `fdy` | -19 | 0 | 28 | 32 | 41 | | | |
| | `fdy^2` | 19 | 0 | 28 | 64 | 111 | | | |
| | `fdxdy` | -8 | 0 | 17 | 22 | 31 | | | |
Correlation Coefficient r :
`r = (n * sum fdxdy - sum fdx * sum fdy)/(sqrt(n * sum f dx^2 - (sum f dx)^2) * sqrt(n * sum f dy^2 - (sum f dy)^2))`
`=(100 * 31 - 57 * 41 )/(sqrt(100 * 133 - (57)^2) * sqrt(100 * 111 - (41)^2)`
`=(3100 - 2337)/(sqrt(13300 - 3249) * sqrt(11100 - 1681))`
`=763/( sqrt(10051) * sqrt(9419))`
`=763/( 100.2547 * 97.0515)`
`=763/9729.8699`
`=0.0784`
Correlation Coefficient r with Population Cov(x,y) :
Population `Cov(x,y) = (sum fdxdy - (sum fdx * sum fdy)/n)/(n)`
`=(31 - (57 xx 41)/100)/100`
`=(31 - (2337)/100)/100`
`=(31 - 23.37)/100`
`=(7.63)/100`
`=0.0763`
Population Standard deviation `sigma_x = sqrt((sum fdx^2 - (sum fdx)^2/n)/(n))`
`=sqrt((133 - (57)^2/100)/100)`
`=sqrt((133 - 32.49)/100)`
`=sqrt(100.51/100)`
`=sqrt(1.0051)`
`=1.0025`
Population Standard deviation `sigma_y = sqrt((sum fdy^2 - (sum fdy)^2/n)/(n))`
`=sqrt((111 - (41)^2/100)/100)`
`=sqrt((111 - 16.81)/100)`
`=sqrt(94.19/100)`
`=sqrt(0.9419)`
`=0.9705`
Now, `r = (cov(x,y))/(sigma_x * sigma_y)`
`= (0.0763)/(1.0025 * 0.9705)`
`=0.0784`
Correlation Coefficient r with Sample Cov(x,y) :
Sample `Cov(x,y) = (sum fdxdy - (sum fdx * sum fdy)/n)/(n-1)`
`=(31 - (57 xx 41)/100)/99`
`=(31 - (2337)/100)/99`
`=(31 - 23.37)/99`
`=(7.63)/99`
`=0.0771`
Sample Standard deviation `sigma_x = sqrt((sum fdx^2 - (sum fdx)^2/n)/(n-1))`
`=sqrt((133 - (57)^2/100)/99)`
`=sqrt((133 - 32.49)/99)`
`=sqrt(100.51/99)`
`=sqrt(1.0153)`
`=1.0076`
Sample Standard deviation `sigma_y = sqrt((sum fdy^2 - (sum fdy)^2/n)/(n-1))`
`=sqrt((111 - (41)^2/100)/99)`
`=sqrt((111 - 16.81)/99)`
`=sqrt(94.19/99)`
`=sqrt(0.9514)`
`=0.9754`
Now, `r = (cov(x,y))/(sigma_x * sigma_y)`
`= (0.0771)/(1.0076 * 0.9754)`
`=0.0784`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then