Home > Statistical Methods calculators > Pearson's Correlation Coefficient example

1. Pearson's Correlation Coefficient example ( Enter your problem )
  1. Formula & Example-1 (Class-X & Y)
  2. Example-2 (Class-X & Y)
  3. Example-3 (X & Y)
  4. Example-4 (X & Y)
Other related methods
  1. Correlation Coefficient r
  2. Covariance - Population Covariance, Sample Covariance

2. Example-2 (Class-X & Y)
(Next example)

1. Formula & Example-1 (Class-X & Y)





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 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-XY
2 - 43
4 - 64
6 - 82
8 - 101


Solution:
Class-XMid value `x``y``x^2``y^2``x*y`
2-433999
4-654251620
6-87249414
8-10918119
------------------
`sum x=24``sum y=10``sum x^2=164``sum y^2=30``sum xy=52`


Correlation Coefficient r :
`r = (n * sum xy - sum x * sum y)/(sqrt(n * sum x^2 - (sum x)^2) * sqrt(n * sum y^2 - (sum y)^2))`

`=(4 * 52 - 24 * 10 )/(sqrt(4 * 164 - (24)^2) * sqrt(4 * 30 - (10)^2)`

`=(208 - 240)/(sqrt(656 - 576) * sqrt(120 - 100))`

`=-32/( sqrt(80) * sqrt(20))`

`=-32/( 8.9443 * 4.4721)`

`=-32/40`

`=-0.8`




Correlation Coefficient r with 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`


Population Standard deviation `sigma_x = sqrt((sum x^2 - (sum x)^2/n)/(n))`

`=sqrt((164 - (24)^2/4)/4)`

`=sqrt((164 - 144)/4)`

`=sqrt(20/4)`

`=sqrt(5)`

`=2.2361`

Population Standard deviation `sigma_y = sqrt((sum y^2 - (sum y)^2/n)/(n))`

`=sqrt((30 - (10)^2/4)/4)`

`=sqrt((30 - 25)/4)`

`=sqrt(5/4)`

`=sqrt(1.25)`

`=1.118`

Now, `r = (cov(x,y))/(sigma_x * sigma_y)`

`= (-2)/(2.2361 * 1.118)`

`=-0.8`




Correlation Coefficient r with 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`


Sample Standard deviation `sigma_x = sqrt((sum x^2 - (sum x)^2/n)/(n-1))`

`=sqrt((164 - (24)^2/4)/3)`

`=sqrt((164 - 144)/3)`

`=sqrt(20/3)`

`=sqrt(6.6667)`

`=2.582`

Sample Standard deviation `sigma_y = sqrt((sum y^2 - (sum y)^2/n)/(n-1))`

`=sqrt((30 - (10)^2/4)/3)`

`=sqrt((30 - 25)/3)`

`=sqrt(5/3)`

`=sqrt(1.6667)`

`=1.291`

Now, `r = (cov(x,y))/(sigma_x * sigma_y)`

`= (-2.6667)/(2.582 * 1.291)`

`=-0.8`




This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



2. Example-2 (Class-X & Y)
(Next example)





Share this solution or page with your friends.


 
Copyright © 2024. All rights reserved. Terms, Privacy
 
 

.