Class ShapiroWilk
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.distribution.normality.ShapiroWilk
-
public class ShapiroWilk extends HypothesisTest
The Shapiro-Wilk test tests the null hypothesis that a sample comes from a normally distributed population. The sample size must be between 3 and 5000. The R equivalent function isshapiro.test
.- See Also:
- Patrick Royston, "A Remark on Algorithm AS 181: The W Test for Normality," Applied Statistics, 44, 547-551, 1995.
- Patrick Royston, "Approximating the Shapiro-Wilk W-test for non-normality," Statistics and Computing, Volume 2, Number 3, 117-119, 1992.
- Patrick Royston, "An Extension of Shapiro and Wilk's W Test for Normality to Large Samples," Applied Statistics, 31, 115-124, 1982d.
- Patrick Royston, "Algorithm AS 181: The W Test for Normality," Applied Statistics, 31, 176-180. 1982c.
- Patrick Royston, "An extension of Shapiro and Wilk's Wtest for normality to large samples," Appl. Statist., 31, 115-124, 1982b.
- Patrick Royston, "Algorithm AS177. Expected normal order statistics (exact and approximate)," Applied Statistics, 31, 161-165, 1982a.
- Wikipedia: Shapiro-Wilk test
-
-
Constructor Summary
Constructors Constructor Description ShapiroWilk(double[] sample)
Perform the Shapiro-Wilk test to test for the null hypothesis that a sample comes from a normally distributed population.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
-
-
-
-
Method Detail
-
getNullHypothesis
public String getNullHypothesis()
Description copied from class:HypothesisTest
Get a description of the null hypothesis.- Specified by:
getNullHypothesis
in classHypothesisTest
- 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 classHypothesisTest
- 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 classHypothesisTest
- 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 classHypothesisTest
- Returns:
- the p-value
- See Also:
- Wikipedia: P-value
-
-