SuanShu, a Java numerical and statistical library



com.numericalmethod.suanshu.stats.test.variance
Class Levene

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.test.HypothesisTest
      extended by com.numericalmethod.suanshu.stats.test.variance.Levene

public class Levene
extends HypothesisTest

The Levene test tests for the equality of variance of groups. Levene's test does not require normality of the underlying data. Some statistical tests, for example ANOVA, assume that variances are equal across groups or samples. A homoscedasticity test, such as the Levene test, can be used to verify that assumption.

The R equivalent function is levene.test.

See Also:

Nested Class Summary
static class Levene.Type
          the available implementations when computing the absolute deviations
 
Constructor Summary
Levene(double... samples)
          Perform the Levene test to test for equal variances across the groups.
Levene(Levene.Type type, double[]... samples)
          Perform the Levene test to test for equal variances across the groups.
 
Method Summary
 String getAlternativeHypothesis()
          Get the description of the alternative hypothesis.
 String getNullHypothesis()
          Get a description of the null hypothesis.
 double pValue()
          Get the p-value for the test statistics.
 double statistics()
          Get the test statistics.
 
Methods inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Levene

public Levene(double... samples)
Perform the Levene test to test for equal variances across the groups. The absolute deviations are computed from the medians.

Parameters:
samples - samples

Levene

public Levene(Levene.Type type,
              double[]... samples)
Perform the Levene test to test for equal variances across the groups.

Parameters:
type - the implementation chosen
samples - samples
Method Detail

getNullHypothesis

public String getNullHypothesis()
Description copied from class: HypothesisTest
Get a description of the null hypothesis.

Specified by:
getNullHypothesis in class HypothesisTest
Returns:
the null hypothesis description
See Also:
Wikipedia: Null hypothesis

getAlternativeHypothesis

public String getAlternativeHypothesis()
Description copied from class: HypothesisTest
Get the description of the alternative hypothesis.

Specified by:
getAlternativeHypothesis in class HypothesisTest
Returns:
the alternative hypothesis description
See Also:
Wikipedia: Alternative hypothesis

statistics

public double statistics()
Description copied from class: HypothesisTest
Get the test statistics.

Specified by:
statistics in class HypothesisTest
Returns:
the test statistics
See Also:
Wikipedia: Test statistic

pValue

public double pValue()
Description copied from class: HypothesisTest
Get the p-value for the test statistics.

Specified by:
pValue in class HypothesisTest
Returns:
the p-value
See Also:
Wikipedia: P-value


Copyright © 2010-2014 Numerical Method Incorporation Limited. All Rights Reserved.