stdDev method
Returns the corrected standard deviation of the list elements.
- The list must have at least two elements.
Implementation
double stdDev() {
mustHaveMinLength(2);
final mean = this.mean();
double sum = 0.0;
final it = iterator;
while (it.moveNext()) {
sum += math.pow(mean - it.current, 2);
}
return math.sqrt(sum / (length - 1));
}