Class IntervalRatioStatisticalTest
java.lang.Object
org.moeaframework.util.statistics.IntervalRatioStatisticalTest
- All Implemented Interfaces:
StatisticalTest
- Direct Known Subclasses:
OneWayANOVA
,SingleSampleTTest
,TwoSampleTTest
Abstract class for interval ratio statistical tests.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<Observation>
Collection of all observations added to this test.protected final int
The number of groups being tested. -
Constructor Summary
ConstructorDescriptionIntervalRatioStatisticalTest
(int numberOfGroups) Constructs an interval ratio statistical test with the specified number of groups. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
add
(double value, int group) Adds a new observation with the specified value and group.protected void
addAll
(double[] values, int group) Adds several new observations to the specified group.protected List<double[]>
Organizes the observations by their group.int
Returns the number of groups being tested.protected org.apache.commons.math3.stat.descriptive.DescriptiveStatistics
getStatistics
(int group) Returns the descriptive statistics for the given group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.util.statistics.StatisticalTest
test
-
Field Details
-
numberOfGroups
protected final int numberOfGroupsThe number of groups being tested. -
data
Collection of all observations added to this test.
-
-
Constructor Details
-
IntervalRatioStatisticalTest
public IntervalRatioStatisticalTest(int numberOfGroups) Constructs an interval ratio statistical test with the specified number of groups.- Parameters:
numberOfGroups
- the number of groups being tested
-
-
Method Details
-
add
protected void add(double value, int group) Adds a new observation with the specified value and group.- Parameters:
value
- the value of the new observationgroup
- the group to which the new observation belongs
-
addAll
protected void addAll(double[] values, int group) Adds several new observations to the specified group.- Parameters:
values
- the values of the new observationsgroup
- the group to which the new observations belong
-
categorize
Organizes the observations by their group.- Returns:
- a list containing the vectorized values observed for each group
-
getNumberOfGroups
public int getNumberOfGroups()Returns the number of groups being tested.- Returns:
- the number of groups being tested
-
getStatistics
protected org.apache.commons.math3.stat.descriptive.DescriptiveStatistics getStatistics(int group) Returns the descriptive statistics for the given group.- Parameters:
group
- the group- Returns:
- the descriptive statistics
-