 
 
 
20.4.18  Wilcoxon or Mann-Whitney distribution
The Wilcoxon test polynomial.
The wilcoxonp
command computes the polynomial for the Wilcoxon or Mann-Whitney test.
- 
wilcoxonp takes one mandatory argument and one
optional argument:
- 
n, an integer.
- Optionally, k an integer.
 
- wilcoxonp(n ⟨,k⟩) returns the polynomial for the
Wilcoxon test.
Examples
|  | | | ▯ |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | ▯ | 
 |  |  |  |  |  |  |  |  |  |  | 
 | 
|  | | | ▯ |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | , |  | ▯ | 
 |  |  |  |  |  |  |  |  |  |  | 
 | 
The Wilcoxon/Mann-Whitney statistic.
The wilcoxons
command computes the Wilcoxon or Mann-Whitney statistic.
- 
wilcoxons takes two arguments:
- 
L, a list.
- M, either a list or a real number (a median).
 
- wilcoxons(L,M) returns the Wilcoxon statistic.
Examples
| wilcoxons([1,3,4,5,7,8,8,12,15,17],10) | 
| wilcoxons([1,3,4,5,7,8,8,12,15,17],[2,6,10,11,13,14,15,18,19,20]) | 
The Wilcoxon or Mann-Whitney test.
The wilcoxont
command will perform the Wilcoxon or Mann-Whitney test.
- 
wilcoxont takes two mandatory arguments and two
optional arguments:
- 
L, a sample (list).
- M, either another sample or a number (a median).
- Optionally, f, a function.
- Optionally, x, a real number.
 
- wilcoxont(L,M  ⟨,f,x⟩) returns the results of the
Wilcoxon test.
Examples
| wilcoxont([1,2,3,4,5,7,8,8,12,15,17],[2,6,10,11,13,14,15,18,19,20]) | 
Mann-Whitney 2-sample test, H0 same Median, H1 <>
 ranksum 93.0, shifted ranksum 27.0
 u1=83, u2=27, u=min(u1,u2)=27
 Limit value to reject H0 26
 P-value 9055/176358 (0.0513444244094), alpha=0.05 H0 not rejected
| wilcoxont([1,3,4,5,7,8,8,12,15,17],[2,6,10,11,13,14,15,18,19,20],0.3) | 
Mann-Whitney 2-sample test, H0 same Median, H1 <>
 ranksum 81.5, shifted ranksum 26.5
 u1=73.5, u2=26.5, u=min(u1,u2)=26.5
 Limit value to reject H0 35
 P-value 316/4199 (0.0752560133365), alpha=0.3 H0 rejected
| wilcoxont([1,3,4,5,7,8,8,12,15,17],10,`>`,0.05) | 
Wilcoxon 1-sample test, H0 Median=10, H1 M<>10
 Wilcoxon statistic: 18, p-value: 0.375, confidence level: 0.05
 
 
