Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
STD() function (standard deviation)
Message
 
To
17/05/2006 07:50:56
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01122614
Message ID:
01122671
Views:
27
Carlos,

AFAIK, there are several STDEV functions in Excel.
And they can be calculated from each other if you wish.

FoxPro STD() function is the same as STDEVP() Excel function. You may check it with, say:
clear
Dime atemp(500)
FOR ia=1 TO ALEN(atemp)
	atemp[ia] = 1000+ia
ENDFOR

oExcel= CREATEOBJECT("Excel.Application")
?ROUND(oExcel.Application.STDEV(@atemp),8)	
?ROUND(oExcel.Application.STDEVP(@atemp),8)
oExcel.quit
oExcel=.NULL.
release oExcel

CREATE CURSOR ctemp (fldn n(4))
FOR ia=1 TO ALEN(atemp)
     INSERT INTO CTEMP VALUES (atemp[ia])
endfor
SET DECIMALS TO 9
CALCULATE std(fldn) TO ln
?ROUND(ln,8)   && as STDEVP Excel function
?ROUND(ln*SQRT(ALEN(Atemp)/(ALEN(atemp)-1)),8)  && as STDEV Excel function

set deci to 2
>The std() (standard deviation) function is returning a value different from Excel when calculating over the same set o values.
>
>Do someone know about this?
>
>Hope you can help.
>
>Carlos Henrique
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform