Interface OneWayAnova
-
- All Known Implementing Classes:
OneWayAnovaImpl
public interface OneWayAnovaAn interface for one-way ANOVA (analysis of variance).Tests for differences between two or more categories of univariate data (for example, the body mass index of accountants, lawyers, doctors and computer programmers). When two categories are given, this is equivalent to the
TTest.- Since:
- 1.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doubleanovaFValue(java.util.Collection<double[]> categoryData)Computes the ANOVA F-value for a collection ofdouble[]arrays.doubleanovaPValue(java.util.Collection<double[]> categoryData)Computes the ANOVA P-value for a collection ofdouble[]arrays.booleananovaTest(java.util.Collection<double[]> categoryData, double alpha)Performs an ANOVA test, evaluating the null hypothesis that there is no difference among the means of the data categories.
-
-
-
Method Detail
-
anovaFValue
double anovaFValue(java.util.Collection<double[]> categoryData) throws java.lang.IllegalArgumentException, MathExceptionComputes the ANOVA F-value for a collection ofdouble[]arrays.Preconditions:
- The categoryData
Collectionmust containdouble[]arrays. - There must be at least two
double[]arrays in thecategoryDatacollection and each of these arrays must contain at least two values.
- Parameters:
categoryData-Collectionofdouble[]arrays each containing data for one category- Returns:
- Fvalue
- Throws:
java.lang.IllegalArgumentException- if the preconditions are not metMathException- if the statistic can not be computed do to a convergence or other numerical error.
- The categoryData
-
anovaPValue
double anovaPValue(java.util.Collection<double[]> categoryData) throws java.lang.IllegalArgumentException, MathExceptionComputes the ANOVA P-value for a collection ofdouble[]arrays.Preconditions:
- The categoryData
Collectionmust containdouble[]arrays. - There must be at least two
double[]arrays in thecategoryDatacollection and each of these arrays must contain at least two values.
- Parameters:
categoryData-Collectionofdouble[]arrays each containing data for one category- Returns:
- Pvalue
- Throws:
java.lang.IllegalArgumentException- if the preconditions are not metMathException- if the statistic can not be computed do to a convergence or other numerical error.
- The categoryData
-
anovaTest
boolean anovaTest(java.util.Collection<double[]> categoryData, double alpha) throws java.lang.IllegalArgumentException, MathExceptionPerforms an ANOVA test, evaluating the null hypothesis that there is no difference among the means of the data categories.Preconditions:
- The categoryData
Collectionmust containdouble[]arrays. - There must be at least two
double[]arrays in thecategoryDatacollection and each of these arrays must contain at least two values. - alpha must be strictly greater than 0 and less than or equal to 0.5.
- Parameters:
categoryData-Collectionofdouble[]arrays each containing data for one categoryalpha- significance level of the test- Returns:
- true if the null hypothesis can be rejected with confidence 1 - alpha
- Throws:
java.lang.IllegalArgumentException- if the preconditions are not metMathException- if the statistic can not be computed do to a convergence or other numerical error.
- The categoryData
-
-