Standard Deviation Population?

I need to rewrite the SQL Server's functionSTDEVP in Java. I did the normal standarddeviation (STDEV) as it is widely described on the net:

/**

* Get the standard deviation of a list of numbers.

*

* @param numbers List of numbers.

* @return Standard deviation of <i>numbers</i>.

*/

staticpublicdouble getStandardDeviation(final List<Number> numbers){

double result = 0.0;

if (numbers !=null && numbers.size() > 0){

int count = 0;

double sum = 0.0;

double sumSquare = 0.0;

for (final Number n : numbers){//for each number

count++;

sum += n.doubleValue();

sumSquare += n.doubleValue() * n.doubleValue();

}//next number

finaldouble average = sum / count;

result = Math.sqrt((sumSquare / count) - (average * average));

}

return result;

}//getStandardDeviation()

But how does this "population" version differ from the standard version?

[1804 byte] By [MartinHilperta] at [2007-11-27 3:33:29]
# 1
Oh man, I just found out that this STDEV is just a guess! And the STDEVP is the reall function that takes all numbers into account. Microsoft is so shitty ... :-(
MartinHilperta at 2007-7-12 8:36:35 > top of Java-index,Other Topics,Algorithms...
# 2

I think you need to look more closely at the definition of standard deviation. When you say that STDEV is "a guess", do you mean that it's the Sample Standard Deviation, which is an estimator of the Population Standard Deviation?

This has nothing to do with Microsoft but with statistics itself.

Try Google for something like "population standard deviation".

smarsha at 2007-7-12 8:36:35 > top of Java-index,Other Topics,Algorithms...