Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate STD() vs. Excel STDEV() function
Message
From
02/09/2002 08:32:48
 
 
To
02/09/2002 08:26:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00695910
Message ID:
00695918
Views:
13
>>Dear All,
>>
>>My client wants to have a standard deviation calculated on his report.
>>The problem is that CALCULATE STD() gives different result with FoxPro than the equivalent STDEV() in Excel.
>>
>>For example: group of 10 numbers 1345,1301,1368,1322,1310,1370,1318,1350,1303,1299 listed in a table gives 26.05456 in FoxPro and 27.46 in Excel.
>>
>>I think I need to go back to school, or maybe I am missing something, because the AVG() FoxPro function and AVERAGE() Excel function are giving me exactly the same result.
>>
>>Any miracles?
>>
>>Thanks
>>
>>Jonathan
>
>Excel: "Assume that the numbers provided are a sample of the total population". VFP: "Assume that the numbers provided are the total population". The statistical formulae are different. Excel also has a formulat for the total population, which gives exactly the same answer you mention for VFP. I won't give the formula here, since the names of formulae in Spanish Excel are different. Just search Excel for statistical functions.
>
>As for how exactly this is calculated, well, I would have to check textbooks on statistics as well. I seem to remember that the difference between the two results involves a factor which can either be "n" or "n-1" (or was it "n+1"?), depending on whether you work with the total population or with a sample.
>
>HTH, Hilmar.

Hilmar is right.

The formula in excel is STDEVPA(). Foxpro is assuming the data supplied is the universe, as opposed to the standard function in Excel which assumes that the data is just a sample. I think this is because, unlike fox, excel can only perform stdev on 30 values.

Mace
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform