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
3. Calculate Population cov(x,y), Sample cov(x,y) from the following data
Solution:
`x` | `y` | `x*y` |
3 | 9 | 27 |
4 | 11 | 44 |
6 | 14 | 84 |
7 | 15 | 105 |
10 | 16 | 160 |
--- | --- | --- |
`sum x=30` | `sum y=65` | `sum xy=420` |
Population Cov(x,y) :
Population `Cov(x,y) = (sum xy - (sum x * sum y)/n)/(n)`
`=(420 - (30 xx 65)/5)/5`
`=(420 - (1950)/5)/5`
`=(420 - 390)/5`
`=(30)/5`
`=6`
Sample Cov(x,y) :
Sample `Cov(x,y) = (sum xy - (sum x * sum y)/n)/(n-1)`
`=(420 - (30 xx 65)/5)/4`
`=(420 - (1950)/5)/4`
`=(420 - 390)/4`
`=(30)/4`
`=7.5`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then