dbTalk Databases Forums  

Standard deviation calculation

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Standard deviation calculation in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tarana halsall via SQLMonster.com
 
Posts: n/a

Default Standard deviation calculation - 05-16-2005 , 06:23 AM






Based on an earlier post, I am using the below method to calculate standard
deviation.

load in a simple SUM measure (x) - the sum of fact column (aggregated in
the cube)
load in a simple SUM measure of x squared (x2) - sum of square of fact
column (aggregated in the cube)
load in a counter called cnt - count of a fact column (aggregated in the
cube)

((x2 - ((x^2)/cnt))/cnt)^0.5

But this result is different from what I get with the excel stdev funtion.
Have I got the above formula wrong?

thanks in advance

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #2  
Old   
SQL McOLAP
 
Posts: n/a

Default RE: Standard deviation calculation - 05-16-2005 , 07:44 AM






I'm not sure what was stated earlier in whichever post you were refering to,
but is there a reason why you can't use the native STDDEV() MDX function?

"tarana halsall via SQLMonster.com" wrote:

Quote:
Based on an earlier post, I am using the below method to calculate standard
deviation.

load in a simple SUM measure (x) - the sum of fact column (aggregated in
the cube)
load in a simple SUM measure of x squared (x2) - sum of square of fact
column (aggregated in the cube)
load in a counter called cnt - count of a fact column (aggregated in the
cube)

((x2 - ((x^2)/cnt))/cnt)^0.5

But this result is different from what I get with the excel stdev funtion.
Have I got the above formula wrong?

thanks in advance

--
Message posted via http://www.sqlmonster.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.