public class Statistics
extends java.lang.Object
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
static double |
getMax(double[] data)
Return the maximum value from the given data array.
|
static double |
getMean(double[] data)
Get the mean (average) of the values in the given data array.
|
static double |
getMin(double[] data)
Return the minimum value from the given data array.
|
static double |
getPercentile(double[] data,
double percentile)
Given a sorted data array and a percentile, return the approximate percentile value from that sorted array.
|
static double[] |
getResample(double[] data)
Return a new single array of data resampled from the given data array.
|
static double[] |
getResampleMeanPercentiles(double[] data,
int numResamples,
double... percentiles)
Given a data array and a specified number of resamples, return the given percentiles values for the resample means.
|
static double[] |
getSortedResampleMeans(double[] data,
int numResamples)
Compute the given number of resamples from the given data array, and return a sorted list of the means of each resample.
|
static double |
getStdDev(double[] data)
Return the population standard deviation of the data.
|
static double |
getSum(double[] data)
Get the sum of the values in the given data array.
|
static void |
main(java.lang.String[] args) |
public static double getMin(double[] data)
data
- data arraypublic static double getMax(double[] data)
data
- data arraypublic static double getSum(double[] data)
data
- data arraypublic static double getMean(double[] data)
data
- data arraypublic static double getStdDev(double[] data)
data
- given data arraypublic static double[] getResample(double[] data)
data
- given data arraypublic static double[] getSortedResampleMeans(double[] data, int numResamples)
data
- given data arraynumResamples
- number of resamples computed from the given data arraypublic static double getPercentile(double[] data, double percentile)
data
- sorted data arraypercentile
- percentile requested from data arraypublic static double[] getResampleMeanPercentiles(double[] data, int numResamples, double... percentiles)
data
- source data arraynumResamples
- number of times to resample the array and compute the meanspercentiles
- given percentiles to compute from the sorted meanspublic static void main(java.lang.String[] args)