@ Override public double getStdDev ( ) { // two-pass algorithm for variance, avoids numeric overflow if ( values . length <= 1 ) { return 0 ; } final double mean = getMean ( ) ; double sum = 0 ; for ( long value : values ) { final double diff = value - mean ; sum += diff * diff ; } final double variance = sum / ( values . length - 1 ) ; return Math . sqrt ( variance ) ; }
Returns the standard deviation of the values in the snapshot .