Package dev.nm.stat.test.rank.wilcoxon
Class WilcoxonSignedRankDistribution
- java.lang.Object
-
- dev.nm.stat.test.rank.wilcoxon.WilcoxonSignedRankDistribution
-
- All Implemented Interfaces:
ProbabilityDistribution
public class WilcoxonSignedRankDistribution extends Object implements ProbabilityDistribution
Compute the exact distribution of the Wilcoxon signed rank test statistic. Let x be a sample of size N from a continuous distribution symmetric about the origin. The Wilcoxon signed rank statistic is the sum of the ranks of the absolute values x[i] for which x[i] are positive. This statistic takes values between 0 and N(N+1)/2. The R equivalent functions aredsignrank, pdsignrank, qdsignrank, rdsignrank
.
-
-
Constructor Summary
Constructors Constructor Description WilcoxonSignedRankDistribution(int N)
Construct a Wilcoxon Signed Rank distribution for a sample sizeN
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double
cdf(double x)
Gets the cumulative probability F(x) = Pr(X ≤ x).double
density(double x)
The density function, which, if exists, is the derivative of F.double
entropy()
Deprecated.double
kurtosis()
Deprecated.double
mean()
Gets the mean of this distribution.double
median()
Deprecated.double
moment(double x)
Deprecated.double
pValue(double x)
Compute the two-sided p-value for a critical value.double
quantile(double u)
Gets the quantile, the inverse of the cumulative distribution function.double
rightOneSidedPvalue(double x)
Compute the one-sided p-value for the statistic greater than a critical value.double
skew()
Deprecated.double
variance()
Gets the variance of this distribution.
-
-
-
Method Detail
-
mean
public double mean()
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
public double variance()
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 x)
Description copied from interface:ProbabilityDistribution
Gets the cumulative probability F(x) = Pr(X ≤ x).- Specified by:
cdf
in interfaceProbabilityDistribution
- Parameters:
x
- x- Returns:
- F(x) = Pr(X ≤ x)
- See Also:
- Wikipedia: Cumulative distribution function
-
quantile
public double quantile(double u)
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
public double density(double x)
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
-
rightOneSidedPvalue
public double rightOneSidedPvalue(double x)
Compute the one-sided p-value for the statistic greater than a critical value.- Parameters:
x
- a critical value- Returns:
- the one-sided p-value
-
pValue
public double pValue(double x)
Compute the two-sided p-value for a critical value.- Parameters:
x
- a critical value- Returns:
- the p-value
-
-