>I have done calculation by hand using both of the formulas for Std Deviation, (n, and n-1, also known as biased, and non-bias. In Excel, known as StDev, and StDevP,) and neither match the answer that Fox produces.
>
>I have done the calculations using just the formulas, and Excel seems to produce the right answers.
>
>So is this a FoxPro bug or what?
>
>Greg
I got the same results from VFP and Excel as follows. I used sample data 1;2;4 (the result I got was 1.2472). In VFP, I put the data into a table (three records), and used
CALCULATE std(MyField).
In Excel, I used the formula which in Spanish appears as desvestp(), on the range of three cells. I guess this is the function StDevP, but I am not sure. If it isn't, please try the other "standard deviation" formulae in Excel, on the above sample data.
So no, I don't think this is a bug. It is simply that VFP provides only one definition of the standard deviation. If you need the other definition, you must create a UDF or something similar for that purpose.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)