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

Activity 13 - Nonparametric Test

The document discusses three nonparametric tests: 1) The Wilcoxon signed-rank test compares two matched samples and determines if their median differs. It ranks differences and sums ranks to calculate a test statistic W. 2) The Mann-Whitney U test compares two independent samples and determines if their medians differ. It ranks all observations together and splits ranks between samples to calculate test statistics U1 and U2. 3) The Kruskal-Wallis test compares more than two independent samples and determines if their medians differ. Examples are provided to demonstrate calculations and hypotheses testing for the Wilcoxon and Mann-Whitney tests.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Activity 13 - Nonparametric Test

The document discusses three nonparametric tests: 1) The Wilcoxon signed-rank test compares two matched samples and determines if their median differs. It ranks differences and sums ranks to calculate a test statistic W. 2) The Mann-Whitney U test compares two independent samples and determines if their medians differ. It ranks all observations together and splits ranks between samples to calculate test statistics U1 and U2. 3) The Kruskal-Wallis test compares more than two independent samples and determines if their medians differ. Examples are provided to demonstrate calculations and hypotheses testing for the Wilcoxon and Mann-Whitney tests.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

Basic Business Statistics:

Concepts & Applications

Activity 13
Nonparametric tests 

1
Learning Objectives
 The Wilcoxon signed rank test for a
population median
 The Wilcoxon signed rank test
 The Mann-Whitney U-test
 The nonparametric analysis of variance
using the Kruskal-Wallis one-way ANOVA

2
Contents

• Wilcoxon Signed Rank Test


( The W Test)
• 2. Mann-Whitney U-Test: Example
( The U Test)

3
Nonparametric Tests for Two
Population Centers
Nonparametric
Tests for Two
Population Centers

Wilcoxon
Mann-Whitney
Matched-Pairs
U-test Signed Rank Test

Small Large Small Large


Samples Samples Samples Samples
4
1. Wilcoxon Signed Rank Test
( The W Test)
• These steps:
• Step 1: collect sample data
• Step 2: compute di = | di - di |

• Step 3: convert di values to absolute differences


• Step 4: determine the ranks for each di value
• Step 5: Create R+ and R- columns
• Step 6: sum of the ranks in the R+ column
• Compare: W to the critical value from the table of Wilcoxon
W < WU : Reject H0
5
1. The W Test (continued)
If the Sample Size is Large

• For n > 20, W can be approximated by


n(n  1)
W
z 4
n(n  1)(2n  1)
24
where W = sum of the R+ ranks
d = number of non-zero di values
6
1. The W Test (continued):Example
Difference
• The median class Class
size is claimed to di = xi – 40 | di |
size = xi
be 40
• Sample data for 8 23 -17 17
classes is
45 5 5
randomly
obtained 34 -6 6
• Compare each 78 38 38
value to the 34 -6 6
hypothesized 66 26 26
median 61 21 21
95 55 55 7
1. The W Test (continued):Example
• Rank the absolute differences:
| di | Rank
5 1
6 2.5
tied
6 2.5
17 4
21 5
26 6
38 7
55 8
8
1. The W Test (continued):Example
Differenc
Class e
size = | di | Rank R+ R-
xi di = xi –
40
23 -17 17 4 4
These three 45 5 5 1 1
are below
the claimed
34 -6 6 2.5 2.5
median, the 78 38 38 7 7
others are
above 34 -6 6 2.5 2.5
66 26 26 6 6
61 21 21 5 5
95 55 55 8 8
9
 = 27  = 9
1. The W Test (continued):Example
H0: Median = 40
H1: Median ≠ 40

WL = 3 and WU = 33
W = R+ = 27

reject H0 do not reject H0 reject H0


WL = 3 WU = 33

WL < W < WU : do not reject H0


(there is not sufficient evidence to conclude that the
median class size is different than 40) 10
2. Mann-Whitney U-Test
Used to compare two samples from two populations
Assumptions:
• The two samples are independent and random
• The value measured is a continuous variable
• The measurement scale used is at least ordinal
• If they differ, the distributions of the two populations
will differ only with respect to the central location

11
2. Mann-Whitney U-Test (Continued)
Mann-Whitney U-Statistics

n1 (n1  1)
U1  n1n 2    R1
2
n2 (n2  1)
U2  n1n2    R2
2
where:
n1 and n2 are the two sample sizes
R1 and R2 = sum of ranks for samples 1 and 2
12
2. Mann-Whitney U-Test:
Example (Continued)
Claim: Median class size for Math is larger
than the median class size for English

A random sample of 9 Math and 9 English


classes is selected (samples do not have to
be of equal size)

Rank the combined values and then split


them back into the separate samples

13
2. Mann-Whitney U-Test (Continued)
• Suppose the results are:
Class size (Math, Class size (English,
M) E)
23 30
45 47
34 18
78 34
34 44
66 61
62 54
95 28
81 40 14
2. Mann-Whitney U-Test: Example
(Continued)
Ranking for combined samples
Size Rank Size Rank
18 1 45 10
23 2 47 11
28 3 54 12
30 4 61 13
tied 34 6 62 14
34 6 66 15
34 6 78 16
40 8 81 17 15
2. Mann-Whitney U-Test: Example (Continued)
• Split back into the original samples:
Class size Class size
Rank Rank
(Math, M) (English, E)
23 2 30 4
45 10 47 11
34 6 18 1
78 16 34 6
34 6 44 9
66 15 61 13
62 14 54 12
95 18 28 3
81 17 40 8
16
 = 104  = 67
2. Mann-Whitney U-Test:
Example (Continued)
Claim: Median class size for H0: MedianM ≤ MedianE
Math is larger than the
median class size for English H1: MedianM > MedianE

n1(n1  1) (9)(10)
Math: U1  n1n2    R1  (9)(9)   104  22
2 2

n2 (n2  1) (9)(10)
English: U2  n1n2    R 2  (9)(9)   67  59
2 2

Note: U1 + U2 = n1n2

17
2. Mann-Whitney U-Test:
Example (Continued)
• Use U1 as the test statistic: U = 19

• U from Appendix M for  = .05, n1 = 9 and n2


= 9 is U = 7
U = 19

reject H0 U = 7 do not reject H0

Since U  U, do not reject H0


18

You might also like