|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.util.Statistics
public class Statistics
A number of static methods to compute statistical properties of an
array of double values.
Implements the computation of mean, variance and standard deviation
for double
values.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double computeMean(double[] values)
values
- double array on which the mean is to be determined
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 used
IllegalArgumentException
- if the array has not at least one elementpublic static double computeStandardDeviation(double[] values)
values
- array from which elements are read
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[])
.
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 elements
IllegalArgumentException
- if the array has not at least two elementspublic static double computeVariance(double[] values)
values
- array from which elements are read
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 elements
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]
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 elements
IllegalArgumentException
- if the array has not at least two elements
|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |