Post on 18-Jan-2018
description
transcript
BIOSTATISTICS
Statistical tests part IV: nonparametric tests
1. Mann-Whitney test
2. Wilcoxon test
3. Kruskal-Wallis test
• Applicability
• Definition
• Example
Copyright ©2012, Joanna Szyda
INTRODUCTION
SAMPLE STRUCTUREHYPOTHESES
TEST
Copyright ©2011, Joanna Szyda
INTRODUCTION
MANN-WHITNEY TEST
MANN-WHITNEY TEST
1. Comparison of means
2. Quantitative or ordered data (ranks)
3. No normal distribution required
4. Two independent samples
Copyright ©2012, Joanna Szyda
Copyright ©2012, Joanna Szyda
DATA SET
1. Shrimp length in different water salinities
3. Shrimp length [mm] at 4 weeks of age
MEDIUM HIGH5.5 6.06.0 7.05.0 7.57.0 6.05.5 7.56.0 8.07.0 11.06.0 9.08.0 8.07.0 11.06.0 8.07.0 8.06.0 7.08.0 7.06.0 7.07.0 9.0
02468
10
1 2 3 4 5 6 7 8 9
N
LENGTH
02468
1 2 3 4 5 6 7 8 9 10 11
N
LENGTH
MANN-WHITNEY TEST
Copyright ©20112 Joanna Szyda
1. Formulate hypotheses H0 and H1
H0: shrimp length does not depend on water salinity H1: shrimp length depends on water salinity H0: H = M H1: H ≠ M
2. Set the significance levelMAX = 0.05
3. Choose the statistical test and calculate test value
2 1
1 11
11212
2221 2
1,21min
n
i
n
iii rnnnnrnnnnU
Excel: exampleArkusz programu Microsoft Office Excel
MANN-WHITNEY TEST
Copyright ©2011, Joanna Szyda
3. Choose the statistical test and calculate test value
46210,46min
3462171616*16,182
2171616*16min
21,
21min
2 1
1 11
11212
2221
U
rnnnnrnnnnUn
i
n
iii
MANN-WHITNEY TEST
Copyright ©2011, Joanna Szyda
4. Determine distribution of the test• Nonparametric test – no known distribution• For n1n2 > 20 – approximated by a normal distribution:
1,0~
121
2
,~
2121
21
2
2
Nnnnn
nnUUz
NU
U
U
UU
no tables
tables
MANN-WHITNEY TEST
Copyright ©2011, Joanna Szyda
4. Determine distribution of the test
5. Determine t:
002.0t
1,0~09.3
123316*16216*1646
121
22121
21
Nnnnn
nnUz
Excel: exampleArkusz programu Microsoft Office Excel
or compare with a critical value:4618116,16,05.0 21
tnn UU
MANN-WHITNEY TEST
Copyright ©2012, Joanna Szyda
6. Decisiont < max Ut < U
H0 H1
shrimp length depends on water salinity
ATTENTION !!!
MANN-WHITNEY TEST
WILCOXON TEST
Copyright ©2011, Joanna Szyda
WILCOXON TEST
1. Nonparamteric test
2. Quantitative or ordered data (ranks)
3. No normal distribution required
4. Comparison of two paired samples
Copyright ©2011, Joanna Szyda
1. Feeding behaviour of sheep2. Data collected in1994-1996
in Canada, Rocky Mountains region
3. Differences in time of feeding with / without lamb
4. % time spent on feeding
DATA SETIID NO LAMB LAMB
1 72.00 55.502 62.35 43.803 55.77 66.804 59.98 68.005 51.60 57.886 61.48 61.907 52.57 45.408 52.50 56.679 56.43 73.30
10 60.13 77.5011 48.60 63.5312 42.90 54.5013 53.50 55.5814 70.43 91.1015 47.10 64.0516 50.08 71.40
WILCOXON TEST
0
1
2
3
-25 -20 -15 -10 -5 0 5 10 15 20
N
DIFFERENCE IN TIMECopyright ©2011, Joanna Szyda
DATA SETIID NO LAMB LAMB
1 72.00 55.502 62.35 43.803 55.77 66.804 59.98 68.005 51.60 57.886 61.48 61.907 52.57 45.408 52.50 56.679 56.43 73.30
10 60.13 77.5011 48.60 63.5312 42.90 54.5013 53.50 55.5814 70.43 91.1015 47.10 64.0516 50.08 71.40
WILCOXON TEST
Copyright ©2011, Joanna Szyda
1. Formulate hypotheses H0 and H1
H0: feeding time does not depend on a lamb H1: feeding time depends on a lamb
H0: J = B H1: J ≠ B
2. Set the significance levelMAX = 0.05
3. Choose the statistical test and calculate test value
1
1
1
,min1
nN
nii
n
ii rrW
Excel: exampleArkusz programu Microsoft Office Excel
WILCOXON TEST
Copyright ©2011, Joanna Szyda
3. Choose the statistical test and calculate test value
2929,107min,min1
1
1
1
nN
nii
n
ii rrW
WILCOXON TEST
Copyright ©2011, Joanna Szyda
4. Determine distribution of the test• Nonparametric test – no known distribution• For N > 15 – approximated by a normal distribution:
1,0~02.2
2433*17*16417*1629
1,0~
24121
41
1,0~
,~
2
2
Nz
NNNN
NNWz
NWz
NW
W
W
WW
WILCOXON TEST
Copyright ©2011, Joanna Szyda
5. Determine t:
0437.0t
or compare with a critical value :292916,05.0 tN WW
Excel: exampleArkusz programu Microsoft Office Excel
6. Decisiont < max Wt = W H0 H1
?
feeding time depends on a lamb ?
WILCOXON TEST
KRUSKAL-WALLIS TEST
KRUSKAL-WALLIS TEST
1. Comparing variability
2. Quantitative or ordered data (ranks)
3. No normal distribution required
4. Analysis of variance
Copyright ©2012, Joanna Szyda
Copyright ©2011, Joanna Szyda
DATA SETKRUSKAL-WALLIS TEST
1. Height of adult women in the USA2. Three age groups
20-29 30-39 40-49
161.925 164.465 173.990
173.355 171.450 175.260
158.115 173.355 167.640
170.815 175.260 166.370
179.705 164.465 168.910
Copyright ©2011, Joanna Szyda
1. Formulate hypotheses H0 and H1
H0: women's height is the same in each age interval H1: women's height differs across age intervals
H0: H1:
2. Set the significance level MAX = 0.05
3. Choose the statistical test and calculate test value
KRUSKAL-WALLIS TEST
22eage 22eage
21
2
1
~1
12
A
A
Ni
N
ii RRn
NNH
total no of observations
number of groups
mean ranking within group i
mean overall rankingR
R
N
N
i
A
Copyright ©2011, Joanna Szyda
KRUSKAL-WALLIS TEST
3. Choose the statistical test and calculate test value
4. Determine distribution of the test: 213~
5. Determine t: 0398.0t
6. Decision: t < max H0
H1
women's height differs across age intervals
45.688588582.7511515
121
12 2222
1
RRnNN
H i
N
ii
A
Excel: exampleArkusz programu Microsoft Office Excel
Copyright ©2012 Joanna Szyda
NONPARAMETRIC TESTS
xs