org.statcato.statistics.inferential
Class OneWayANOVA

java.lang.Object
  extended by org.statcato.statistics.inferential.OneWayANOVA

public class OneWayANOVA
extends java.lang.Object

One-way analysis of variance (single factor ANOVA).

Since:
1.0
Version:
%I%, %G%
Author:
Margaret Yau

Constructor Summary
OneWayANOVA(java.util.Vector<java.util.Vector<java.lang.Double>> Samples)
          Constructor.
 
Method Summary
 double CriticalValue(double significance)
          Returns the critical value corresponding to the given significance.
 int DOFError()
          Returns the denominator degrees of freedom (N - k).
 int DOFTotal()
          Returns the total degrees of freedom.
 int DOFTreatment()
          Returns the numerator degrees of freedom (k - 1).
 double GrandMean()
          Returns the grand mean (mean of all the treatment sample means).
 double MSError()
          Returns MS(error), the mean of squares of errors.
 double MSTreatment()
          Returns MS(treatment), the mean of squares of treatment.
 double PValue()
          Returns the p-Value corresponding to the test statistic.
 double SSError()
          Returns SS(error), the sum of squares of means.
 double SSTotal()
          Returns the total sum of squares SS(treatment) + SS(error).
 double SSTreatment()
          Returns SS(treatment), sum of squares of treatments.
 double TestStatisticsF()
          Returns the test statistics F = MS(treatment) / MS(error).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneWayANOVA

public OneWayANOVA(java.util.Vector<java.util.Vector<java.lang.Double>> Samples)
Constructor. The samples are given as a vector of vector of double, each vector contains values of a treatment sample.

Parameters:
Samples -
Method Detail

GrandMean

public double GrandMean()
Returns the grand mean (mean of all the treatment sample means).

Returns:
grand mean

SSTreatment

public double SSTreatment()
Returns SS(treatment), sum of squares of treatments.

Returns:
SS(treatment)

MSTreatment

public double MSTreatment()
Returns MS(treatment), the mean of squares of treatment.

Returns:
MS(treatment)

SSError

public double SSError()
Returns SS(error), the sum of squares of means.

Returns:
SS(error)

MSError

public double MSError()
Returns MS(error), the mean of squares of errors.

Returns:
MS(error)

SSTotal

public double SSTotal()
Returns the total sum of squares SS(treatment) + SS(error).

Returns:
SS(treatment) + SS(error)

TestStatisticsF

public double TestStatisticsF()
Returns the test statistics F = MS(treatment) / MS(error).

Returns:
F

DOFTreatment

public int DOFTreatment()
Returns the numerator degrees of freedom (k - 1).

Returns:
degrees of freedom 1

DOFError

public int DOFError()
Returns the denominator degrees of freedom (N - k).

Returns:
degrees of freedom 2

DOFTotal

public int DOFTotal()
Returns the total degrees of freedom.

Returns:
DOF1 + DOF2

CriticalValue

public double CriticalValue(double significance)
Returns the critical value corresponding to the given significance.

Parameters:
significance -
Returns:
critical value (positive)

PValue

public double PValue()
Returns the p-Value corresponding to the test statistic.

Returns:
p-Value