org.apache.commons.math.stat.inference
Interface OneWayAnova

All Known Implementing Classes:
OneWayAnovaImpl

public interface OneWayAnova

An 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
Version:
$Revision: 670469 $ $Date: 2008-06-23 04:01:38 -0400 (Mon, 23 Jun 2008) $

Method Summary
 double anovaFValue(Collection<double[]> categoryData)
          Computes the ANOVA F-value for a collection of double[] arrays.
 double anovaPValue(Collection<double[]> categoryData)
          Computes the ANOVA P-value for a collection of double[] arrays.
 boolean anovaTest(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(Collection<double[]> categoryData)
                   throws IllegalArgumentException,
                          MathException
Computes the ANOVA F-value for a collection of double[] arrays.

Preconditions:

Parameters:
categoryData - Collection of double[] arrays each containing data for one category
Returns:
Fvalue
Throws:
IllegalArgumentException - if the preconditions are not met
MathException - if the statistic can not be computed do to a convergence or other numerical error.

anovaPValue

double anovaPValue(Collection<double[]> categoryData)
                   throws IllegalArgumentException,
                          MathException
Computes the ANOVA P-value for a collection of double[] arrays.

Preconditions:

Parameters:
categoryData - Collection of double[] arrays each containing data for one category
Returns:
Pvalue
Throws:
IllegalArgumentException - if the preconditions are not met
MathException - if the statistic can not be computed do to a convergence or other numerical error.

anovaTest

boolean anovaTest(Collection<double[]> categoryData,
                  double alpha)
                  throws IllegalArgumentException,
                         MathException
Performs an ANOVA test, evaluating the null hypothesis that there is no difference among the means of the data categories.

Preconditions:

Parameters:
categoryData - Collection of double[] arrays each containing data for one category
alpha - significance level of the test
Returns:
true if the null hypothesis can be rejected with confidence 1 - alpha
Throws:
IllegalArgumentException - if the preconditions are not met
MathException - if the statistic can not be computed do to a convergence or other numerical error.


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.