List of utility methods to do stddev
double | stddev(double[] observations) stddev return Math.sqrt(variance(observations));
|
double | stddev(final double[] in, final int start, final int length) Calculate the (population) standard deviation of an array of doubles. return stddev(in, start, length, mean(in, start, length));
|
float | stddev(final int[] scores) stddev if (scores.length == 0) { return 0f; final float v = variance(scores); return (float) Math.sqrt(v); |
double | stddev(float[] data) stddev double d = 0; float mn = (float) mean(data); for (int i = 0; i < data.length; i++) d += (data[i] - mn) * (data[i] - mn); d /= data.length; return Math.sqrt(d); |
float[] | stddev(int[] values, int start, int length) Computes the standard deviation of the supplied values. float mean = 0f; for (int ii = start, end = start + length; ii < end; ii++) { mean += values[ii]; mean /= length; float variance = 0f; for (int ii = start, end = start + length; ii < end; ii++) { float value = values[ii] - mean; ... |
Double | stdDev(Integer[] values) std Dev Double variance = variance(values); if (variance == null) { return null; return Math.sqrt(variance.doubleValue()); |
double | stddev(long[] samples) stddev double avg = average(samples); double result = 0; for (long sample : samples) { result += (sample - avg) * (sample - avg); result /= samples.length; return Math.sqrt(result); |
double | stddev(Number[] array, boolean isSample) Returns the std deviation of the given array. double result; double mean; int i; if (array.length == 0) return Double.NaN; result = 0; mean = mean(array); for (i = 0; i < array.length; i++) ... |
double | stdDev(T[] array) Returns the population standard deviation of the given values. double[] temp = new double[array.length]; for (int i = 0; i < array.length; i++) { temp[i] = array[i].doubleValue(); return stdDev(temp); |
double | stdDeviation(int[] data) Returns standard deviation of array of ints double mean = mean(data); double sum = 0; for (int i = 0; i < data.length; i++) { sum += Math.pow(data[i] - mean, 2); return Math.sqrt((sum) / (data.length - 1)); |