Java List std standardDeviation(List values)

Here you can find the source of standardDeviation(List values)

Description

standard Deviation

License

Open Source License

Declaration

public static double standardDeviation(List<Double> values) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static double standardDeviation(List<Double> values) {
        double sum = 0;
        double mean = mean(values);

        for (Double val : values) {
            sum += Math.pow(val - mean, 2);
        }//from w ww .ja  v a2  s.c o m
        return Math.sqrt(sum / values.size());
    }

    public static double mean(List<Double> values) {
        double sum = 0;
        for (Double val : values) {
            sum += val;
        }
        return sum / values.size();
    }
}

Related

  1. getStandardDeviation(List data)
  2. getStandardDeviation(List list)
  3. getStandardDeviation(List values)
  4. getStdDeviation(List numbers)
  5. standardDeviation(List data)
  6. standardDeviation(List list)
  7. standardDeviation(List values, double xbar)
  8. standardDeviationDouble(List list, boolean populationStandardDeviation)
  9. std(List iNumbers)