Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 85

Topic 8

Non-parametric Tests
[Part 1]

Week 8 & 9-1


Learning Objectives

• Differentiate between nonparametric and


parametric hypothesis tests.
• Determine when a nonparametric test should be
used instead of its parametric counterpart.
• Appropriately apply each of the nonparametric
methods introduced.

Week 8 & 9-2


Learning Outcome

1. Compute statistical variables involves the use


of sample information to draw conclusion
about the population of an event
2. Select appropriate hypothesis testing methods
for different types of data
3. Use the hypothesis testing methods to test the
significance levels of an event

Week 8 & 9-3


Key Terms

Nonparametric tests
• Wilcoxon signed rank test:

 One sample

 Paired samples

• Wilcoxon rank sum test, two independent

samples.
• Kruskal-Wallis Test, three or more

independent samples.
• Spearman Rank Correlation Coefficient.

Week 8 & 9-4


Introduction

 Parametric tests require assumptions about the


nature or the shape of the population involved.;
nonparametric tests do not require such
assumptions.
 Nonparametric methods are nearly as efficient
as their parametric counterparts when
assumptions underlying the parametric
procedures are true; and they could be more
efficient when the assumptions are not satisfied.

Week 8 & 9-5


Introduction
(continued)

 Non-parametric procedures may be defined as


either
i) those whose test statistic does not depend on
the form of the underlying population
distribution from which the sample data were
drawn, or
ii) nominal or ordinal scale data for which
parametric procedures are not appropriate.

Week 8 & 9-6


Advantages of nonparametric or
distribution-free procedures:
 They may be used on all types of data,
including non-numerical data (nominal and
ordinal data).
 They make less stringent assumptions than do
the parametric procedures. They do not require
normally distributed populations.
 Permit the solution of problems that do not
involve the testing of population parameters
 They may be as powerful as the corresponding
parametric procedures when the assumptions
of the latter are met, may be much more
powerful when those assumptions are not met.

Week 8 & 9-7


Advantages of nonparametric or
distribution-free procedures:

 Nonparametric methods usually involve simpler


computations than the corresponding
parametric methods (especially when the
sample size is small) and are therefore easier to
understand and apply.
 The techniques can be applied when sample
sizes are very small.

Week 8 & 9-8


Disadvantages of nonparametric
or distribution-free procedures

 Tend to waste information because exact


numerical data are often reduced to a
qualitative form -- the actual magnitude of the
differences are ignored (e.g. in the case of sign
test)
 Not as efficient as parametric tests – so need
stronger evidence such as larger sample size or
greater differences) before we reject a null
hypothesis.

Week 8 & 9-9


nonparametric:

One Sample Two Samples More Than Two


Samples

Dependent Independent

Wilcoxon Wilcoxon Wilcoxon Kruskal-Wallis


Signed Rank Signed Rank Rank Sum Test
Test Test Test

parametric counterpart:

t-test,
t-test, t-test, One-way
two Independent
one sample paired sample ANOVA
samples

Week 8 & 9-10


Wilcoxon Signed Rank Test (W),
One Sample
• For one sample, the Wilcoxon signed rank
method tests whether the sample could have been
drawn from a population having a hypothesized
value as its median.
• Assumptions:
 Data are assumed to be continuous and of the

interval or ratio scales of measurement.

Week 8 & 9-11


Hypothesis and Decision Rule
 The Research Question (H1): Test the value of a single
population median, m { , >, <} m0
• Test statistic /Critical Value/Decision Rule: W, Wilcoxon
signed rank test
Two-Tail Test Left-Tail Test Right-Tail Test
H0: M = M0 H0: M  M0 H0: M  M0
H1: M  M0 H1: M  M0 H1: M  M0

Reject Do Not Reject Reject Do Not Reject Do Not Reject Reject


Reject
WL WU WL WU
Reject H0 if W < WL Reject H0 if W < WL Reject H0 if W > WU
or if W > WU Week 8 & 9-12
Example 11.1

• According to the director of a county tourist bureau, there


is a median of 10 hours of sunshine per day during the
summer months. For a random sample of 20 days during
the past three summers, the number of hours of sunshine
has been recorded below. Use the 0.05 level in
evaluating the director’s claim.
8 9 8 10 9 7 7
9 7 7 9 8 11 9
10 7 8 11 8 12

Week 8 & 9-13


Example 11.1
Xi
(continued)
Hrs di |di| Hrs di |di|
di = xi – m0 = Xi - 10
8 –2 2 9 –1 1
9 –1 1 8 –2 2 There are:
8 –2 2 11 1 1 7 with rank 1
10 0 0 9 –1 1 1, 2, 3, 4, 5, 6, 7
9 –1 1 10 0 0 average rank = 4
7 –3 3 7 –3 3 6 with rank 2
8, 9, 10, 11, 12, 13
7 –3 3 8 –2 2
average rank = 10.5
9 –1 1 11 1 1
5 with rank 3
7 –3 3 8 –2 2 14, 15, 16, 17, 18
7 –3 3 12 2 2 average rank = 16

Week 8 & 9-14


Example 11.1
(continued)
Hrs di |di| Rank R+ R- Hrs di |di| Rank R+ R-
8 –2 2 10.5 - 10.5 9 –1 1 4 - 4
9 –1 1 4 - 4 8 –2 2 10.5 - 10.5
8 –2 2 10.5 - 10.5 11 1 1 4 4 -
10 0 0 - - - 9 –1 1 4 - 4
9 –1 1 4 - 4 10 0 0 - - -
7 –3 3 16 - 16 7 –3 3 16 - 16
7 –3 3 16 - 16 8 –2 2 10.5 - 10.5
9 –1 1 4 - 4 11 1 1 4 4 -
7 –3 3 16 - 16 8 –2 2 10.5 - 10.5
7 –3 3 16 - 16 12 2 2 10.5 10.5 -
So, R+ = 18.5, R– = 152.5
Week 8 & 9-15
Example 11.1
Hypothesis Testing (continued)

• I. H0: m = 10 hours H1: m  10 hours


• II. Rejection Region:  = 0.05,
n = 18 data values not equal to the
hypothesized median of 10 (i.e. di ≠ 0)
If R+ < 41 or R+ > 130, reject H0 (from
Table A.8) .
• III. Test Statistics:
R+ = 18.5

Week 8 & 9-16


Example 11.1, concluded

• IV. Conclusion: Since the test statistic of R+ =


18.5 falls below the critical value of W = 41, we
reject H0 with at least 95% confidence.

• V. Implications: There is enough evidence to


dispute the director’s claim that this county has a
median of 10 days of sunshine per day during
the summer months.

Week 8 & 9-17


Wilcoxon Signed Rank Test
1 Sample

 9 randomly selected students.


 Height: 183,151,149,163,174,160,172,175,163
 Test at   0.05
H 0 : m  160
H1 : m  160

Week 8 & 9-18


(continued)
di = xi – m0 = Height – 160

Height di |di| Rank R+ R–


149 –11 11 4 4
151 –9 9 3 3
160 0 0
163 3 3 1.5 1.5
163 3 3 1.5 1.5
172 12 12 5 5
174 14 14 6 6
175 15 15 7 7
183 23 23 8 8
29 7
Week 8 & 9-19
(continued)

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)

 When the number of observation for which di ≠


0 is n > 20, a z-test will be a close
approximation to the Wilcoxon signed rank test.
 W distribution approaches a normal curves as n
becomes larger.

Week 8 & 9-21


W (The Normal Approximation)
(continued)

 Z-test approximation to the Wilcoxon signed rank test:


 Test Statistics:
n(n  1)
w
z 4
n(n  1)(2n  1) Where, W = sum of the R+ ranks
n = number of observations
24 for which di = 0

Week 8 & 9-22


nonparametric:

One Sample Two Samples More Than Two


Samples

Dependent Independent

Wilcoxon Wilcoxon Wilcoxon Kruskal-Wallis


Signed Rank Signed Rank Rank Sum Test
Test Test Test

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

interval or ratio scales of measurement.


 The observations must be related or dependent.

Week 8 & 9-24


Hypothesis and Decision Rule
 The Research Question (H1): Test the difference in two
population medians, paired samples, md {, >, <} 0

Two-Tail Test Left-Tail Test Right-Tail Test


H0: Md = 0 H0: Md  0 H0: Md  0
H1: Md  0 H1: Md  0 H1: Md  0
Where md = population median of di = xi - yi

Reject Do Not Reject Reject Do Not Reject Do Not Reject Reject


Reject
WL WU WL WU
Reject H0 if W < WL Reject H0 if W < WL Reject H0 if W > WU
or if W > W Week 8 & 9-25
Wilcoxon Signed-Rank Test Continued

Compute the
Rank the absolute
differences between
differences from
related
low to high.
observations.
|di|  Rank
di = xi – yi

Return the signs to Compare the sum of


R+ the ranks and sum positive rank with the
R– positive and negative W value. R+
ranks. WL , WU
R+ , R – Week 8 & 9-26
Example 11.2

 The Gagliano Research Institute for


Business Studies is comparing the research
and development expense (R&D) as a
percent of income for a sample of glass
manufacturing firms for 2000 and 2001. At
the .05 significance level has the R&D
expense declined? Use 0.05 significance
level.

Week 8 & 9-27


Example 11.2 Continued
H0: Md  0
Step 1:
H0: The percent stayed the same. H1: Md < 0
H1: The percent declined. n=8
= 0.05
WL = 6, WU = 30
Step 2:
H0 is rejected if the Reject Do not reject
sum of positive rank is WL
less than 6.
Reject H0 if R+ < WL

Week 8 & 9-28


Example 11.2 Continued Continued
di = yi – xi
Company 2000, xi 2001, yi di ldil Rank R- R+
Savoth Glass 20 16 -4 4 4 4 *
Ruisi Glass 14 13 -1 1 1 1 *
Rubin Inc. 23 20 -3 3 3 3 *
Vaught 24 17 -7 7 6.5 6.5 *
Lambert Glass 31 22 -9 9 8 8 *
Pimental 22 20 -2 2 2 2 *
Olson Glass 14 20 6 6 5 * 5
Flynn Glass 18 11 -7 7 6.5 6.5 *

Total 31 5

The sum of positive rank is 5, which is less than the


critical value of WL. H0 is rejected. The percent has
declined from one year to the next.
R+ = 5 < WL = 6
Week 8 & 9-29
Wilcoxon Signed Rank Test
2 Related Samples

 Lecturers in Economics 2006 2005


department claim that
they are losing weight 1 62 70
because of the 2 50 55
toughness in teaching.
3 75 70
Test the claim at 0.05
level of significance. 4 50 50
5 52 54
6 64 60
7 46 45

Week 8 & 9-30


(continued)

di = xi – yi = 2006 – 2005

2006 2005 di |di| Rank R+ R–


62 70 –8 8 6 6
50 55 –5 5 4.5 4.5
75 70 5 5 4.5 4.5
50 50 0 0
52 54 –2 2 2 2
64 60 4 4 3 3
46 45 1 1 1 1
8.5 12.5
Week 8 & 9-31
(continued)

H0: Md ≥ 0 (The lecturers in Econ Dept are not losing weight)


H1: Md < 0 (The lecturers in Econ Dept are losing weight)
Critical Value:
 = 0.05 (one-tail), n = 6 (di ≠ 0 ), WL = 3
Decision Rule: Reject H0 if R+ < 3
Test Statistics: R+ = 8.5 Reject Do Not Reject
Decision:
R+ > 3, do not reject H0 at  = 0.05 WL
Conclusion:
There is insufficient evidence to conclude that the lecturers in Econ
Dept are losing weight.
Week 8 & 9-32
W (The Normal Approximation)

 The z-test described in the preceding section


can be used for paired samples.
 When the number of observation for which di ≠
0 is n > 20, a z-test will be a close
approximation to the Wilcoxon signed rank test.

Week 8 & 9-33


W (The Normal Approximation)
(continued)

 Z-test approximation to the Wilcoxon signed rank test:


 Test Statistics:
n(n  1)
w
z 4
n(n  1)(2n  1) Where, W = sum of the R+ ranks
n = number of observations
24 for which di ≠ 0

Week 8 & 9-34


Wilcoxon
Rank
Sum Test

Week 8 & 9-35


Wilcoxon Rank Sum Test for
Comparing Two Independent Samples
 Compares two independent samples and is a non-
parametric counterpart to the two sample pooled t-test.
 Test two independent population medians
• Assumptions:
 The samples are random and independent drawn.

 The scale of measurement of the data must be at

least ordinal.
 Populations have approximately the same shape.

Week 8 & 9-36


Wilcoxon Rank-Sum Test:
Small Samples
 Can use when both n1 , n2 ≤ 10
 Assign ranks to the combined n1 + n2 sample
observations
 If unequal sample sizes, let n1 refer to smaller-sized
sample
 Smallest value rank = 1, largest value rank = n1 + n2
 Assign average rank for ties
 Sum the ranks for each sample: W1 and W2
 Obtain test statistic, W1 (from smaller sample)

Week 8 & 9-37


Checking the Rankings

 The sum of the rankings must satisfy the


formula below
 Can use this to verify the sums W1 and W2

n(n  1)
W1 W2 
2

where n = n1 + n2

Week 8 & 9-38


Wilcoxon Rank-Sum Test:
Hypothesis and Decision Rule
M1 = median of population 1; M2 = median of population 2
Test statistic = T1 (Sum of ranks from smaller sample)

Two-Tail Test Left-Tail Test Right-Tail Test


H0: M1 = M2 H0: M1  M2 H0: M1  M2
H1: M1  M2 H1: M1  M2 H1: M1  M2

Reject Do Not Reject Reject Do Not Reject Do Not Reject Reject


Reject
W1L W1U W1L W1U
Reject H0 if W1 < W1L Reject H0 if W1 < W1L Reject H0 if W1 > W1U
or if W1 > W1U
Week 8 & 9-39
Wilcoxon Rank-Sum Test:
Small Sample Example

Sample data are collected on the capacity rates


(% of capacity) for two factories.
Are the median operating rates for two factories H0: M1 = M2
the same?
H1: M1  M2
 For factory A, the rates are 71, 82, 77, 94, 88
 For factory B, the rates are 85, 82, 92, 97
Test for equality of the population medians
at the 0.05 significance level

Week 8 & 9-40


Wilcoxon Rank-Sum Test:
Small Sample Example
(continued)
Ranked Capacity Rank
Capacity Factory A Factory B Factory A Factory B
values: 71 1
77 2
Tie in 3rd and 82 3.5
4th places 82 3.5
85 5
88 6
92 7
94 8
97 9
Rank Sums: 20.5 24.5
Week 8 & 9-41
Wilcoxon Rank-Sum Test:
Small Sample Example
(continued)

Factory B has the smaller sample size, so


the test statistic is the sum of the
Factory B ranks:
W1 = 24.5

The sample sizes are:


n1 = 4 (factory B)
n2 = 5 (factory A)
The level of significance is α = .05
Week 8 & 9-42
Wilcoxon Rank-Sum Test:
Small Sample Example
(continued)
3 4 5
 Lower and 3 5, 16 6, 18 6, 21
Upper
Critical 4 6, 18 11, 25 12, 28
Values for 5 6, 21 12, 28 18, 37
T1 from
Appendix
table A.9: W1L = 12 and W1U = 28

Week 8 & 9-43


Wilcoxon Rank-Sum Test:
Small Sample Solution
(continued)

  = .05 Test Statistic (Sum of


 n1 = 4 , n2 = 5 ranks from smaller sample):
Two-Tail Test W1 = 24.5
H0: M1 = M2
H1: M1  M2
Decision:
Reject Do Not Reject
Do not reject at  = 0.05
Reject
W1L=12 W1U=28 Conclusion:
There is not enough evidence to
Reject H0 if T1 < T1L=12 prove that the medians are not
or if T1 > T1U=28 equal.
Week 8 & 9-44
Wilcoxon Rank SumTest
2 Independent Samples
 Miss Pok claim that AC students get higher score in
Progress Test 1.
 Randomly select samples:

AC 40 34 50 28 41
BA 29 31 50 29 20 31

 Test the claim at 0.05 level of significance.

Week 8 & 9-45


(continued)

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

Week 8 & 9-46


(continued)

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)

 The Z test statistic is

W1  μW1
Z
σW1

 Where Z approximately follows a standardized normal


distribution

Week 8 & 9-49


Wilcoxon Rank-Sum Test:
Normal Approximation Example

Use the setting of the prior example:


The sample sizes were:
n1 = 4 (factory B)

n2 = 5 (factory A)

The level of significance was α = .05

The test statistic was W1 = 24.5

Week 8 & 9-50


Wilcoxon Rank-Sum Test:
Normal Approximation Example
(continued)
n1 (n  1) 4(9  1)
μW1    20
2 2

n1 n2 (n  1) 4 (5) (9  1)
σW1    2.739
12 12

 The test statistic is


W1  μW1 24.5  20
Z   1.64
σW1 2.739
 Z = 1.64 is not greater than the critical Z value of 1.96
(for α = .05) so we do not reject H0 – there is not
sufficient evidence that the medians are not equal
Week 8 & 9-51
Week 8 & 9

Non-parametric Tests
[Part 2]

Week 8 & 9-52


Learning Objectives

• Differentiate between nonparametric and


parametric hypothesis tests.
• Determine when a nonparametric test should be
used instead of its parametric counterpart.
• Appropriately apply each of the nonparametric
methods introduced.

Week 8 & 9-53


Key Terms

Nonparametric tests
• Wilcoxon signed rank test:

 One sample

 Paired samples

• Wilcoxon rank sum test, two independent

samples.
• Kruskal-Wallis Test, three or more

independent samples.
• Spearman Rank Correlation Coefficient.

Week 8 & 9-54


nonparametric:

One Sample Two Samples More Than Two


Samples

Dependent Independent

Wilcoxon Wilcoxon Wilcoxon Kruskal-Wallis


Signed Rank Signed Rank Rank Sum Test
Test Test Test

parametric counterpart:

t-test,
t-test, t-test, One-way
two Independent
one sample paired sample ANOVA
samples

Week 8 & 9-55


Kruskal-Wallis Rank Test
 Tests the equality of more than 2 population
medians
 It is an alternative to the one-way ANOVA.
 Use when the normality assumption for one-
way ANOVA is violated.
 The chi-square distribution is the test statistic.
 Each sample should have at least five
observations.

Week 8 & 9-56


Assumptions
 Assumptions:
 The samples are random and independent

drawn.
 The scale of measurement of the data must

be at least ordinal.
 Populations have the same variability.

 Populations have the same shape.

Week 8 & 9-57


Kruskal-Wallis Test Procedure

• The Research Question (H1): The medians differs


from the others.

• Null and alternative hypotheses


• H0: m1 = m2 = … = mk for the j = 1 through k populations.
(The population medians are equal)
• H1: At least one mj differs from others.
(The population medians are not equal)

Week 8 & 9-58


Kruskal-Wallis Test Procedure
(continued)

 Obtain relative rankings for each value


 In event of tie, each of the tied values gets the
average rank
 Sum the rankings for data from each of the c

groups
 Compute the H test statistic

Week 8 & 9-59


Kruskal-Wallis Test Procedure
(continued)

 The Kruskal-Wallis H test statistic:


(with c – 1 degrees of freedom)

 12 c T2 
H  j
  3(n  1)
 n(n  1) j1 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

Week 8 & 9-60


Kruskal-Wallis Test Procedure
(continued)

 Complete the test by comparing the


calculated H value to a critical 2 value from
the chi-square distribution with c – 1
degrees of freedom

 Decision rule
  Reject H0 if test statistic H > 2U
 Otherwise do not reject H0
0 
Do not Reject H0
reject H0
2U

Week 8 & 9-61


Kruskal-Wallis: Example 5.1

 Do different departments have different class


sizes?
Class size Class size Class size
(Math, M) (English, E) (Biology, B)
23 55 30
45 60 40
54 72 18
78 45 34
66 70 44

Week 8 & 9-62


Kruskal-Wallis Example
 Do different departments have different class
sizes?
Class size Class size Class size
Ranking Ranking Ranking
(Math, M) (English, E) (Biology, B)
23 2 55 10 30 3
41 6 60 11 40 5
54 9 72 14 18 1
78 15 45 8 34 4
66 12 70 13 44 7
 = 44  = 56  = 20

Week 8 & 9-63


Kruskal-Wallis Example
(continued)

H0 : MedianM  MedianE  MedianH


HA : Not all population Medians are equal

 The H statistic is
 12 c R2j 
H


n(n 1) j 1 nj
  3(n  1)


 12  442 562 202 


      3(15  1)  6.72
15(15  1)  5 5 5 

Week 8 & 9-64


Kruskal-Wallis Example
(continued)
 Compare H = 6.72 to the critical value from the
chi-square distribution for 3 – 1 = 2 degrees of
freedom and  = .05:
χ  5.991
2
U


Since H = 6.72 > U  5.991 ,
2

reject H0

There is sufficient evidence to reject that


the population medians are all equal
Week 8 & 9-65
Example 5.2

Keely Ambrose, director of Human


Resources for Miller Industries, wishes to
study the percent increase in salary for
middle managers at the four manufacturing
plants. She gathers a sample of managers
and determines the percent increase in
salary from last year to this year. At the
5% significance level can Keely conclude
that there is a difference in the percent
increases for the various plants?

Week 8 & 9-66


Ranked Increases in Managers’
Salaries
(continued)

Milville Camden Eaton Vineland


2.2 1.9 3.7 5.7
3.6 2.7 4.5 6.8
4.9 3.1 7.1 8.9
6.8 6.9 9.3 11.6
7.1 8.3 11.6 13.9

Week 8 & 9-67


Ranked Increases in Managers’
Salaries

Milville Rank Camden Rank Eaton Rank Vineland Rank


2.2 2 1.9 1 3.7 6 5.7 9

3.6 5 2.7 3 4.5 7 6.8 10.5

4.9 8 3.1 4 7.1 13.5 8.9 16

6.8 10.5 6.9 12 9.3 17 11.6 18.5

7.1 13.5 8.3 15 11.6 18.5 13.9 20

TM = 39 TC= 35 TE = 62 TV = 74

Week 8 & 9-68


(continued)

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.

Week 8 & 9-69


(continued)
 12 c R 2j 
H  
 n ( n  1)

j 1 n j 
  3 ( n  1)

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.

Week 8 & 9-70


The Spearman Rank Correlation
Coefficient
 Pearson’s coefficient of correlation - a measure of the
strength of the linear relationship between two variables
called the Pearson correlation coefficient
 The Spearman Rank Correlation Coefficient is the
simple correlation coefficient calculated from variables
converted to ranks from their original values.
 Reports the association between two sets of ranked
observations.
 Similar to Pearson’s coefficient of correlation, but is
based on ranked data.
 Ranges from –1.00 up to 1.00

Week 8 & 9-71


Example 11.6 - Coastal Distribution

 Consider, for example, Coastal Distribution, which provides


emergency one-day delivery service to small manufacturing
companies from Penang to Boston. This service is important
to small companies who are making the move to just-in-time
manufacturing but don't have the well-established
distribution system of larger companies. Recently, the
company's sales department undertook a study of its clients
to determine whether there is a significant correlation
between the number of deliveries made per month and the
number of employees working for the company. They hoped
this information would be useful in trying to correlate future
equipment needs with an expanding client list.
Week 8 & 9-72
(continued)

 Table 11.6 presents data collected from 12 clients selected


at random. The individual in charge of the study wishes to
determine whether there is significant correlation. He does
not feel justified in making the bivariate normal distribution
assumption required for the Pearson correlation coefficient.
Thus, he has decided to calculate the nonparametric
Spearman correlation coefficient.
 The first step is to convert the data in Table 11 to ranks.
 Note that the ranks are done separately for each variable,
again ranking from lowest to highest.

Week 8 & 9-73


Table 11.6a: Sample Data and Data in Ranked
Form for Coastal Distribution
(continued)
No. of Deliveries Employees (X) No. of Deliveries Employees (X)
Needed (Y) Needed (Y) (in Ranked Form)
(in Ranked Form)
23 140 11 11
11 101 7 9
10 43 6 3
4 55 3 5
20 79 10 8
15 134 8 10
7 75 5 6
42 211 12 12
3 78 2 7
2 36 1 2
15 45 9 4
6 11 4 1

Week 8 & 9-74


Spearman Rank Correlation Coefficient’s Equation
(continued)

n
6 d i
2

rs  1  i 1

n n
3

Where, di=Yi-Xi (difference in ranks)


n = sample size

Week 8 & 9-75


Table 11.6b
(continued)
Y (Rank) X (Rank) d=Y–X d2
11 11 0 0
7 9 -2 4
6 3 3 9
3 5 -2 4
10 8 2 4
8 10 -2 4
5 6 -1 1
12 12 0 0
2 7 -5 25
1 2 -1 1
9 4 5 25
4 1 3 9
Sum of squared
difference (d2) = 86 Week 8 & 9-76
(continued)
n
6 d i
2

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)

Week 8 & 9-78


(continued)

 The null and alternative hypotheses are


H0: ρs = 0
H1: ρs ≠ 0

 the test statistic :

Week 8 & 9-79


(continued)

 To test the null hypothesis using the t-statistic,


we go to the t-distribution table with n - 2 = 10
degrees of freedom for the appropriate
significance level.
 Using a significance level of 0.05, we get critical
t-values equal to ±2.228. The decision rule
becomes:
If t > 2.228, reject Ho. If t < -2.228, reject Ho.
Otherwise, do not reject Ho.

Week 8 & 9-80


(continued)

 Since t = 3.092 > 2.228, we reject H0 and


conclude a significant correlation exists
between the number of emergency deliveries
needed and the number of employees working
at the company.
 As with the other nonparametric tests
introduced in this chapter, ties are handled by
giving each tied value the mean of the rank
positions for which it is tied. As an example, if
the ranked observations were 10, 12, 12, 13,
the rankings would be 1, 2.5, 2.5, 4.
Week 8 & 9-81
Example 11.7

 The S&P Index is an Index of 100 stock options traded on


the Chicago Board Options Exchange. The MMI is an Index
of 20 stocks with options traded on the American Stock
Exchange. Since options are volatile, the assumption of
normal distribution may not be appropriate, an the
Spearman rank correlation coefficient may provide us with
information about the association between two indexes.
Using the reported data on the two indexes, compute the rs
statistic, and test the null hypothesis that the MMI and the S
& P 100 are not related against the alternative that they are
positively correlated.

Week 8 & 9-82


(continued)
MMI S&P
(in Ranked (in Ranked
MMI S&P100 Form) Form) d d2
220 151 7 6 1 1
218 150 5 5 0 0
216 148 3 3 0 0
217 149 4 4 0 0
215 147 2 2 0 0
213 146 1 1 0 0
219 152 6 7 -1 1
236 165 9 10 -1 1
237 162 10 9 1 1
235 161 8 8 0 0

4
Week 8 & 9-83
Spearman Rank Correlation
Coefficient: Example 14-11
(continued)

 The null and alternative hypotheses: Table 11: =0.005


n.
H0: ρs ≤ 0 ..
7 ------
H1: ρs > 0
8 0.881
 We find from the table of Critical Values of 9 0.833
Spearman Rank Correlation Coefficient that 10 0.794
for  = 0.005 and n = 10, the critical point is 11
.. 0.818
.
0.794.

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

Week 8 & 9-84


(continued)

 Since rs=0.9758 > 0.794, we reject the null hypothesis


and conclude that the MMI and S&P are positively
correlated.

Week 8 & 9-85

You might also like