Class ShapiroWilkDistribution
- java.lang.Object
-
- dev.nm.stat.test.distribution.normality.ShapiroWilkDistribution
-
- All Implemented Interfaces:
ProbabilityDistribution
public class ShapiroWilkDistribution extends Object implements ProbabilityDistribution
Shapiro-Wilk distribution is the distribution of the Shapiro-Wilk statistics, which tests the null hypothesis that a sample comes from a normally distributed population. This is an implementation of ALGORITHM AS R94. Although our implementation allows for sample size > 5000, its validity is not rigorously established.- 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.
- Patrick Royston, "Algorithm AS 181: The W Test for Normality," Applied Statistics, 31, 176-180, 1982.
- Wikipedia: Shapiro-Wilk test
-
-
Constructor Summary
Constructors Constructor Description ShapiroWilkDistribution(int n)
Construct a Shapiro-Wilk distribution.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double
cdf(double W)
Gets the cumulative probability F(x) = Pr(X ≤ x).double
density(double x)
Deprecated.double
entropy()
Deprecated.double
kurtosis()
Deprecated.double
mean()
Deprecated.double
median()
Deprecated.double
moment(double x)
Deprecated.double
quantile(double u)
Deprecated.double
skew()
Deprecated.double
variance()
Deprecated.
-
-
-
Method Detail
-
mean
@Deprecated public double mean()
Deprecated.Description copied from interface:ProbabilityDistribution
Gets the mean of this distribution.- Specified by:
mean
in interfaceProbabilityDistribution
- Returns:
- the mean
- See Also:
- Wikipedia: Expected value
-
median
@Deprecated public double median()
Deprecated.Description copied from interface:ProbabilityDistribution
Gets the median of this distribution.- Specified by:
median
in interfaceProbabilityDistribution
- Returns:
- the median
- See Also:
- Wikipedia: Median
-
variance
@Deprecated public double variance()
Deprecated.Description copied from interface:ProbabilityDistribution
Gets the variance of this distribution.- Specified by:
variance
in interfaceProbabilityDistribution
- Returns:
- the variance
- See Also:
- Wikipedia: Variance
-
skew
@Deprecated public double skew()
Deprecated.Description copied from interface:ProbabilityDistribution
Gets the skewness of this distribution.- Specified by:
skew
in interfaceProbabilityDistribution
- Returns:
- the skewness
- See Also:
- Wikipedia: Skewness
-
kurtosis
@Deprecated public double kurtosis()
Deprecated.Description copied from interface:ProbabilityDistribution
Gets the excess kurtosis of this distribution.- Specified by:
kurtosis
in interfaceProbabilityDistribution
- Returns:
- the excess kurtosis
- See Also:
- Wikipedia: Kurtosis
-
entropy
@Deprecated public double entropy()
Deprecated.Description copied from interface:ProbabilityDistribution
Gets the entropy of this distribution.- Specified by:
entropy
in interfaceProbabilityDistribution
- Returns:
- the entropy
- See Also:
- Wikipedia: Entropy (information theory)
-
cdf
public double cdf(double W)
Description copied from interface:ProbabilityDistribution
Gets the cumulative probability F(x) = Pr(X ≤ x).- Specified by:
cdf
in interfaceProbabilityDistribution
- Parameters:
W
- x- Returns:
- F(x) = Pr(X ≤ x)
- See Also:
- Wikipedia: Cumulative distribution function
-
quantile
@Deprecated public double quantile(double u)
Deprecated.Description copied from interface:ProbabilityDistribution
Gets the quantile, the inverse of the cumulative distribution function. It is the value below which random draws from the distribution would fall u×100 percent of the time.
This may not always exist.F-1(u) = x, such that Pr(X ≤ x) = u
- Specified by:
quantile
in interfaceProbabilityDistribution
- Parameters:
u
-u
, a quantile- Returns:
- F-1(u)
- See Also:
- Wikipedia: Quantile function
-
density
@Deprecated public double density(double x)
Deprecated.Description copied from interface:ProbabilityDistribution
The density function, which, if exists, is the derivative of F. It describes the density of probability at each point in the sample space.f(x) = dF(X) / dx
This may not always exist. For the discrete cases, this is the probability mass function. It gives the probability that a discrete random variable is exactly equal to some value.- Specified by:
density
in interfaceProbabilityDistribution
- Parameters:
x
- x- Returns:
- f(x)
- See Also:
-
moment
@Deprecated public double moment(double x)
Deprecated.Description copied from interface:ProbabilityDistribution
The moment generating function is the expected value of etX. That is,E(etX)
This may not always exist.- Specified by:
moment
in interfaceProbabilityDistribution
- Parameters:
x
- t- Returns:
- E(exp(tX))
- See Also:
- Wikipedia: Moment-generating function
-
-