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 doublecdf(double W)Gets the cumulative probability F(x) = Pr(X ≤ x).doubledensity(double x)Deprecated.doubleentropy()Deprecated.doublekurtosis()Deprecated.doublemean()Deprecated.doublemedian()Deprecated.doublemoment(double x)Deprecated.doublequantile(double u)Deprecated.doubleskew()Deprecated.doublevariance()Deprecated.
-
-
-
Method Detail
-
mean
@Deprecated public double mean()
Deprecated.Description copied from interface:ProbabilityDistributionGets the mean of this distribution.- Specified by:
meanin interfaceProbabilityDistribution- Returns:
- the mean
- See Also:
- Wikipedia: Expected value
-
median
@Deprecated public double median()
Deprecated.Description copied from interface:ProbabilityDistributionGets the median of this distribution.- Specified by:
medianin interfaceProbabilityDistribution- Returns:
- the median
- See Also:
- Wikipedia: Median
-
variance
@Deprecated public double variance()
Deprecated.Description copied from interface:ProbabilityDistributionGets the variance of this distribution.- Specified by:
variancein interfaceProbabilityDistribution- Returns:
- the variance
- See Also:
- Wikipedia: Variance
-
skew
@Deprecated public double skew()
Deprecated.Description copied from interface:ProbabilityDistributionGets the skewness of this distribution.- Specified by:
skewin interfaceProbabilityDistribution- Returns:
- the skewness
- See Also:
- Wikipedia: Skewness
-
kurtosis
@Deprecated public double kurtosis()
Deprecated.Description copied from interface:ProbabilityDistributionGets the excess kurtosis of this distribution.- Specified by:
kurtosisin interfaceProbabilityDistribution- Returns:
- the excess kurtosis
- See Also:
- Wikipedia: Kurtosis
-
entropy
@Deprecated public double entropy()
Deprecated.Description copied from interface:ProbabilityDistributionGets the entropy of this distribution.- Specified by:
entropyin interfaceProbabilityDistribution- Returns:
- the entropy
- See Also:
- Wikipedia: Entropy (information theory)
-
cdf
public double cdf(double W)
Description copied from interface:ProbabilityDistributionGets the cumulative probability F(x) = Pr(X ≤ x).- Specified by:
cdfin 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:ProbabilityDistributionGets 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:
quantilein 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:ProbabilityDistributionThe 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:
densityin interfaceProbabilityDistribution- Parameters:
x- x- Returns:
- f(x)
- See Also:
-
moment
@Deprecated public double moment(double x)
Deprecated.Description copied from interface:ProbabilityDistributionThe moment generating function is the expected value of etX. That is,E(etX)
This may not always exist.- Specified by:
momentin interfaceProbabilityDistribution- Parameters:
x- t- Returns:
- E(exp(tX))
- See Also:
- Wikipedia: Moment-generating function
-
-