Class OneWayAnova.Result
- All Implemented Interfaces:
SignificanceResult
- Enclosing class:
OneWayAnova
This class is immutable.
- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptiondoublegetMSBG()Gets the mean square between groups.doublegetMSWG()Gets the mean square within groups.doubleReturns the test statistic p-value.doubleReturns the test statistic.doublegetVCBG()Gets the variance component between groups.doublegetVCWG()Gets the variance component within groups.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SignificanceResult
reject
-
Method Details
-
getMSBG
-
getMSWG
-
getVCBG
Gets the variance component between groups.The value is a partitioning of the variance. It is the complement of
getVCWG().Partitioning the variance applies only to a model II (random effects) one-way anova. This applies when the groups are random samples from a larger set of groups; partitioning the variance allows comparison of the variation between groups to the variation within groups.
If the MSBG is less than the MSWG this returns 0. Otherwise this creates an estimate of the added variance component between groups as:
\[ \text{between-group variance} = A = (\text{MS}_{\text{bg}} - \text{MS}_{\text{wg}}) / n_o \]
where \( n_o \) is a number close to, but usually less than, the arithmetic mean of the sample size \(n_i\) of each of the \( a \) groups:
\[ n_o = \frac{1}{a-1} \left( \sum_i{n_i} - \frac{\sum_i{n_i^2}}{\sum_i{n_i}} \right) \]
The added variance component among groups \( A \) is expressed as a fraction of the total variance components \( A + B \) where \( B \) is the MSWG.
- Returns:
- variance component between groups (in [0, 1]).
-
getVCWG
-
getStatistic
public double getStatistic()Description copied from interface:SignificanceResultReturns the test statistic.- Specified by:
getStatisticin interfaceSignificanceResult- Returns:
- the statistic
-
getPValue
public double getPValue()Description copied from interface:SignificanceResultReturns the test statistic p-value.The number returned is the smallest significance level at which one can reject the null hypothesis.
- Specified by:
getPValuein interfaceSignificanceResult- Returns:
- the p-value
-