0% found this document useful (0 votes)
10 views

01 Non-ParametricOverview

Non-parametric tests make fewer assumptions than parametric tests, can be used in small samples, and are just as easy to use. They include the runs test, Wilcoxon signed-rank test, Mann-Whitney U test, and Kruskal-Wallis H test, which are non-parametric alternatives to tests that assume normality like the t-test and ANOVA.

Uploaded by

Eid Ibrahim
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

01 Non-ParametricOverview

Non-parametric tests make fewer assumptions than parametric tests, can be used in small samples, and are just as easy to use. They include the runs test, Wilcoxon signed-rank test, Mann-Whitney U test, and Kruskal-Wallis H test, which are non-parametric alternatives to tests that assume normality like the t-test and ANOVA.

Uploaded by

Eid Ibrahim
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

Non-Parametric

Tests

Copyright (c) 2008 by The McGraw-Hill Companies. This material is intended solely for
educational purposes by licensed users of LearningStats. It may not be copied or resold for profit.
Advantages

Non-parametric tests ...

require fewer assumptions about the population you are


sampling.
can sometimes be used in small samples when
parametric tests aren't justified.
are just as easy to use because computers do the
calculations.
are often only slightly less powerful than parametric
tests.
may handle ordinal or nominal data when no parametric
test is available.
Disadvantages

Non-parametric tests ...

require special tables when sample size is small.


are not as powerful as parametric tests when normality
can be assumed
still require some assumptions (e.g., that populations
being sampled are similar)
Runs Test

Runs Test
This test is to determine whether or not a sequence of
binary events follows a random pattern.

Question
Is this pattern of 44 true-false exam answers random?

TTTFFTTFFTTTTFFTFFFFFTT
TFFFFFTTFTFFFFFFTTTTT
Runs Test Results
Probability distribution for total runs
Runs Test for Random Sequence 21 n1
23 n2

variable: (no label) R p(R) p(r <= R) p(r >= R)


9 0.00001 0.00001 1.00000
10 0.00004 0.00005 0.99999
n runs 11 0.00012 0.00016 0.99995
12 0.00041 0.00057 0.99984
21 8 T 13 0.00108 0.00165 0.99943
23 7 F 14 0.00287 0.00453 0.99835
15 0.00616 0.01068 0.99547
44 15 total 16 0.01314 0.02382 0.98932
17 0.02299 0.04681 0.97618
18 0.04003 0.08684 0.95319
22.95 expected value 19 0.05782 0.14466 0.91316
20 0.08302 0.22768 0.85534
3.27 standard deviation 21 0.09963 0.32731 0.77232
-2.28 z 22 0.11872 0.44604 0.67269
23 0.11872 0.56476 0.55396
.0227 p-value (two-tailed) 24 0.11774 0.68250 0.43524
25 0.09812 0.78062 0.31750
26 0.08095 0.86156 0.21938
27 0.05604 0.91761 0.13844
28 0.03832 0.95592 0.08239
Probability distribution for total runs 29 0.02190 0.97782 0.04408
30 0.01232 0.99014 0.02218
31 0.00575 0.99588 0.00986
21 n1 32 0.00263 0.99851 0.00412
33 0.00099 0.99950 0.00149
23 n2 34 0.00036 0.99986 0.00050
35 0.00011 0.99996 0.00014
36 0.00003 0.99999 0.00004
37 0.00001 1.00000 0.00001
1.00000
Note: Results are from MegaStat
22.95 = expected value
10.70 = variance
3.27 = standard deviation
Wilcoxon Signed Rank Test
Bowler Line 1 Line 2 Wilcoxon Signed Rank Test
1 203 261
2 249 274 A non-parametric test to compare one
3 234 207 sample with a benchmark, or to test for zero
4 237 276 difference in paired data (the most common
5 208 241
usage). It is a test of a median, while
6 264 245
7 229 221
Student's t is a test of a mean.
8 221 264 Question
9 239 232
10 203 260 Is the median difference in scores for these
11 261 260 16 professional bowlers different from zero?
12 218 262
13 243 236
14 226 276
15 294 285
16 293 215
Wilcoxon Results
Result
MegaStat’s large-sample
test suggests that there is
not a significant difference.
Since n < 20, we should
consult a special table for
the Wilcoxon test, for more
accurate results.
Mann-Whitney
Attended Didn't Attend Mann-Whitney Test
Review Review
81 68 A non-parametric test to compare two
90 76 populations, utilizing only the ranks of
87 68
86 69
the data from two independent samples.
80 77 If populations are assumed the same
86 69 except for location (centrality) it is a
75 77
75 82
test of medians, while Student's t is a
77 77 test of means.
80 73
76 69 Question
81 80
77 79 Do these two student groups have
76 significantly different exam averages?
71
Mann-Whitney Results
Wilcoxon - Mann/Whitney Test

n sum of ranks
15 266 Review
13 140 No Review
28 406 total

217.50 expected value


21.71 standard deviation
2.21 z
.0270 p-value (two-tailed)

Atended Review Atended Review


Data Rank Data Rank
81 22.5 68 1.5
90 28 76 11
87 27 68 1.5
86 25.5 69 4
80 20 77 15
86 25.5 69 4
75 8.5 77 15
75 8.5 82 24
77 15 77 15
80 20 73 7
76 11 69 4
81 22.5 80 20
77 15 79 18 Note: Results are
76 11 from MegaStat
71 6
Student's t Results

Hypothesis Test: Independent Groups (t-test, pooled variance)

Review No Review
79.87 74.15 mean
5.37 5.03 std. dev.
15 13 n

26 df
5.713 difference (Review - No Review)
27.209 pooled variance
5.216 pooled std. dev.
1.977 standard error of difference
0 hypothesized difference

2.89 t
.0077 p-value (two-tailed)

Conclusion p-values are more significant


Note: Results are than in the non-parametric test, although.
from MegaStat at the price of assuming normality.
Kruskal-Wallis
Kruskal-Wallis Test
If the populations are assumed to differ only
Study Hours Per Week
Fresh Soph Junior Senior
in centrality (location), the K-W test is a test
17 28 24 17 that compares the medians of c independent
15 31 26 6 samples. It is a generalization of the Mann-
21 26 18 21
22 25 17 13
Whitney test and is a non-parametric
12 19 19 13 alternative to one-factor ANOVA.
9 21 26 14
19 37 11 12
21 26 19 19
Question
23 20 24
31 25
Do these four student groups have
16 significantly different weekly study hours?
Kruskal-Wallis Results
Kruskal-Wallis Test

Median n Avg. Rank


19.00 11 17.00 Fresh
26.00 8 30.44 Soph Note: Results are
19.50 10 20.50 Junior from MegaStat
14.00 9 11.72 Senior
19.50 38 Total

12.795 H
3 d.f.
.0051 p-value

Fresh Soph Junior Senior


Data Rank Data Rank Data Rank Data Rank
17 12 28 35 24 27.5 17 12
15 9 31 36.5 26 32.5 6 1
21 22.5 26 32.5 18 14 21 22.5
22 25 25 29.5 17 12 13 6.5
12 4.5 19 17 19 17 13 6.5
9 2 21 22.5 26 32.5 14 8
19 17 37 38 11 3 12 4.5
21 22.5 26 32.5 19 17 19 17
23 26 20 20 24 27.5
31 36.5 25 29.5
16 10
ANOVA Results
One factor ANOVA

Mean n Std. Dev


18.7 11 5.95 Fresh
26.6 8 5.63 Soph
20.5 10 4.79 Junior
15.4 9 5.41 Senior
20.1 38 6.52 Total
Conclusion p-values are
ANOVA table
Source SS df MS F p-value
similar to the non-parametric
Treatment 557.98 3 185.995 6.22 .0017 test, though you can also get a
Error 1,016.78 34 29.905
Total 1,574.76 37
Tukey comparison.

Post hoc analysis


Tukey simultaneous comparison t-values (d.f. = 34) Note: Results are
Senior Fresh Junior Soph
15.4 18.7 20.5 26.6
from MegaStat
Senior 15.4
Fresh 18.7 1.34
Junior 20.5 2.01 0.74
Soph 26.6 4.21 3.11 2.36

critical values for experimentwise error rate:


0.05 2.70
0.01 3.36
Friedman Test
Tomato Brand
Soil Green-Gro Tall-Up Big-Boy Yum-Yum Wowie!
Sandy 6.35 5.59 6.28 5.24 5.82
Mixed 5.41 5.96 7.06 6.13 5.50
Loam 6.12 6.70 7.65 6.01 5.96
Peaty 6.10 6.30 6.80 5.86 7.38

Friedman Test

The Friedman test is a non-parametric procedure to


discover whether c population medians are the
same or different. It is analogous to randomized
block ANOVA (non-replicated two-factor
ANOVA). It ignores the blocking factor.

Question
Do these five tomatoes differ significantly in per-
plant yield (weight in pounds)?
Friedman Results

Friedman Test

Sum of Ranks Avg. Rank


11.00 2.75 Green-Gro
12.00 3.00 Tall-Up
18.00 4.50 Big-Boy
8.00 2.00 Yum-Yum
11.00 2.75 Wowie!
60.00 3.00 Total

4 number of blocks
5.400 chi-square
4 d.f.
.2487 p-value

Green-Gro Tall-Up Big-Boy Yum-Yum Wowie!


5 2 4 1 3
1 3 5 4 2
3 4 5 2 1
2 3 4 1 5

Note: Results are from MegaStat


ANOVA Results
Randomized blocks ANOVA

Mean n Std. Dev


6.211 5.99500 4 0.40616 Green-Gro
6.211 6.13750 4 0.47402 Tall-Up
6.211 6.94750 4 0.56964 Big-Boy
6.211 5.81000 4 0.39573 Yum-Yum
6.211 6.16500 4 0.83257 Wowie!

5.85600 5 0.46779 Sandy


6.01200 5 0.65945 Mixed
6.48800 5 0.71377 Loam
6.48800 5 0.60689 Peaty
6.21100 20 0.63749 Total

ANOVA table
Source SS df MS F p-value
Treatments 3.0296 4 0.75741 2.94 .0662
Blocks 1.5954 3 0.53181 2.06 .1590
Error 3.0963 12 0.25803
Total 7.7214 19

Conclusion p-values are more significant


Note: Results are from MegaStat
than in the non-parametric test. Also, you
get a p-value for the blocking factor.
Spearman Rank Correlation
Team This Week Last Week Spearman Rank Correlation
Oklahoma 1 1
Miami (Fla) 2 2
Southern Cal 3 4 Spearman rank correlation is a
Georgia 4 5 non-parametric test that measures
Florida State 5 7
Washington State 6 6
the strength of the relationship, if
Ohio State 7 8 any, between two variables using
LSU 8 9 only ranks.
Nebraska 9 11
Michigan State 10 12
Virginia Tech 11 3
Michigan 12 15
TCU 13 13
Question
Iowa 14 16
Oklahoma State 15 19 Do the top 15 football teams ranks
agree from week to week?
Spearman Results
This Week Last Week
1 1
Spearman Coefficient of Rank Correlation 2 2
This Week Last Week 3 4
This Week 1.000 4 5
Last Week .864 1.000 5 7
6 6
15 sample size
7 8
± .514 critical value .05 (two-tail) 8 9
± .641 critical value .01 (two-tail) 9 10
10 11
11 3
Team ranks were re-assigned 12 13
because some teams were not in the 13 12
top 15 last week. 14 14
15 15

Note: Results are from MegaStat


Correlation

Correlation Matrix

This Week Last Week


This Week 1.000
Last Week .872 1.000

15 sample size

± .514 critical value .05 (two-tail)


± .641 critical value .01 (two-tail)

Conclusion Results are almost the


same as Spearman's correlation.

Note: Results are from MegaStat


Conclusions
Tip
Computers do all the work, so why not try
it both ways? If the tests agree (as they
often do) it is a strong result.

Many
Many(though
(though not
notall)
all)parametric
parametrictests
tests
have
havenon-parametric
non-parametriccounterparts.
counterparts.

Since
Sincethe
theassumption
assumptionof ofnormality
normalityisis
often
oftendoubtful
doubtfulfor
forbusiness
businessand
and
engineering
engineeringdata,
data,non-parametric
non-parametrictests
tests
deserve
deserveyour
yourattention
attention

You might also like