### Wilcoxon Rank Sum Test

 P(W₁ = w₁)  = P(W₁ ≤ w₁)  = P(W₁ ≥ w₁)  = $n_1 =$ $n_2 =$ $w_1=$

This applet computes probabilities for the Wilcoxon Rank Sum Test. Let $X_1,\ldots,X_{n_1}$ and $Y_1,\ldots,Y_{n_2}$ be independent random samples. Suppose the $n_1+n_2$ values are ranked. The Wilcoxon rank sum statistic $W_1$ is the sum of the ranks in the first sample.

Note: Although the Mann-Whitney U-Test uses a different statistic, it will yield an identical $p-$value as a test based on the Wilcoxon Rank Sum statistic. Both tests are equivalent; the statistics simply differ by a shift in location.

#### Directions

• Enter the size of the first sample in the $n_1$ box.
• Enter the size of the second sample in the $n_2$ box.
• Hitting "Tab" or "Enter" on your keyboard will plot the probability mass function (pmf) of the Wilcoxon ranked sum distribution $W_1$ corresponding to the first sample.

To compute a probability, select $P(W_1=w_1)$ from the drop-down box, enter a numeric $w$ value, and press "Enter" on your keyboard. The probability $P(W_1=w_1)$ will appear in the pink box. Select $P(W_1 \leq w_1)$ from the drop-down box for a left-tail probability (this is the cdf).

#### Details

The Wilcoxon rank sum statistic $W_1$ has:

• Probability mass function (pmf):
$$f(w_1)=P(W_1=w_1)=\frac{n_1!n_2!}{(n_1+n_2)!}c(w_1|n_1,n_2)$$ where $c(w_1|n_1,n_2)$ is the number of subsets of size $n_1$ of the set $\{1,\ldots,n_1+n_2\}$ that sum to $w_1$.
• Support: $w_1=\frac{n_1(n_1+1)}{2},\ldots,\frac{n_1(n_1+1)}{2}+n_1 n_2$
• $\mu=E(W_1)=\frac{n_1(n_1+1)+n_1 n_2}{2}$
• $\sigma^2=Var(W_1)= \frac{n_1 n_2(n_1+n_2+1)}{12}$
• $\sigma=SD(W_1)= \sqrt{\frac{n_1 n_2(n_1+n_2+1)}{12}}$