public static double standardDeviation ( double [ ] x , double mean ) { if ( x . length == 0 ) { return Double . NaN ; } if ( x . length == 1 ) { return 0.0 ; } return Math . sqrt ( variance ( x , mean ) ) ; }
Computes the standard deviation of the vector using the given mean