| Modifier and Type | Field and Description |
|---|---|
| private static final GeometricMean | GEOMETRIC_MEAN
geometric mean |
| private static final UnivariateStatistic | MAX
max |
| private static final UnivariateStatistic | MEAN
mean |
| private static final UnivariateStatistic | MIN
min |
| private static final Percentile | PERCENTILE
percentile |
| private static final UnivariateStatistic | PRODUCT
prod |
| private static final UnivariateStatistic | SUM
sum |
| private static final UnivariateStatistic | SUM_OF_LOGS
sumLog |
| private static final UnivariateStatistic | SUM_OF_SQUARES
sumSq |
| private static final Variance | VARIANCE
variance |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static double | Returns: the geometric mean of the values or Double.NaN if the array is emptythe input array values)Returns the geometric mean of the entries in the input array, or
|
| public static double | Returns: the geometric mean of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the geometric mean of the entries in the specified portion of
the input array, or |
| private static double[] | Returns: array of array of the most frequently occurring element(s) sorted in ascending order.input data values, final int index (0-based) of the first array element to include begin, final int the number of elements to include length)Private helper method. |
| public static double | Returns: the maximum of the values or Double.NaN if the array is emptythe input array values)Returns the maximum of the entries in the input array, or
|
| public static double | Returns: the maximum of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the maximum of the entries in the specified portion of
the input array, or |
| public static double | Returns: the mean of the values or Double.NaN if the array is emptythe input array values)Returns the arithmetic mean of the entries in the input array, or
|
| public static double | Returns: the mean of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the arithmetic mean of the entries in the specified portion of
the input array, or |
| public static double | Returns: mean of paired differencesthe first array sample1, final double[] the second array sample2)Returns the mean of the (signed) differences between corresponding elements of the input arrays -- i.e., sum(sample1[i] - sample2[i]) / sample1.length. |
| public static double | Returns: the minimum of the values or Double.NaN if the array is emptythe input array values)Returns the minimum of the entries in the input array, or
|
| public static double | Returns: the minimum of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the minimum of the entries in the specified portion of
the input array, or |
| public static double[] | Returns: array of array of the most frequently occurring element(s) sorted in ascending order.input data sample)Returns the sample mode(s). |
| public static double[] | Returns: array of array of the most frequently occurring element(s) sorted in ascending order.input data sample, final int index (0-based) of the first array element to include begin, final int the number of elements to include length)Returns the sample mode(s). |
| public static double[] | Returns: normalized (standardized) sample.Sample to normalize. sample)Normalize (standardize) the sample, so it is has a mean of 0 and a standard deviation of 1. |
| public static double | Returns: the percentile value or Double.NaN if the array is emptyinput array of values values, final double the percentile value to compute p)Returns an estimate of the |
| public static double | Returns: the percentile valuearray of input values values, final int the first (0-based) element to include in the computation begin, final int the number of array elements to include length, final double the percentile to compute p)Returns an estimate of the |
| public static double | Returns: the population variance of the values or Double.NaN if the array is emptythe input array values)Returns the
population variance of the entries in the input array, or
|
| public static double | Returns: the population variance of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the
population variance of the entries in the specified portion of
the input array, or |
| public static double | Returns: the population variance of the values or Double.NaN if length = 0the input array values, final double the precomputed mean value mean, final int index of the first array element to include begin, final int the number of elements to include length)Returns the population variance of the entries in the specified portion of the input array, using the precomputed mean value. |
| public static double | Returns: the population variance of the values or Double.NaN if the array is emptythe input array values, final double the precomputed mean value mean)Returns the population variance of the entries in the input array, using the precomputed mean value. |
| public static double | Returns: the product of the values or Double.NaN if the array is emptythe input array values)Returns the product of the entries in the input array, or
|
| public static double | Returns: the product of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the product of the entries in the specified portion of
the input array, or |
| public static double | Returns: the sum of the values orDouble.NaN if the array
is emptyarray of values to sum values)Returns the sum of the values in the input array, or
|
| public static double | Returns: the sum of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the sum of the entries in the specified portion of
the input array, or |
| public static double | Returns: sum of paired differencesthe first array sample1, final double[] the second array sample2)Returns the sum of the (signed) differences between corresponding elements of the input arrays -- i.e., sum(sample1[i] - sample2[i]). |
| public static double | Returns: the sum of the natural logs of the values or Double.NaN if the array is emptythe input array values)Returns the sum of the natural logs of the entries in the input array, or
|
| public static double | Returns: the sum of the natural logs of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the sum of the natural logs of the entries in the specified portion of
the input array, or |
| public static double | Returns: the sum of the squared values orDouble.NaN if the
array is emptyinput array values)Returns the sum of the squares of the entries in the input array, or
|
| public static double | Returns: the sum of the squares of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the sum of the squares of the entries in the specified portion of
the input array, or |
| public static double | Returns: the variance of the values or Double.NaN if the array is emptythe input array values)Returns the variance of the entries in the input array, or
|
| public static double | Returns: the variance of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Returns the variance of the entries in the specified portion of
the input array, or |
| public static double | Returns: the variance of the values or Double.NaN if length = 0the input array values, final double the precomputed mean value mean, final int index of the first array element to include begin, final int the number of elements to include length)Returns the variance of the entries in the specified portion of the input array, using the precomputed mean value. |
| public static double | Returns: the variance of the values or Double.NaN if the array is emptythe input array values, final double the precomputed mean value mean)Returns the variance of the entries in the input array, using the precomputed mean value. |
| public static double | Returns: variance of paired differencesthe first array sample1, final double[] the second array sample2, double the mean difference between corresponding entries meanDifference)Returns the variance of the (signed) differences between corresponding elements of the input arrays -- i.e., var(sample1[i] - sample2[i]). |
| GEOMETRIC_MEAN | back to summary |
|---|---|
| private static final GeometricMean GEOMETRIC_MEAN geometric mean | |
| MAX | back to summary |
|---|---|
| private static final UnivariateStatistic MAX max | |
| MEAN | back to summary |
|---|---|
| private static final UnivariateStatistic MEAN mean | |
| MIN | back to summary |
|---|---|
| private static final UnivariateStatistic MIN min | |
| PERCENTILE | back to summary |
|---|---|
| private static final Percentile PERCENTILE percentile | |
| PRODUCT | back to summary |
|---|---|
| private static final UnivariateStatistic PRODUCT prod | |
| SUM | back to summary |
|---|---|
| private static final UnivariateStatistic SUM sum | |
| SUM_OF_LOGS | back to summary |
|---|---|
| private static final UnivariateStatistic SUM_OF_LOGS sumLog | |
| SUM_OF_SQUARES | back to summary |
|---|---|
| private static final UnivariateStatistic SUM_OF_SQUARES sumSq | |
| VARIANCE | back to summary |
|---|---|
| private static final Variance VARIANCE variance | |
| StatUtils | back to summary |
|---|---|
| private StatUtils() Private Constructor | |
| geometricMean | back to summary |
|---|---|
| public static double geometricMean(final double[] values) throws MathIllegalArgumentException Returns the geometric mean of the entries in the input array, or
Throws
See
| |
| geometricMean | back to summary |
|---|---|
| public static double geometricMean(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the geometric mean of the entries in the specified portion of
the input array, or
Throws
See
| |
| getMode | back to summary |
|---|---|
| private static double[] getMode(double[] values, final int begin, final int length) Private helper method. Assumes parameters have been validated.
| |
| max | back to summary |
|---|---|
| public static double max(final double[] values) throws MathIllegalArgumentException Returns the maximum of the entries in the input array, or
Throws
| |
| max | back to summary |
|---|---|
| public static double max(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the maximum of the entries in the specified portion of
the input array, or
Throws
| |
| mean | back to summary |
|---|---|
| public static double mean(final double[] values) throws MathIllegalArgumentException Returns the arithmetic mean of the entries in the input array, or
Throws
See
| |
| mean | back to summary |
|---|---|
| public static double mean(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the arithmetic mean of the entries in the specified portion of
the input array, or
Throws
See
| |
| meanDifference | back to summary |
|---|---|
| public static double meanDifference(final double[] sample1, final double[] sample2) throws DimensionMismatchException, NoDataException Returns the mean of the (signed) differences between corresponding elements of the input arrays -- i.e., sum(sample1[i] - sample2[i]) / sample1.length.
| |
| min | back to summary |
|---|---|
| public static double min(final double[] values) throws MathIllegalArgumentException Returns the minimum of the entries in the input array, or
Throws
| |
| min | back to summary |
|---|---|
| public static double min(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the minimum of the entries in the specified portion of
the input array, or
Throws
| |
| mode | back to summary |
|---|---|
| public static double[] mode(double[] sample) throws MathIllegalArgumentException Returns the sample mode(s). The mode is the most frequently occurring
value in the sample. If there is a unique value with maximum frequency,
this value is returned as the only element of the output array. Otherwise,
the returned array contains the maximum frequency elements in increasing
order. For example, if NaN values are ignored when computing the mode - i.e., NaNs will never appear in the output array. If the sample includes only NaNs or has length 0, an empty array is returned.
| |
| mode | back to summary |
|---|---|
| public static double[] mode(double[] sample, final int begin, final int length) Returns the sample mode(s). The mode is the most frequently occurring
value in the sample. If there is a unique value with maximum frequency,
this value is returned as the only element of the output array. Otherwise,
the returned array contains the maximum frequency elements in increasing
order. For example, if NaN values are ignored when computing the mode - i.e., NaNs will never appear in the output array. If the sample includes only NaNs or has length 0, an empty array is returned.
| |
| normalize | back to summary |
|---|---|
| public static double[] normalize(final double[] sample) Normalize (standardize) the sample, so it is has a mean of 0 and a standard deviation of 1.
| |
| percentile | back to summary |
|---|---|
| public static double percentile(final double[] values, final double p) throws MathIllegalArgumentException Returns an estimate of the
See
| |
| percentile | back to summary |
|---|---|
| public static double percentile(final double[] values, final int begin, final int length, final double p) throws MathIllegalArgumentException Returns an estimate of the
See
| |
| populationVariance | back to summary |
|---|---|
| public static double populationVariance(final double[] values) throws MathIllegalArgumentException Returns the
population variance of the entries in the input array, or
See Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| populationVariance | back to summary |
|---|---|
| public static double populationVariance(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the
population variance of the entries in the specified portion of
the input array, or
See Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| populationVariance | back to summary |
|---|---|
| public static double populationVariance(final double[] values, final double mean, final int begin, final int length) throws MathIllegalArgumentException Returns the
population variance of the entries in the specified portion of
the input array, using the precomputed mean value. Returns
See The formula used assumes that the supplied mean value is the arithmetic mean of the sample data, not a known population parameter. This method is supplied only to save computation when the mean has already been computed. Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| populationVariance | back to summary |
|---|---|
| public static double populationVariance(final double[] values, final double mean) throws MathIllegalArgumentException Returns the
population variance of the entries in the input array, using the
precomputed mean value. Returns
See The formula used assumes that the supplied mean value is the arithmetic mean of the sample data, not a known population parameter. This method is supplied only to save computation when the mean has already been computed. Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| product | back to summary |
|---|---|
| public static double product(final double[] values) throws MathIllegalArgumentException Returns the product of the entries in the input array, or
Throws
| |
| product | back to summary |
|---|---|
| public static double product(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the product of the entries in the specified portion of
the input array, or
Throws
| |
| sum | back to summary |
|---|---|
| public static double sum(final double[] values) throws MathIllegalArgumentException Returns the sum of the values in the input array, or
Throws
| |
| sum | back to summary |
|---|---|
| public static double sum(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the sum of the entries in the specified portion of
the input array, or
Throws
| |
| sumDifference | back to summary |
|---|---|
| public static double sumDifference(final double[] sample1, final double[] sample2) throws DimensionMismatchException, NoDataException Returns the sum of the (signed) differences between corresponding elements of the input arrays -- i.e., sum(sample1[i] - sample2[i]).
| |
| sumLog | back to summary |
|---|---|
| public static double sumLog(final double[] values) throws MathIllegalArgumentException Returns the sum of the natural logs of the entries in the input array, or
Throws
See
| |
| sumLog | back to summary |
|---|---|
| public static double sumLog(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the sum of the natural logs of the entries in the specified portion of
the input array, or
Throws
See
| |
| sumSq | back to summary |
|---|---|
| public static double sumSq(final double[] values) throws MathIllegalArgumentException Returns the sum of the squares of the entries in the input array, or
Throws
| |
| sumSq | back to summary |
|---|---|
| public static double sumSq(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the sum of the squares of the entries in the specified portion of
the input array, or
Throws
| |
| variance | back to summary |
|---|---|
| public static double variance(final double[] values) throws MathIllegalArgumentException Returns the variance of the entries in the input array, or
This method returns the bias-corrected sample variance (using
See Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| variance | back to summary |
|---|---|
| public static double variance(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Returns the variance of the entries in the specified portion of
the input array, or This method returns the bias-corrected sample variance (using
See Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| variance | back to summary |
|---|---|
| public static double variance(final double[] values, final double mean, final int begin, final int length) throws MathIllegalArgumentException Returns the variance of the entries in the specified portion of
the input array, using the precomputed mean value. Returns
This method returns the bias-corrected sample variance (using
See The formula used assumes that the supplied mean value is the arithmetic mean of the sample data, not a known population parameter. This method is supplied only to save computation when the mean has already been computed. Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| variance | back to summary |
|---|---|
| public static double variance(final double[] values, final double mean) throws MathIllegalArgumentException Returns the variance of the entries in the input array, using the
precomputed mean value. Returns This method returns the bias-corrected sample variance (using
See The formula used assumes that the supplied mean value is the arithmetic mean of the sample data, not a known population parameter. This method is supplied only to save computation when the mean has already been computed. Returns 0 for a single-value (i.e. length = 1) sample.
Throws
| |
| varianceDifference | back to summary |
|---|---|
| public static double varianceDifference(final double[] sample1, final double[] sample2, double meanDifference) throws DimensionMismatchException, NumberIsTooSmallException Returns the variance of the (signed) differences between corresponding elements of the input arrays -- i.e., var(sample1[i] - sample2[i]).
| |