Here you can find the source of min_max_mean_stddev(long[] counts)
public static double[] min_max_mean_stddev(long[] counts)
//package com.java2s; //License from project: Apache License public class Main { public static double[] min_max_mean_stddev(long[] counts) { double min = Float.MAX_VALUE; double max = Float.MIN_VALUE; double mean = 0; for (long tmp : counts) { min = Math.min(tmp, min); max = Math.max(tmp, max); mean += tmp;/*from ww w . ja va2 s . c om*/ } mean /= counts.length; double stddev = 0; for (long tmp : counts) { stddev += Math.pow(tmp - mean, 2); } stddev /= counts.length; stddev = Math.sqrt(stddev); return new double[] { min, max, mean, stddev }; } }