Professional Documents
Culture Documents
QT2 Topic 08 Nonparametric
QT2 Topic 08 Nonparametric
Non-parametric Tests
[Part 1]
Nonparametric tests
• Wilcoxon signed rank test:
One sample
Paired samples
samples.
• Kruskal-Wallis Test, three or more
independent samples.
• Spearman Rank Correlation Coefficient.
Dependent Independent
parametric counterpart:
t-test,
t-test, t-test, One-way
two Independent
one sample paired sample ANOVA
samples
Critical Value:
= 0.05 (two-tail), n = 8 (data values not equal to the hypothesized
median of 160, i.e. di ≠ 0 )
WL = 4 , WU = 32
Decision Rule:
Reject H0 if R+ > 32 or R+ < 4 Reject Do Not Reject
Reject
Test Statistics: R+ = 29
Decision: WL WU
R+ between 4 and 32, do not reject H0 at = 0.05
Conclusion:
There is insufficient evidence to conclude that the median height is not
equal to 160.
Week 8 & 9-20
W (The Normal Approximation)
Dependent Independent
parametric counterpart:
t-test,
t-test, t-test, One-way
two Independent
one sample paired sample ANOVA
samples
Wilcoxon Signed Rank Test for
Comparing Paired Samples
• The Wilcoxon Signed Rank test can also be
used for paired samples
• Use if assumption of normality is violated for
the paired-t test.
• Assumptions:
Data are assumed to be continuous and of the
Compute the
Rank the absolute
differences between
differences from
related
low to high.
observations.
|di| Rank
di = xi – yi
Total 31 5
di = xi – yi = 2006 – 2005
least ordinal.
Populations have approximately the same shape.
n(n 1)
W1 W2
2
where n = n1 + n2
AC 40 34 50 28 41
BA 29 31 50 29 20 31
AC (Sample 1) BC (Sample 2)
Score Rank Score Rank
28 2 20 1
34 7 29 3.5
40 8 29 3.5
41 9 31 5.5
50 10.5 31 5.5
50 10.5
Total 36.5 29.5
H0: MAC ≤ MBA (AC students get not higher score than BA students in progress test I)
H1: MAC > MBA (AC students get higher score than BA students in progress test I)
Critical Value:
= 0.05 (one-tail), n1 = 5, n2 = 6, WU = 40
Decision Rule: Reject H0 if R1 > 40
Test Statistics: R1 = 36.5 Do Not Reject Reject
Decision:
R1 < 40, do not reject H0 at = 0.05 W1U
Conclusion:
There is insufficient evidence to conclude that AC students perform
better compare to BA students in progress test I.
Week 8 & 9-47
Wilcoxon Rank-Sum Test
(Large Sample)
For large samples, the test statistic T1 is
approximately normal with mean μW1 and
standard deviation σW1 :
n1 (n 1) n1 n2 (n 1)
μW1 σW1
2 12
Must use the normal approximation if either n1
or n2 > 10
Assign n1 to be the smaller of the two sample sizes
Can use the normal approximation for small samples
Week 8 & 9-48
Wilcoxon Rank-Sum Test
(Large Sample)
(continued)
W1 μW1
Z
σW1
n2 = 5 (factory A)
n1 n2 (n 1) 4 (5) (9 1)
σW1 2.739
12 12
Non-parametric Tests
[Part 2]
Nonparametric tests
• Wilcoxon signed rank test:
One sample
Paired samples
samples.
• Kruskal-Wallis Test, three or more
independent samples.
• Spearman Rank Correlation Coefficient.
Dependent Independent
parametric counterpart:
t-test,
t-test, t-test, One-way
two Independent
one sample paired sample ANOVA
samples
drawn.
The scale of measurement of the data must
be at least ordinal.
Populations have the same variability.
groups
Compute the H test statistic
12 c T2
H j
3(n 1)
n(n 1) j1 n j
where:
n = sum of sample sizes in all samples
c = Number of samples
Tj = Sum of ranks in the jth sample
nj = Size of the jth sample
Decision rule
Reject H0 if test statistic H > 2U
Otherwise do not reject H0
0
Do not Reject H0
reject H0
2U
The H statistic is
12 c R2j
H
n(n 1) j 1 nj
3(n 1)
Since H = 6.72 > U 5.991 ,
2
reject H0
TM = 39 TC= 35 TE = 62 TV = 74
H0: MM = MC = ME = MV.
H1: Not all the populations Medians are equal.
There are 3 degrees of freedom at the 0.05
significance level. 20.05, 3 =7.815
H0 is rejected if is greater than 7.815.
12 39 2 35 2 62 2 74 2
3( 20 1)
20 ( 20 1) 5 5 5 5
5 . 949
H = 5.949 < 7.815 . The null hypothesis is not rejected.
There is no difference in the percent increases in
manager salaries in the four plants.
n
6 d i
2
rs 1 i 1
n n
3
6(86)
rs 1 i 1
1 1 0.301 0.699
n n
3
1728 12
The correlation is positive 0.699 for these sample data.
Now the question remains whether the true population
correlation is 0.
If the sample size exceeds 10, the test statistic is
approximated by a t-statistic with n - 2 degrees of freedom.
t , df n 2
2
Week 8 & 9-77
(continued)
4
Week 8 & 9-83
Spearman Rank Correlation
Coefficient: Example 14-11
(continued)
n 2
6 di
i 1 (6)(4) 24
rs 1
2 = 1- = 1- = 0.9758 > 0.794 H0 rejected
n( n 1) (10)(102 - 1) 990