Here you can find the source of stddev(float[] data)
public static double stddev(float[] data)
//package com.java2s; //License from project: LGPL public class Main { public static double stddev(float[] data) { 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;/*w w w . jav a 2s. c o m*/ return Math.sqrt(d); } public static double mean(float[] data) { double d = 0; for (int i = 0; i < data.length; i++) d += data[i]; return d / data.length; } }