Formula
1. `r = (n * sum xy - sum x * sum y)/(sqrt(n * sum x^2 - (sum x)^2) * sqrt(n * sum y^2 - (sum y)^2))`
|
2. `r = (sum XY)/(sqrt(sum X^2) * sqrt(sum Y^2))`
|
3. `r = (n * sum dxdy - sum dx * sum dy)/( sqrt(n * sum dx^2 - (sum dx)^2) * sqrt(n * sum dy^2 - (sum dy)^2))`
|
4. Population `Cov(x,y)`
1. Population `Cov(x,y) = (sum (x-bar x)(y-bar y))/(n)`
2. Population `Cov(x,y) = (sum dxdy - (sum dx * sum dy)/n)/(n)`
3. Population `Cov(x,y) = (sum xy - (sum x * sum y)/n)/(n)`
|
5. Sample `Cov(x,y)`
1. Sample `Cov(x,y) = (sum (x-bar x)(y-bar y))/(n-1)`
2. Sample `Cov(x,y) = (sum dxdy - (sum dx * sum dy)/n)/(n-1)`
3. Sample `Cov(x,y) = (sum xy - (sum x * sum y)/n)/(n-1)`
|
Examples
1. Calculate Population cov(x,y), Sample cov(x,y) from the following data
Class-X | Y |
2 - 4 | 3 |
4 - 6 | 4 |
6 - 8 | 2 |
8 - 10 | 1 |
Solution:
Class-X | Mid value `x` | `y` | `x*y` |
2-4 | 3 | 3 | 9 |
4-6 | 5 | 4 | 20 |
6-8 | 7 | 2 | 14 |
8-10 | 9 | 1 | 9 |
--- | --- | --- | --- |
| `sum x=24` | `sum y=10` | `sum xy=52` |
Population Cov(x,y) :
Population `Cov(x,y) = (sum xy - (sum x * sum y)/n)/(n)`
`=(52 - (24 xx 10)/4)/4`
`=(52 - (240)/4)/4`
`=(52 - 60)/4`
`=(-8)/4`
`=-2`
Sample Cov(x,y) :
Sample `Cov(x,y) = (sum xy - (sum x * sum y)/n)/(n-1)`
`=(52 - (24 xx 10)/4)/3`
`=(52 - (240)/4)/3`
`=(52 - 60)/3`
`=(-8)/3`
`=-2.6667`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then