Java Utililty Methods List std

List of utility methods to do List std

Description

The list of methods to do List std are organized into topic(s).

Method

DoublecalculateStandardDeviation(List doubleList)
calculate Standard Deviation
if (doubleList.size() > 1) {
    double mean = calculateMeanOfArrayListDouble(doubleList);
    double sumOfSquaredResiduals = 0;
    for (double a : doubleList) {
        double residual = mean - a;
        sumOfSquaredResiduals += Math.pow(residual, 2);
    return Math.sqrt(sumOfSquaredResiduals / (doubleList.size() - 1));
...
doublegetStandardDeviation(List data)
get Standard Deviation
double mean = 0;
final int n = data.size();
if (n < 2) {
    return Double.NaN;
for (int i = 0; i < n; i++) {
    mean += data.get(i);
mean /= n;
double sum = 0;
for (int i = 0; i < n; i++) {
    final double v = data.get(i) - mean;
    sum += v * v;
return Math.sqrt(sum / (n - 1));
doublegetStandardDeviation(List list)
get Standard Deviation
return Math.sqrt(getVariance(list));
doublegetStandardDeviation(List values)
get Standard Deviation
double sum = 0;
double avg = getAverage(values);
for (double d : values)
    sum += (d - avg) * (d - avg);
return Math.sqrt(sum / values.size());
doublegetStdDeviation(List numbers)
get Std Deviation
return getStdDeviation(numbers, getAverage(numbers));
doublestandardDeviation(List data)
Calculate standard deviation of the array
return Math.sqrt(variance(data));
doublestandardDeviation(List values)
standard Deviation
double sum = 0;
double mean = mean(values);
for (Double val : values) {
    sum += Math.pow(val - mean, 2);
return Math.sqrt(sum / values.size());
doublestandardDeviation(List list)
Calculates the standard deviation of the numbers in the list.
float avg = 0f;
for (int i : list)
    avg += i;
avg /= list.size();
float var = 0f;
for (int i : list)
    var += (i - avg) * (i - avg);
var /= list.size();
...
doublestandardDeviation(List values, double xbar)
standard Deviation
double N = (double) values.size();
double dev2 = 0.0;
for (Short v : values) {
    dev2 += Math.pow((double) v - xbar, 2);
return Math.pow(dev2 / (N), 0.5);
doublestandardDeviationDouble(List list, boolean populationStandardDeviation)
Standard deviation double.
if (populationStandardDeviation) {
    return Math.sqrt(varianceDouble(list, populationStandardDeviation));
return Math.sqrt(varianceDouble(list, populationStandardDeviation));