Wilcoxon
Wilcoxon
Wilcoxon
Or this:
1
Distribution-free testing
The Box-plots also indicate non-normality: skewness
in the first case and more outliers than expected under
normality in the second case:
2
Distribution-free testing
When the data are clearly non-normal, we need an
alternative: distribution-free testing. Also known
under the terms: nonparametric testing or rank tests.
3
Hypothesis testing, once again
Steps of hypothesis testing
3. Testing with?
a) Computer: p-values
b) Table of critical values
c) Asymptotic distribution of test statistic
4
Wilcoxon rank sum test
1. Parameter of interest: = 1 - 2
5
Wilcoxon rank sum test
Test statistic
6
Wilcoxon rank sum test
Smallest sample, sample ‘1’. The other is sample ‘2’.
If
a) H1: 1 < 2 , use the left-critical value only
b) H1: 1 > 2 , use right-crititical value only
c) H1: 1 2 , use both.
7
Wilcoxon rank sum test
Prothese 1 Prothese 2 Rangnrs 1 Rangnrs 2
3.2 2.3 8 7
4.3 4.3 9.5 9.5
5.6 1.3 11 5
1.2 2.2 4 5
0.6 0.7 2 3
0.4 1
Som = 34.5
m
Later we show that for n , m , N
c,
where c > 0,
W n(m n 1) / 2
z0
mn(m n 1) / 12
Data: 3.9, 2.3, 4.0, 4.5, 1.5, 2.2, 1.7, 3.6, 6.1, 1.2, 5.3,
3.3, -0.6, 5.2, 0.2, 0.9, 2.6, 2.2, 3.4, 2.8
Data:1.9, 0.3, 2.0, 2.5, -0.5, 0.2, -0.3, 1.6, 4.1, -0.8, 3.3,
1.3, -2.6, 3.2, -1.8, -1.1, 0.6, 0.2, 1.4, 0.8
9
Wilcoxon signed-rank test
Assumption: density f (x) of one-sample data is
symmetric.
10
Wilcoxon signed-rank test
Data and ranks:
Person New Old Differ. Abs. Rank Abs Positive
1 6 4 2 2 7.5 yes
2 8 3 5 5 15 yes
3 4 7 -3 3 12 no
4 8 6 2 2 7.5 yes
5 9 5 4 4 14 yes
6 6 8 -2 2 7.5 no
7 7 4 3 3 12 yes
8 5 5 0 0 1.5 zero
9 8 6 2 2 7.5 yes
10 8 5 3 3 12 yes
11 8 8 0 0 1.5 zero
12 7 5 2 2 7.5 yes
13 9 7 2 2 7.5 yes
14 5 4 1 1 3.5 yes
15 6 5 1 1 3.5 yes
11
Wilcoxon signed-rank test
Example Alternative hypothesis was H1 : d > 0, so
one-sided test for = 0.05. Right critical value WR =
n(n+1) / 2 – WL = 120 – 30 = 90.
Normal approximation
W n(n 1) / 4 99 n( n 1) / 4
P (W 99) P ( )
n(n 1)(2n 1) / 24 n(n 1)(2n 1) / 24
P ( Z 2.15) 0.015.
12