Title: Nonparametric Statistics
1Nonparametric Statistics (Ordinal Data)
2Remember ordinal data - some indication of
directionality, ranking or comparison in the data
3Komolgorov-Smirnov (KS) Test
-one sample, ordinal data
Experiment Moisture preferences in sowbugs
- Sowbugs - given a choice of humidities
- Ranked from 1 to 5
- 5
- Moist Dry
Hypotheses H0 Sowbugs show no preference for any
humidity H1 Sowbugs show a preference for
humidity
4The Data
Observed frequency
Expected frequency
Cumulative observed frequency
Cumulative expected frequency
Abs. value of difference
KS statistic dmax 9 And the critical d
max(5, 35) 7 and reject H0
5The Summary
6Wilcoxon Test
-2 paired samples, ordinal data (minimum - can be
used on any type of data except nominal)
A Wilcoxon test should be used as a
non-parametric analogue to a paired t test, if
you have violated any of the assumptions of the t
test.
7Experiment Measuring foraging times of birds
number of minutes foraging before and after noon
H0 there is no difference in foraging times
before and after noon H1 there is a difference
in foraging times before and after noon
8Wilcoxon - Computation
Sum of positive ranks T 468753 33 Sum
of negative ranks T- 3
In Wilcoxon table, reject H0 if either T or T-
critical value and Tcritical(.05, n8) 3.
Therefore - reject H0
9The (ever expanding) Summary
10Mann Whitney U Test
-2 unpaired samples, ordinal data (minimum - can
be used on any type of data except nominal)
A Mann Whitney U test should be used as a
non-parametric analogue to an unpaired t-test, if
you have violated any of the assumptions of the
t-test.
11Experiment Nearest neighbour distances in
nudibranchs
H0 There is no difference in nearest neighbour
distance between two quadrats H1 There is a
difference in nearest neighbour distance between
two quadrats
12Mann Whitney U - Computation
U n1n2 n1(n1 1) - SR1 (7)(5) 7(8) - 30
33 2 2 U n1n2 - U (7)(5) - 33
2
If either U or U U crit(.05, 7, 5) , reject H0
U crit(.05, 7, 5) 30, since 33 gt 30, reject H0
13Summary Table
14Non parametric ANOVA -use these tests when any
of the assumptions of one or two way ANOVAs are
violated
15Kruskal-Wallis ANOVA
Experiment An entomologist - studying vertical
distribution of flies in 3 layers of vegetation
Trees
Shrubs
Herbs
16H0 distribution of flies is the same in all
layers H1 distribution of flies is not the same
in all layers
Number of flies/m3
17Kruskal Wallis - Computation
Step 1 Assign ranks to all data
n1 5 R1 64
n2 5 R2 30
n3 5 R3 26
N 15
18Kruskal Wallis - Computation
Step 1 Assign ranks to all data
n1 5 R1 64
n2 5 R2 30
n3 5 R3 26
N 15
For Kruskal Wallis - compute H statistic
12 N(N 1)
Ri2 ni
12 642 302 262 15(16) 5
5 5
- 3(16) 8.72
S
-3(N1)
H
H crit(.05) for ns of 5, 5, 5 5.78 - reject
H0
19Summary
20Friedman Two-Way ANOVA - for related samples
Experiment - weight gain in Guinea pigs depending
on type of feed
- Diets
- 1 2 3 4
- Blocks
- 1.5 2.7 2.1 1.3
- 2 1.4 2.9 2.2 1.0
- 3 1.4 2.1 2.4 1.1
-
- 4 1.2 3.0 2.0 1.3
-
- 5 1.4 3.3 2.5 1.5
21Friedman Two-Way ANOVA - for related samples
Experiment - weight gain in Guinea pigs depending
on type of feed
- Diets
- 1 2 3 4
- Blocks
- 1.5 2.7 2.1 1.3
- 2 4 3 1
- 2 1.4 2.9 2.2 1.0
- 2 4 3 1
- 3 1.4 2.1 2.4 1.1
- 2 4 3 1
- 4 1.2 3.0 2.0 1.3
- 1 4 3 2
- 5 1.4 3.3 2.5 1.5
- 1 4 3 2
- Ri 8 19 16 7
- (rank sum)
Rank values within each block
22Friedman - Computation
Where a number of treatments And b number of
blocks
12 ba(a 1)
S
Ri2
-3b(a1)
X2
12.6
X2(crit., df3) 7.815 Therefore - reject the
null hypothesis of no difference between the
diets
23Yet another Summary