public class Statistics
extends java.lang.Object
double
values.Modifier | Constructor and Description |
---|---|
private |
Statistics() |
Modifier and Type | Method and Description |
---|---|
static double |
computeMean(double[] values)
Computes the mean value for the argument array.
|
static double |
computeMean(double[] values,
int offset,
int number)
Computes the mean value for some elements of the argument array.
|
static double |
computeStandardDeviation(double[] values)
Computes the standard deviation for the argument array of values.
|
static double |
computeStandardDeviation(double[] values,
double mean)
Computes the standard deviation for the argument array of values.
|
static double |
computeStandardDeviation(double[] values,
int offset,
int number)
Computes the standard deviation for some of the argument array's values.
|
static double |
computeStandardDeviation(double[] values,
int offset,
int number,
double mean)
Computes the standard deviation for some of the argument array's values.
|
static double |
computeVariance(double[] values)
Computes the variance for the argument array.
|
static double |
computeVariance(double[] values,
double mean)
Computes the variance for some of the argument array's values.
|
static double |
computeVariance(double[] values,
int offset,
int number)
Computes the variance for some of the argument array's values.
|
static double |
computeVariance(double[] values,
int offset,
int number,
double mean)
Computes the variance for some of the argument array's values.
|
public static double computeMean(double[] values)
values
- double array on which the mean is to be determinedjava.lang.IllegalArgumentException
- if the array has not at least one elementpublic static double computeMean(double[] values, int offset, int number)
values
- array from which elements are readoffset
- index of the first element to be usednumber
- number of elements to be usedjava.lang.IllegalArgumentException
- if the array has not at least one elementpublic static double computeStandardDeviation(double[] values)
values
- array from which elements are readjava.lang.IllegalArgumentException
- if the array has not at least two elementspublic static double computeStandardDeviation(double[] values, double mean)
values
- array from which elements are readmean
- the mean value for the array, possibly computed with a
call to computeMean(double[])
.java.lang.IllegalArgumentException
- if the array has not at least two elementspublic static double computeStandardDeviation(double[] values, int offset, int number)
computeMean(double[], int, int)
,
better call computeStandardDeviation(double[], int, int, double)
.
Otherwise, this method has to compute mean again.values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting at values[offset]java.lang.IllegalArgumentException
- if the array has not at least two elementspublic static double computeStandardDeviation(double[] values, int offset, int number, double mean)
values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting at values[offset]mean
- value of the elementsjava.lang.IllegalArgumentException
- if the array has not at least two elementspublic static double computeVariance(double[] values)
values
- array from which elements are readjava.lang.IllegalArgumentException
- if the array has not at least two elementspublic static double computeVariance(double[] values, double mean)
values
- array from which elements are readmean
- the mean for the array elementsjava.lang.IllegalArgumentException
- if the array has not at least two elementspublic static double computeVariance(double[] values, int offset, int number)
computeMean(double[], int, int)
,
better call computeVariance(double[], int, int, double)
.
Otherwise, this method has to compute mean again.values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting at values[offset]java.lang.IllegalArgumentException
- if the array has not at least two elementspublic static double computeVariance(double[] values, int offset, int number, double mean)
values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting at values[offset]mean
- the mean for the array elementsjava.lang.IllegalArgumentException
- if the array has not at least two elements