ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   correlation function (https://www.excelbanter.com/excel-discussion-misc-queries/168627-correlation-function.html)

leopons_rock

correlation function
 
why does correl(x,y) NOT equal covar(x,y)/stdev(x)*stdev(y) in excel??!

Mike Middleton

correlation function
 
leopons_rock -

Excel's Help shows the formulas for each function.

CORREL uses n, COVAR uses n, and STDEV uses n-1, where n is the sample size.

CORREL(x,y) does equal COVAR(x,y)/(STDEVP(x)*STDEVP(y)).

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel


"leopons_rock" wrote in message
...

why does correl(x,y) NOT equal covar(x,y)/stdev(x)*stdev(y) in excel??!




Dana DeLouis

correlation function
 
Hi. A math program showed Covar using a poplulation size.( ie n-1, not n)
In other words, if the size is 4, then it divided by 3.
So, with n=4 data points, try muliplying by n/(n-1)
Make sure you use ( ) around the denominator also.
(Not always perfect, but I trust math programs much more than Excel.)

=CORREL(y,x)=COVAR(x,y)/(STDEV(x)*STDEV(y))*4/3

- TRUE

HTH
Dana DeLouis


"leopons_rock" wrote in message
...
why does correl(x,y) NOT equal covar(x,y)/stdev(x)*stdev(y) in excel??!




Dana DeLouis

correlation function
 
STDEVP(x)*STDEVP(y)

Well, duh! Thanks !! :~

Dana


"Mike Middleton" wrote in message
...
leopons_rock -

Excel's Help shows the formulas for each function.

CORREL uses n, COVAR uses n, and STDEV uses n-1, where n is the sample
size.

CORREL(x,y) does equal COVAR(x,y)/(STDEVP(x)*STDEVP(y)).

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel


"leopons_rock" wrote in message
...

why does correl(x,y) NOT equal covar(x,y)/stdev(x)*stdev(y) in excel??!







All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com