Previous Up Next

8.4.18  The Wilconon test polynomial: wilcoxonp

The wilcoxonp command will compute the polynomial for the Wilcoxon or Mann-Whitney test; it can take one or two parameters. If you enter

wilcoxonp(4)

you will get

poly1[1/16,1/16,1/16,1/8,1/8,1/8,1/8,1/8,1/16,1/16,1/16]

and if you enter

wilcoxonp(4,3)

you will get

poly1[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: wilcoxons

Given two lists, or one list and a real number (a median), the wilcoxons command will return the Wilcoxon or Mann-Whitney statistic. If you enter

wilcoxons([1,3,4,5,7,8,8,12,15,17],10)

you will get

18

and if you enter

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

you will get

128.5

The Wilcoxon or Mann-Whitney test: wilcoxont

The wilcoxont command will perform the Wilcoxon or Mann-Whitney test, given two samples or one sample and a number (a median). It can additionally take an optional third argument of a function and an optional fourth argument of a real number. If you enter

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

you will get

   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
\end{center}
If you enter
\begin{center}
  \tt
  wilcoxont([1,3,4,5,7,8,8,12,15,17],[2,6,10,11,13,14,15,18,19,20],0.3)
\end{center}
you will get
\begin{verbatim}
   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

and if you enter

wilcoxont([1,3,4,5,7,8,8,12,15,17] ,10,‘>‘,0.05)

you will get

   Wilcoxon 1-sample test, H0 Median=10, H1 M<>10
   Wilcoxon statistic: 18, p-value: 0.375, confidence level: 0.05
   1

Previous Up Next