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
Y Class-X | 18 | 19 | 20 | 21 |
350 - 400 | 1 | 4 | 6 | 10 |
300 - 350 | 2 | 6 | 8 | 5 |
250 - 300 | 3 | 5 | 4 | 2 |
200 - 250 | 4 | 4 | 2 | 1 |
Solution:
| | | | | | | | | | |
| | M.V.`(y)` | 18 | 19 | 20 | 21 | | | | |
C.I.`(x)` | M.V.`(x)` | `dy` `dx` | -1 | 0 | 1 | 2 | `f_x` | `fdx` | `fdx^2` | `fdxdy` |
350 - 400 | 375 | 1 | [-1]1 | [0]4 | [6]6 | [20]10 | 21 | 21 | 21 | 25 |
300 - 350 | 325 | 0 | [0]2 | [0]6 | [0]8 | [0]5 | 21 | 0 | 0 | 0 |
250 - 300 | 275 | -1 | [3]3 | [0]5 | [-4]4 | [-4]2 | 14 | -14 | 14 | -5 |
200 - 250 | 225 | -2 | [8]4 | [0]4 | [-4]2 | [-4]1 | 11 | -22 | 44 | 0 |
| | `f_y` | 10 | 19 | 20 | 18 | 67 | -15 | 79 | 20 |
| | `fdy` | -10 | 0 | 20 | 36 | 46 | | | |
| | `fdy^2` | 10 | 0 | 20 | 72 | 102 | | | |
| | `fdxdy` | 10 | 0 | -2 | 12 | 20 | | | |
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))`
`=(67 * 20 - -15 * 46 )/(sqrt(67 * 79 - (-15)^2) * sqrt(67 * 102 - (46)^2)`
`=(1340 + 690)/(sqrt(5293 - 225) * sqrt(6834 - 2116))`
`=2030/( sqrt(5068) * sqrt(4718))`
`=2030/( 71.1899 * 68.6877)`
`=2030/4889.8695`
`=0.4151`
Correlation Coefficient r with Population Cov(x,y) :
Population `Cov(x,y) = (sum fdxdy - (sum fdx * sum fdy)/n)/(n)`
`=(20 - (-15 xx 46)/67)/67`
`=(20 - (-690)/67)/67`
`=(20 - -10.2985)/67`
`=(30.2985)/67`
`=0.4522`
Population Standard deviation `sigma_x = sqrt((sum fdx^2 - (sum fdx)^2/n)/(n))`
`=sqrt((79 - (-15)^2/67)/67)`
`=sqrt((79 - 3.3582)/67)`
`=sqrt(75.6418/67)`
`=sqrt(1.129)`
`=1.0625`
Population Standard deviation `sigma_y = sqrt((sum fdy^2 - (sum fdy)^2/n)/(n))`
`=sqrt((102 - (46)^2/67)/67)`
`=sqrt((102 - 31.5821)/67)`
`=sqrt(70.4179/67)`
`=sqrt(1.051)`
`=1.0252`
Now, `r = (cov(x,y))/(sigma_x * sigma_y)`
`= (0.4522)/(1.0625 * 1.0252)`
`=0.4151`
Correlation Coefficient r with Sample Cov(x,y) :
Sample `Cov(x,y) = (sum fdxdy - (sum fdx * sum fdy)/n)/(n-1)`
`=(20 - (-15 xx 46)/67)/66`
`=(20 - (-690)/67)/66`
`=(20 - -10.2985)/66`
`=(30.2985)/66`
`=0.4591`
Sample Standard deviation `sigma_x = sqrt((sum fdx^2 - (sum fdx)^2/n)/(n-1))`
`=sqrt((79 - (-15)^2/67)/66)`
`=sqrt((79 - 3.3582)/66)`
`=sqrt(75.6418/66)`
`=sqrt(1.1461)`
`=1.0706`
Sample Standard deviation `sigma_y = sqrt((sum fdy^2 - (sum fdy)^2/n)/(n-1))`
`=sqrt((102 - (46)^2/67)/66)`
`=sqrt((102 - 31.5821)/66)`
`=sqrt(70.4179/66)`
`=sqrt(1.0669)`
`=1.0329`
Now, `r = (cov(x,y))/(sigma_x * sigma_y)`
`= (0.4591)/(1.0706 * 1.0329)`
`=0.4151`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then