java.lang.Object | |
↳ | org.jfree.data.statistics.Statistics |
A utility class that provides some common statistical functions.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the mean of an array of numbers.
| |||||||||||
Returns the mean of a collection of
Number objects. | |||||||||||
Returns the mean of an array of numbers.
| |||||||||||
Returns the mean of a collection of
Number objects. | |||||||||||
Calculates the median for a list of values (
Number objects). | |||||||||||
Calculates the median for a sublist within a list of values
(
Number objects). | |||||||||||
Calculates the median for a sublist within a list of values
(
Number objects). | |||||||||||
Calculates the median for a list of values (
Number objects). | |||||||||||
Calculates the correlation between two datasets.
| |||||||||||
Fits a straight line to a set of (x, y) data, returning the slope and
intercept.
| |||||||||||
Returns a data set for a moving average on the data set passed in.
| |||||||||||
Finds the slope of a regression line using least squares.
| |||||||||||
Returns the standard deviation of a set of numbers.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the mean of an array of numbers. This is equivalent to calling
calculateMean(values, true)
.
values | the values (null not permitted). |
---|
Returns the mean of a collection of Number
objects.
values | the values (null not permitted). |
---|---|
includeNullAndNaN | a flag that controls whether or not
null and Double.NaN values are included
in the calculation (if either is present in the array, the result is
NaN ). |
Returns the mean of an array of numbers.
values | the values (null not permitted). |
---|---|
includeNullAndNaN | a flag that controls whether or not
null and Double.NaN values are included
in the calculation (if either is present in the array, the result is
NaN ). |
Returns the mean of a collection of Number
objects.
values | the values (null not permitted). |
---|
Calculates the median for a list of values (Number
objects).
If copyAndSort
is false
, the list is assumed
to be presorted in ascending order by value.
values | the values (null permitted). |
---|---|
copyAndSort | a flag that controls whether the list of values is copied and sorted. |
Calculates the median for a sublist within a list of values
(Number
objects).
values | the values, in any order (null not
permitted). |
---|---|
start | the start index. |
end | the end index. |
Calculates the median for a sublist within a list of values
(Number
objects). The entire list will be sorted if the
ascending
false.
values | the values (null not permitted). |
---|---|
start | the start index. |
end | the end index. |
copyAndSort | a flag that that controls whether the list of values is copied and sorted. |
Calculates the median for a list of values (Number
objects).
The list of values will be copied, and the copy sorted, before
calculating the median. To avoid this step (if your list of values
is already sorted), use the calculateMedian(List, boolean)
method.
values | the values (null permitted). |
---|
Calculates the correlation between two datasets. Both arrays should contain the same number of items. Null values are treated as zero.
Information about the correlation calculation was obtained from: http://trochim.human.cornell.edu/kb/statcorr.htm
data1 | the first dataset. |
---|---|
data2 | the second dataset. |
Fits a straight line to a set of (x, y) data, returning the slope and intercept.
xData | the x-data (null not permitted). |
---|---|
yData | the y-data (null not permitted). |
Returns a data set for a moving average on the data set passed in.
xData | an array of the x data. |
---|---|
yData | an array of the y data. |
period | the number of data points to average |
Finds the slope of a regression line using least squares.
xData | the x-values (null not permitted). |
---|---|
yData | the y-values (null not permitted). |
Returns the standard deviation of a set of numbers.
data | the data (null or zero length array not
permitted). |
---|