## Class WilcoxonRankSumDistribution

• All Implemented Interfaces:
ProbabilityDistribution

public class WilcoxonRankSumDistribution
extends Object
implements ProbabilityDistribution
Compute the exact distribution of the Wilcoxon rank sum test statistic. Let x and y be two random, independent samples of sizes M and N. The Wilcoxon rank sum statistic is the number of all pairs (x[i], y[j]) for which y[j] is not greater than x[i]. This statistic takes values between 0 and M * N.

The R equivalent functions are dwilcox, pwilcox, qwilcox, rwilcox.

• ### Constructor Summary

Constructors
Constructor Description
WilcoxonRankSumDistribution​(int M, int N)
Construct a Wilcoxon Rank Sum distribution for sample sizes M and N.
• ### Method Summary

All 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.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### WilcoxonRankSumDistribution

public WilcoxonRankSumDistribution​(int M,
int N)
Construct a Wilcoxon Rank Sum distribution for sample sizes M and N.
Parameters:
M - the number of observations in group 1
N - the number of observations in group 2
• ### Method Detail

• #### mean

public double mean()
Description copied from interface: ProbabilityDistribution
Gets the mean of this distribution.
Specified by:
mean in interface ProbabilityDistribution
Returns:
the mean
Wikipedia: Expected value
• #### median

@Deprecated
public double median()
Deprecated.
Description copied from interface: ProbabilityDistribution
Gets the median of this distribution.
Specified by:
median in interface ProbabilityDistribution
Returns:
the median
Wikipedia: Median
• #### variance

public double variance()
Description copied from interface: ProbabilityDistribution
Gets the variance of this distribution.
Specified by:
variance in interface ProbabilityDistribution
Returns:
the variance
Wikipedia: Variance
• #### skew

@Deprecated
public double skew()
Deprecated.
Description copied from interface: ProbabilityDistribution
Gets the skewness of this distribution.
Specified by:
skew in interface ProbabilityDistribution
Returns:
the skewness
Wikipedia: Skewness
• #### kurtosis

@Deprecated
public double kurtosis()
Deprecated.
Description copied from interface: ProbabilityDistribution
Gets the excess kurtosis of this distribution.
Specified by:
kurtosis in interface ProbabilityDistribution
Returns:
the excess kurtosis
Wikipedia: Kurtosis
• #### entropy

@Deprecated
public double entropy()
Deprecated.
Description copied from interface: ProbabilityDistribution
Gets the entropy of this distribution.
Specified by:
entropy in interface ProbabilityDistribution
Returns:
the entropy
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 interface ProbabilityDistribution
Parameters:
x - x
Returns:
F(x) = Pr(X ≤ x)
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.

F-1(u) = x, such that
Pr(X ≤ x) = u

This may not always exist.
Specified by:
quantile in interface ProbabilityDistribution
Parameters:
u - u, a quantile
Returns:
F-1(u)
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 interface ProbabilityDistribution
Parameters:
x - x
Returns:
f(x)
• #### 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 interface ProbabilityDistribution
Parameters:
x - t
Returns:
E(exp(tX))
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 right, 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