16 - 1 copyright © 2004 by the mcgraw-hill companies, inc. all rights reserved
TRANSCRIPT
16 - 2
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
1.1. Conduct the sign test for single and dependent samples using the binomial and standard normal distributions
as the test statistics
2.2. Conduct a test of hypothesis for dependent samples using the Wilcoxon signed-rank test
When you have completed this chapter, you will be able to:
3.3. Conduct and interpret the Wilcoxon rank-sum test for independent samples
16 - 3
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
4.4.
5.5.
6.6.
Conduct and interpret the Kruskal-Wallis test
for several independent samples
Compute and interpret Spearman’s coefficient of rank correlation
Conduct a test of hypothesis to determine whether the correlation among the ranks in the population is
different from zero
16 - 4
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
TerminologyRange
…is the difference between the largest and the smallest value
…is the difference between the largest and the smallest value
Only two values are used in its calculation It is influenced by an extreme value It is easy to compute and understand
Only two values are used in its calculation It is influenced by an extreme value It is easy to compute and understand
16 - 5
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
The Sign TestThe Sign Test
The Sign Test is based on the sign of a difference between two related observations
... no assumption is necessary regarding the shape of the population of differences
… the binomial distribution is the test statistic for small samples and the standard normal (z) for
large samples
… the test requires dependent (related) samples
16 - 6
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Determine the sign of the difference
between related pairs
Determine the sign of the difference
between related pairs1. Determine the number of usable pairs
2. Compare the number of positive (or negative) differences to the critical value
3. n is the number of usable pairs (without ties), x is the number of pluses or minuses,
and the binomial probability p=.5
The Sign TestThe Sign Test …continued
Procedure to conduct the test:
16 - 7
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
…if the number of pluses or minuses is more than n/2, then
…if the number of pluses or minuses is less than n/2, then
Normal ApproximationNormal Approximation
z x n
n
( . ) .
.
5 5
5
z x n
n
( . ) .
.
5 5
5
…if both and are greater than 5,
the z distribution is appropriate
np n( )1 p
16 - 8
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
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 the sign test
Normal ApproximationNormal Approximation
16 - 9
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Company 2000 2001 Difference Sign
Savoth Glass 20 16 4 +
Ruisi Glass 14 13 1 +
Rubin Inc.. 23 20 3 +
Vaught 24 17 7 +
Lambert Glass 31 22 9 +
Pimental 22 20 2 +
Olson Glass 14 20 - 6 -
Flynn Glass 18 11 7 +
Company 2000 2001 Difference Sign
Savoth Glass 20 16 4 +
Ruisi Glass 14 13 1 +
Rubin Inc.. 23 20 3 +
Vaught 24 17 7 +
Lambert Glass 31 22 9 +
Pimental 22 20 2 +
Olson Glass 14 20 - 6 -
Flynn Glass 18 11 7 +
Normal ApproximationNormal Approximation
Continued…
16 - 10
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Step 1: H0: p=.5 H1: p<.5
Step 2: H0: is rejected if the number of negative signs is 0 or 1
Step 3: There is one negative difference, i.e. there was an increase in the percent for one company
Step 4: H0 is rejected
R&D expense as a percent of income declined from 2000 to 2001
Normal ApproximationNormal Approximation
Continued…
16 - 11
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Testing a Hypothesis About a Median
Testing a Hypothesis About a Median
When testing the value of the median, we use the
normal approximation to the binomial
distribution
When testing the value of the median, we use the
normal approximation to the binomial
distribution The z distribution is used as the test statistic
16 - 12
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
The Gordon Travel Agency claims that their median airfare for all their clients to all
destinations is $450.
This claim is being challenged by a competing agency, who believe the
median is different from $450.
A random sample of 300 tickets revealed 170 tickets were below $450.
Use the 0.05 level of significance.
16 - 13
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Continued…
H0 is rejected if z is > than –1.96 or < than 1.96
… the value of z is 2.252
H0 is rejected. We conclude that the median is not
$450
450$ median :H $450 =median : 10 H
252.23005.
)300(50.)5.170(
5.50.)5.(
nnxz
16 - 14
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Wilcoxon Signed-Rank Test
… the test requires the ordinal scale of measurement
… the observations must be related or dependent
Use the Wilcoxon Signed-Rank if the assumption of normality is violated for the paired-t test
Note
ontinued…
16 - 15
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Wilcoxon Signed-Rank Test
Steps 1. Compute the differences between related observations
2. Rank the absolute differences from low to high
3. Return the signs to the ranks and sum positive and negative ranks
4. Compare the smaller of the two rank sums
with the T value, obtained from the Appendix
of Wilcoxon T values.
16 - 16
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Wilcoxon Signed-Rank Test
Use the Wilcoxon matched-pair signed-rank test to determine if the R&D expenses as a percent of
income (EXAMPLE 1) have declined. Use the .05 significance level
Step 1: H0: The percent stayed the same H1: The percent declined
Step 2: H0 is rejected if the smaller of the rank
sums is less than or equal to 5 See the Appendix of Wilcoxon T Values
ontinued…
16 - 17
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Company 2000 2001 Difference ABS-Diff 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 7 7 *
Lambert Glass 31 22 9 8 8 8 *
Pimental 22 20 2 2 2 2 *
Olson Glass 14 20 - 6 6 5 * 5
Flynn Glass 18 11 7 7 6 6 *ontinued…
Wilcoxon Signed-Rank Test
16 - 18
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
The smaller rank sum is 5, which is equal to the critical value of T.
H0 is rejectedThe percent has declined from one year to the next.
Company 2000 2001 Difference ABS-Diff 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 7 7 *Lambert Glass 31 22 9 8 8 8 *Pimental 22 20 2 2 2 2 *Olson Glass 14 20 - 6 6 5 * 5
Flynn Glass 18 11 7 7 6 6 *
Wilcoxon Signed-Rank Test
16 - 19
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
...used to determine if two independent samples came from the same or equal populations
…no assumption about the shape of the population is required
…the data must be at least ordinal scale
…each sample must contain at least eight observations
Wilcoxon Rank-Sum Test
16 - 20
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
…to determine the value of the test statistic W, all data values are ranked from low to high
as if they were from a single population
…the sum of ranks for each of the two samples is determined
Wilcoxon Rank-Sum Test
The smaller of the two sums W is used to compute the test statistic from:
12
)1(2
)1(
2121
211
nnnn
nnnW
z
16 - 21
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Your school purchased two vehicles, a Ford and a Chevrolet, for the
administration’s use when travelling.
The repair costs for the two cars over the last three years is shown
on the next slide.
At the .05 significance level is there a difference in the two distributions?
Wilcoxon Rank-Sum Test
ontinued…
16 - 22
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Ford ($) Rank Chevrolet($) Rank
25.31 3.0 14.89 1.0
33.68 5.5 20.31 2.0
46.89 7.0 25.97 4.0
51.83 8.0 33.68 5.5
87.65 13.0 68.98 9.0
87.90 14.0 78.23 10.0
90.89 15.0 80.31 11.0
120.67 16.0 81.75 12.0
157.90 17.0
81.5 71.5
Wilcoxon Rank-Sum Test
ontinued…
16 - 23
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Step 1: H0: The percent stayed the same H1: The percent declined
Step 2: H0 is rejected if z >1.96 or z is less than –1.96
Wilcoxon Rank-Sum Test
Step 3: The value of the test statistic is 0.914.
12
)198)(9(82
)198(85.81
12
)1(2
)1(
2121
211
nnnn
nnnW
z= 0.914= 0.914
ontinued…
16 - 24
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Wilcoxon Rank-Sum Test
Step 4: The value of the test statistic is 0.914.
We do not reject the null hypothesis!
We cannot conclude that there is a
difference in the distributions of the repair costs
of the two vehicles!
We cannot conclude that there is a
difference in the distributions of the repair costs
of the two vehicles!
16 - 25
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Kruskal-Wallis Test: Analysis of Variance by
Ranks…used to compare three or more samples
to determine if they came from equal populations
…the ordinal scale of measurement is required
…it is an alternative to the one-way ANOVA
…the chi-square distribution is the test statistic
…each sample should have at least five observations
…the sample data is ranked from low to high as if it were a single group
Note
ontinued…
16 - 26
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
The test statistic is given by:
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Kruskal-Wallis Test: Analysis of Variance by
Rankscontinued…
)HN N
R
n
R
n
R
nN
k
k
12
13 1
12
1
22
2
2
( )
( ) ( )...
( )(
16 - 27
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
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?
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Kruskal-Wallis Test: Analysis of Variance by
Ranks
ontinued…
16 - 28
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Millville Rank Camden Rank Eaton Rank Cliff Rank
2.2 2.0 1.9 1 3.7 6.0 5.7 9.0
3.6 5.0 2.7 3 4.5 7.0 6.8 10.5
4.9 8.0 3.1 4 7.1 13.5 8.9 16.0
6.8 10.5 6.9 12 9.3 17.0 11.6 18.5
7.1 13.5 8.3 15 11.6 18.5 13.9 20.0
39.0 35 62.0 74.0
Millville Rank Camden Rank Eaton Rank Cliff Rank
2.2 2.0 1.9 1 3.7 6.0 5.7 9.0
3.6 5.0 2.7 3 4.5 7.0 6.8 10.5
4.9 8.0 3.1 4 7.1 13.5 8.9 16.0
6.8 10.5 6.9 12 9.3 17.0 11.6 18.5
7.1 13.5 8.3 15 11.6 18.5 13.9 20.0
39.0 35 62.0 74.0
PlantsPlants
ontinued…
16 - 29
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Step 1: H0: The populations are the same H1: The populations are not the same
Step 2: H0 is rejected if x2 is greater than 7.185.
There are 3 degrees of freedom at the .05 significance level.
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Kruskal-Wallis Test: Analysis of Variance by
Ranks
ontinued…
16 - 30
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
)120(35
74
5
62
5
35
5
39
)120(20
12 2222
)1(3)()()()(
)1(12 2
4
2
23
2
22
1
21
N
n
R
n
R
n
R
n
R
NNH
k
= 5.949= 5.949
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Kruskal-Wallis Test: Analysis of Variance by
RanksMillville Rank Camden Rank Eaton Rank Cliff Rank 2.2 2.0 1.9 1 3.7 6.0 5.7 9.0 3.6 5.0 2.7 3 4.5 7.0 6.8 10.5 4.9 8.0 3.1 4 7.1 13.5 8.9 16.0 6.8 10.5 6.9 12 9.3 17.0 11.6 18.5 7.1 13.5 8.3 15 11.6 18.5 13.9 20.0
39.0 35 62.0 74.0
ontinued…
16 - 31
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
The null hypothesis is not rejected
Kruskal-Wallis Test: Analysis of Variance by
Ranks
Kruskal-Wallis Test: Analysis of Variance by
Ranks
There is no difference in the percent increases in the four plants
16 - 32
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Rank-Order CorrelationRank-Order Correlation
…Spearman’s coefficient of rank correlation reports the association between two sets of
ranked observations
Features
…it can range from –1.00 up to 1.00
…it is similar to Pearson’s coefficient of correlation, but is based on ranked data
ontinued…
16 - 33
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Spearman’s Rank-Order Correlation
Spearman’s Rank-Order Correlation
Formula (to find the coefficient of rank correlation)
d is the difference in the ranks and n is the number of observations.
rd
n ns 1
6
1
2
2
( )
ontinued…
16 - 34
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Spearman’s Rank-Order Correlation
Spearman’s Rank-Order Correlation
Testing the significance of rs
State the null hypothesis: Rank correlation in population is 0
State the alternate hypothesis:
Rank correlation in population is not 0.
The value of the test statistic is computed from …
t rs
nrs
s
21
16 - 35
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Spearman’s Rank-Order Correlation
Spearman’s Rank-Order Correlation
The preseason football rankings for the Atlantic Coast Conference by the coaches and sports writers
are shown below. What is the coefficient of rank correlation between the two groups?
School Coaches WritersMaryland 2 3NC State 3 4NC 6 6Virginia 5 5Clemson 4 2Wake Forest 7 8Duke 8 7Florida State 1 1
School Coaches WritersMaryland 2 3NC State 3 4NC 6 6Virginia 5 5Clemson 4 2Wake Forest 7 8Duke 8 7Florida State 1 1 ontinued…
16 - 36
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
School Coaches Writers d d2
Maryland 2 3 -1 1
NC State 3 4 -1 1NC 6 6 0 0Virginia 5 5 0 0Clemson 4 2 2 4Wake Forest 7 8 -1 1Duke 8 7 1 1Florida State 1 1 0 0
Spearman’s Rank-Order Correlation
Spearman’s Rank-Order Correlation
Total 8Total 8
ontinued…
16 - 37
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Spearman’s Rank-Order Correlation
Spearman’s Rank-Order Correlation
School Coaches Writers d d2
Maryland 2 3 -1 1
NC State 3 4 -1 1NC 6 6 0 0Virginia 5 5 0 0Clemson 4 2 2 4Wake Forest 7 8 -1 1Duke 8 7 1 1Florida State 1 1 0 0Total 8Total 8
= 0.905= 0.905)18(8
)8(61 2
)1(
61 2
2
nn
drs
There is a strong correlation between the ranks of the coaches and the sports writers!
There is a strong correlation between the ranks of the coaches and the sports writers!
16 - 38
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Test your learning…Test your learning…
www.mcgrawhill.ca/college/lindClick on…Click on…
Online Learning Centrefor quizzes
extra contentdata setssearchable glossaryaccess to Statistics Canada’s E-Stat data…and much more!