public class Statistics extends Object
double
values.Modifier | Constructor | Description |
---|---|---|
private |
Statistics() |
Modifier and Type | Method | 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 determinedIllegalArgumentException
- 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 usedIllegalArgumentException
- if the array has not at least one elementpublic static double computeStandardDeviation(double[] values)
values
- array from which elements are readIllegalArgumentException
- 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[])
.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]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 elementsIllegalArgumentException
- if the array has not at least two elementspublic static double computeVariance(double[] values)
values
- array from which elements are readIllegalArgumentException
- 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 elementsIllegalArgumentException
- 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]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 elementsIllegalArgumentException
- if the array has not at least two elements