Wilcoxon or Mann-Whitney distribution

### 18.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

wilcoxonp(4)

▯ |
1
16
| , |
1
16
| , |
1
16
| , |
1
8
| , |
1
8
| , |
1
8
| , |
1
8
| , |
1
8
| , |
1
16
| , |
1
16
| , |
1
16
| ▯

wilcoxonp(4,3)

▯ |
1
35
| , |
1
35
| , |
2
35
| , |
3
35
| , |
4
35
| , |
4
35
| , |
1
7
| , |
4
35
| , |
4
35
| , |
3
35
| , |
2
35
| , |
1
35
| , |
1
35
| ▯

##### 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)

18 |  |  |  |  |  |  |  |  |  |

wilcoxons([1,3,4,5,7,8,8,12,15,17],[2,6,10,11,13,14,15,18,19,20])

128.5 |  |  |  |  |  |  |  |  |  |

##### 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

1 |  |  |  |  |  |  |  |  |  |

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

0 |  |  |  |  |  |  |  |  |  |

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

1 |  |  |  |  |  |  |  |  |  |