Here you can find the source of computeStdDev(double[] results, double mean)
public static double computeStdDev(double[] results, double mean)
//package com.java2s; /*// w w w.ja v a 2s . co m * This file is part of an unofficial ISO20008-2.2 sample implementation to * evaluate certain schemes for their applicability on Android-based mobile * devices. The source is licensed under the modified 3-clause BSD license, * see the readme. * * The code was published in conjunction with the publication called * "Group Signatures on Mobile Devices: Practical Experiences" by * Potzmader, Winter, Hein, Hanser, Teufl and Chen */ public class Main { public static double computeStdDev(double[] results, double mean) { double stddev = 0; for (double single : results) stddev += (mean - single) * (mean - single); stddev = Math.sqrt(stddev / results.length); return stddev; } }