Chap. 15: Nonparametric Statistics
Download
Report
Transcript Chap. 15: Nonparametric Statistics
© 2000 Prentice-Hall, Inc.
Statistics
Nonparametric Statistics
Chapter 14
14 - 1
Learning Objectives
© 2000 Prentice-Hall, Inc.
1. Distinguish Parametric & Nonparametric
Test Procedures
2. Explain a Variety of Nonparametric Test
Procedures
3. Solve Hypothesis Testing Problems
Using Nonparametric Tests
4. Compute Spearman’s Rank Correlation
14 - 2
© 2000 Prentice-Hall, Inc.
Hypothesis Testing
Procedures
Hypothesis
Testing
Procedures
Parametric
Nonparametric
Wilcoxon
Rank Sum
Test
Z Test
14 - 3
t Test
One-Way
ANOVA
Kruskal-Wallis
H-Test
Many More Tests Exist!
Parametric Test
Procedures
© 2000 Prentice-Hall, Inc.
1. Involve Population Parameters
Example: Population Mean
2. Require Interval Scale or Ratio Scale
Whole Numbers or Fractions
Example: Height in Inches (72, 60.5, 54.7)
3. Have Stringent Assumptions
Example: Normal Distribution
4. Examples: Z Test, t Test, 2 Test
14 - 4
Nonparametric Test
Procedures
© 2000 Prentice-Hall, Inc.
1. Do Not Involve Population Parameters
Example: Probability Distributions, Independence
2. Data Measured on Any Scale
Ratio or Interval
Ordinal
Example: Good-Better-Best
Nominal
Example: Male-Female
3. Example: Wilcoxon Rank Sum Test
14 - 5
© 2000 Prentice-Hall, Inc.
Advantages of
Nonparametric Tests
1.
Used With All Scales
2.
Easier to Compute
Developed Originally Before
Wide Computer Use
3.
Make Fewer
Assumptions
4.
Need Not Involve
Population Parameters
5.
Results May Be as Exact
as Parametric
Procedures
14 - 6
© 1984-1994 T/Maker Co.
Disadvantages of
Nonparametric Tests
© 2000 Prentice-Hall, Inc.
1.
May Waste Information
If Data Permit Using
Parametric Procedures
Example: Converting Data
From Ratio to Ordinal Scale
2.
Difficult to Compute by
Hand for Large Samples
3.
Tables Not Widely
Available
14 - 7
© 1984-1994 T/Maker Co.
© 2000 Prentice-Hall, Inc.
Frequently Used
Nonparametric Tests
1. Sign Test
2. Wilcoxon Rank Sum Test
3. Wilcoxon Signed Rank Test
4. Kruskal Wallis H-Test
5. Friedman Fr-Test
14 - 8
© 2000 Prentice-Hall, Inc.
Sign Test
14 - 9
© 2000 Prentice-Hall, Inc.
Frequently Used
Nonparametric Tests
1. Sign Test
2. Wilcoxon Rank Sum Test
3. Wilcoxon Signed Rank Test
4. Kruskal Wallis H-Test
5. Friedman Fr-Test
14 - 10
Sign Test
© 2000 Prentice-Hall, Inc.
1.
2.
3.
4.
Tests One Population Median, (eta)
Corresponds to t-Test for 1 Mean
Assumes Population Is Continuous
Small Sample Test Statistic: # Sample
Values Above (or Below) Median
Alternative Hypothesis Determines
5. Can Use Normal Approximation If n 10
14 - 11
Sign Test Uses P-Value
to Make Decision
© 2000 Prentice-Hall, Inc.
P(X)
30%
Binomial: n = 8 p = 0.5
20%
.219
10%
0%
.004 .031
0
1
.273
.219
.109
2
.109
3
4
5
6
.031 .004
7
8 X
P-Value Is the Probability of Getting an Observation At
Least as Extreme as We Got. If 7 of 8 Observations
‘Favor’ Ha, Then P-Value = P(x 7) = .031 + .004 = .035.
If = .05, Then Reject H0 Since P-Value .
14 - 12
Sign Test Example
© 2000 Prentice-Hall, Inc.
You’re an analyst for ChefBoy-R-Dee. You’ve asked
7 people to rate a new
ravioli on a 5-point Likert
scale (1 = terrible to
5 = excellent. The ratings
are: 2 5 3 4 1 4 5.
At the .05 level, is there
evidence that the median
rating is at least 3?
14 - 13
Sign Test Solution
© 2000 Prentice-Hall, Inc.
H0:
Ha:
=
Test Statistic:
P-Value:
Decision:
Conclusion:
14 - 14
Sign Test Solution
© 2000 Prentice-Hall, Inc.
H0: = 3
Ha: < 3
=
Test Statistic:
P-Value:
Decision:
Conclusion:
14 - 15
Sign Test Solution
© 2000 Prentice-Hall, Inc.
H0: = 3
Ha: < 3
= .05
Test Statistic:
P-Value:
Decision:
Conclusion:
14 - 16
Sign Test Solution
© 2000 Prentice-Hall, Inc.
H0: = 3
Ha: < 3
= .05
Test Statistic:
S=2
(Ratings 1 & 2 Are
Less Than = 3:
2, 5, 3, 4, 1, 4, 5)
14 - 17
P-Value:
Decision:
Conclusion:
Sign Test Solution
© 2000 Prentice-Hall, Inc.
H0: = 3
Ha: < 3
= .05
Test Statistic:
S=2
(Ratings 1 & 2 Are
Less Than = 3:
2, 5, 3, 4, 1, 4, 5)
14 - 18
P-Value:
P(x 2) = 1 - P(x 1)
= .937
(Binomial Table, n = 7,
p = 0.50)
Decision:
Conclusion:
Sign Test Solution
© 2000 Prentice-Hall, Inc.
H0: = 3
Ha: < 3
= .05
Test Statistic:
S=2
(Ratings 1 & 2 Are
Less Than = 3:
2, 5, 3, 4, 1, 4, 5)
14 - 19
P-Value:
P(x 2) = 1 - P(x 1)
= .937
(Binomial Table, n = 7,
p = 0.50)
Decision:
Do Not Reject at = .05
Conclusion:
Sign Test Solution
© 2000 Prentice-Hall, Inc.
H0: = 3
Ha: < 3
= .05
Test Statistic:
S=2
(Ratings 1 & 2 Are
Less Than = 3:
2, 5, 3, 4, 1, 4, 5)
14 - 20
P-Value:
P(x 2) = 1 - P(x 1)
= .937
(Binomial Table, n = 7,
p = 0.50)
Decision:
Do Not Reject at = .05
Conclusion:
There Is No Evidence
Median Is Less Than 3
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
14 - 21
© 2000 Prentice-Hall, Inc.
Frequently Used
Nonparametric Tests
1. Sign Test
2. Wilcoxon Rank Sum Test
3. Wilcoxon Signed Rank Test
4. Kruskal Wallis H-Test
5. Friedman Fr-Test
14 - 22
Wilcoxon Rank Sum Test
© 2000 Prentice-Hall, Inc.
1. Tests Two Independent Population
Probability Distributions
2. Corresponds to t-Test for 2 Independent
Means
3. Assumptions
Independent, Random Samples
Populations Are Continuous
4. Can Use Normal Approximation If ni 10
14 - 23
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Procedure
1. Assign Ranks, Ri, to the n1 + n2
Sample Observations
If Unequal Sample Sizes, Let n1 Refer to
Smaller-Sized Sample
Smallest Value = 1
Average Ties
2. Sum the Ranks, Ti, for Each Sample
3. Test Statistic Is TA (Smallest Sample)
14 - 24
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Example
You’re a production planner. You want to
see if the operating rates for 2 factories is
the same. For factory 1, the rates (% of
capacity) are 71, 82, 77, 92, 88. For
factory 2, the rates are 85, 82,
94 & 97. Do the factory rates
have the same probability
distributions at the
.10 level?
14 - 25
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Solution
H0:
Ha:
=
n1 =
n2 =
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
Ranks
14 - 26
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Solution
H0: Identical Distrib.
Ha: Shifted Left or Right
=
n1 =
n2 =
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
Ranks
14 - 27
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Solution
H0: Identical Distrib.
Ha: Shifted Left or Right
= .10
n1 = 4 n2 = 5
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
Ranks
14 - 28
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum
Table (Portion)
= .05 one-tailed; = .10 two-tailed
n1
3
n2
14 - 29
3
4
5
:
4
5
TL TU TL TU TL TU
..
..
6
7
7
:
..
..
..
:
15 7 17 7 20
17 12 24 13 27
20 13 27 19 36
:
:
:
:
:
Wilcoxon Rank Sum Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Shifted Left or Right
= .10
n1 = 4 n2 = 5
Critical Value(s):
Reject
Do Not
Reject
Reject
13
14 - 30
27 Ranks
Test Statistic:
Decision:
Conclusion:
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
Rank Sum
14 - 31
Factory 2
Rate
Rank
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
82
77
92
88
Rank Sum
14 - 32
Factory 2
Rate
Rank
85
82
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
77
92
88
Rank Sum
14 - 33
Factory 2
Rate
Rank
85
82
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
77
2
92
88
Rank Sum
14 - 34
Factory 2
Rate
Rank
85
82
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3
77
2
92
88
Rank Sum
14 - 35
Factory 2
Rate
Rank
85
82
4
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3 3.5
77
2
92
88
Rank Sum
14 - 36
Factory 2
Rate
Rank
85
82
4 3.5
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3 3.5
77
2
92
88
Rank Sum
14 - 37
Factory 2
Rate
Rank
85
5
82
4 3.5
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3 3.5
77
2
92
88
6
Rank Sum
14 - 38
Factory 2
Rate
Rank
85
5
82
4 3.5
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3 3.5
77
2
92
7
88
6
Rank Sum
14 - 39
Factory 2
Rate
Rank
85
5
82
4 3.5
94
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3 3.5
77
2
92
7
88
6
Rank Sum
14 - 40
Factory 2
Rate
Rank
85
5
82
4 3.5
94
8
97
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3 3.5
77
2
92
7
88
6
Rank Sum
14 - 41
Factory 2
Rate
Rank
85
5
82
4 3.5
94
8
97
9
...
...
© 2000 Prentice-Hall, Inc.
Wilcoxon Rank Sum Test
Computation Table
Factory 1
Rate
Rank
71
1
82
3 3.5
77
2
92
7
88
6
Rank Sum
14 - 42
19.5
Factory 2
Rate
Rank
85
5
82
4 3.5
94
8
97
9
...
...
25.5
Wilcoxon Rank Sum Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Shifted Left or Right
= .10
n1 = 4 n2 = 5
Critical Value(s):
Reject
Do Not
Reject
Reject
13
14 - 43
27 Ranks
Test Statistic:
T2 = 5 + 3.5 + 8+ 9 = 25.5
(Smallest Sample)
Decision:
Conclusion:
Wilcoxon Rank Sum Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Shifted Left or Right
= .10
n1 = 4 n2 = 5
Critical Value(s):
Reject
Do Not
Reject
Reject
13
14 - 44
27 Ranks
Test Statistic:
T2 = 5 + 3.5 + 8+ 9 = 25.5
(Smallest Sample)
Decision:
Do Not Reject at = .10
Conclusion:
Wilcoxon Rank Sum Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Shifted Left or Right
= .10
n1 = 4 n2 = 5
Critical Value(s):
Reject
Do Not
Reject
Reject
13
14 - 45
Test Statistic:
T2 = 5 + 3.5 + 8+ 9 = 25.5
(Smallest Sample)
Decision:
Do Not Reject at = .10
Conclusion:
There Is No Evidence
27 Ranks
Distrib. Are Not Equal
© 2000 Prentice-Hall, Inc.
Wilcoxon Signed Rank Test
14 - 46
© 2000 Prentice-Hall, Inc.
Frequently Used
Nonparametric Tests
1. Sign Test
2. Wilcoxon Rank Sum Test
3. Wilcoxon Signed Rank Test
4. Kruskal Wallis H-Test
5. Friedman Fr-Test
14 - 47
Wilcoxon
Signed Rank Test
© 2000 Prentice-Hall, Inc.
1. Tests Probability Distributions of
2 Related Populations
2. Corresponds to t-test for Dependent
(Paired) Means
3. Assumptions
Random Samples
Both Populations Are Continuous
4. Can Use Normal Approximation If n 25
14 - 48
Signed Rank Test
Procedure
© 2000 Prentice-Hall, Inc.
1.
2.
3.
4.
5.
6.
Obtain Difference Scores, Di = X1i - X2i
Take Absolute Value of Differences, Di
Delete Differences With 0 Value
Assign Ranks, Ri, Where Smallest = 1
Assign Ranks Same Signs as Di
Sum ‘+’ Ranks (T+) & ‘-’ Ranks (T-)
Test Statistic Is T- (One-Tailed Test)
Test Statistic Is Smaller of T- or T+ (2-Tail)
14 - 49
Signed Rank Test
Computation Table
© 2000 Prentice-Hall, Inc.
X1i X2i Di = X1i - X2i |Di|
Ri Sign Sign Ri
X11 X21 D1 = X11 - X21 |D1| R1
±
± R1
X12 X22 D2 = X12 - X22 |D2| R2
±
± R2
X13 X23 D3 = X13 - X23 |D3| R3
±
± R3
:
:
±
± Rn
:
:
:
:
:
X1n X2n Dn = X1n - X2n |Dn| Rn
Total
14 - 50
T+ & T-
© 2000 Prentice-Hall, Inc.
Signed Rank Test
Example
You work in the finance department. Is the new
financial package faster (.05 level)? You collect
the following data entry times:
User
Current
New
Donna
9.98
9.88
Santosha 9.88
9.86
Sam
9.90
9.83
Tamika
9.99
9.80
Brian
9.94
9.87
Jorge
9.84
9.84
14 - 51
© 1984-1994 T/Maker Co.
© 2000 Prentice-Hall, Inc.
Signed Rank Test
Solution
H0:
Ha:
Test Statistic:
=
n’ =
Critical Value(s):
Do Not
Reject
Reject
T0
14 - 52
Decision:
Conclusion:
© 2000 Prentice-Hall, Inc.
Signed Rank Test
Solution
H0: Identical Distrib.
Ha: Current Shifted
Right
=
n’ =
Critical Value(s):
Do Not
Reject
Reject
T0
14 - 53
Test Statistic:
Decision:
Conclusion:
Signed Rank Test
Computation Table
© 2000 Prentice-Hall, Inc.
X1i
X2i
9.98 9.88
9.88 9.86
9.90 9.83
9.99 9.80
9.94 9.87
9.84 9.84
Total
14 - 54
Di
+0.10
+0.02
+0.07
+0.19
+0.07
0.00
|Di|
Ri
0.10 4
0.02 1
0.07 2 2.5
0.19 5
0.07 3 2.5
0.00 ...
Sign Sign Ri
+
+
+
+
+
...
+4
+1
+2.5
+5
+2.5
Discard
T+ = 15, T- = 0
© 2000 Prentice-Hall, Inc.
Signed Rank Test
Solution
H0: Identical Distrib.
Ha: Current Shifted
Right
= .05
n’ = 5 (not 6; 1 elim.)
Critical Value(s):
Do Not
Reject
Reject
T0
14 - 55
Test Statistic:
Decision:
Conclusion:
© 2000 Prentice-Hall, Inc.
Wilcoxon Signed Rank
Table (Portion)
One-Tailed Two-Tailed
= .05
= .025
= .01
= .005
= .10
= .05
= .02
= .01
n=5
n=6
1
2
1
n = 7 ..
4
2
0
..
..
..
..
n = 11 n = 12 n = 13
:
14 - 56
:
:
:
Signed Rank Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Current Shifted
Right
= .05
n’ = 5 (not 6; 1 elim.)
Critical Value(s):
Do Not
Reject
Reject
1
14 - 57
T0
Test Statistic:
Decision:
Conclusion:
Signed Rank Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Current Shifted
Right
= .05
n’ = 5 (not 6; 1 elim.)
Critical Value(s):
Do Not
Reject
Reject
1
14 - 58
T0
Test Statistic:
Since One-Tailed
Test & Current
Shifted Right, Use T-:
T- = 0
Decision:
Conclusion:
Signed Rank Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Current Shifted
Right
= .05
n’ = 5 (not 6; 1 elim.)
Critical Value(s):
Do Not
Reject
Reject
1
14 - 59
T0
Test Statistic:
Since One-Tailed
Test & Current
Shifted Right, Use T-:
T- = 0
Decision:
Reject at = .05
Conclusion:
Signed Rank Test
Solution
© 2000 Prentice-Hall, Inc.
H0: Identical Distrib.
Ha: Current Shifted
Right
= .05
n’ = 5 (not 6; 1 elim.)
Critical Value(s):
Do Not
Reject
Reject
1
14 - 60
T0
Test Statistic:
Since One-Tailed
Test & Current
Shifted Right, Use T-:
T- = 0
Decision:
Reject at = .05
Conclusion:
There Is Evidence New
Package Is Faster
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
14 - 61
© 2000 Prentice-Hall, Inc.
Frequently Used
Nonparametric Tests
1. Sign Test
2. Wilcoxon Rank Sum Test
3. Wilcoxon Signed Rank Test
4. Kruskal Wallis H-Test
5. Friedman Fr-Test
14 - 62
Kruskal-Wallis H-Test
© 2000 Prentice-Hall, Inc.
1. Tests the Equality of More Than 2 (p)
Population Probability Distributions
2. Corresponds to ANOVA for More Than
2 Means
3. Used to Analyze Completely
Randomized Experimental Designs
4. Uses 2 Distribution with p - 1 df
If At Least 1 Sample Size nj > 5
14 - 63
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Assumptions
1. Independent, Random Samples
2. At Least 5 Observations Per Sample
3. Continuous Population Probability
Distributions
14 - 64
Kruskal-Wallis H-Test
Procedure
© 2000 Prentice-Hall, Inc.
1. Assign Ranks, Ri , to the n Combined
Observations
Smallest Value = 1; Largest Value = n
Average Ties
2. Sum Ranks for Each Group
14 - 65
Kruskal-Wallis H-Test
Procedure
© 2000 Prentice-Hall, Inc.
1. Assign Ranks, Ri , to the n Combined
Observations
Smallest Value = 1; Largest Value = n
Average Ties
2. Sum Ranks for Each Group
3. Compute Test Statistic
Squared total of
each group
F
R I
12
HG
3 a
n 1f
J
Hn an 1f n K
14 - 66
p
2
j
j 1
j
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Example
As production manager,
you want to see if 3 filling
machines have different
filling times. You assign
15 similarly trained &
experienced workers,
5 per machine, to the
machines. At the .05 level,
is there a difference in the
distribution of filling times?
14 - 67
Mach1
25.40
26.31
24.10
23.74
25.10
Mach2
23.40
21.80
23.50
22.75
21.60
Mach3
20.00
22.20
19.75
20.60
20.40
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
H0:
Ha:
=
df =
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
2
0
14 - 68
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
=
df =
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
2
0
14 - 69
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
2
0
14 - 70
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
Test Statistic:
Decision:
= .05
Conclusion:
0
5.991
14 - 71
2
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
Raw Data
Mach1 Mach2 Mach3
25.40 23.40 20.00
26.31 21.80 22.20
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
14 - 72
Ranks
Mach1 Mach2 Mach3
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
Raw Data
Mach1 Mach2 Mach3
25.40 23.40 20.00
26.31 21.80 22.20
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
14 - 73
Ranks
Mach1 Mach2 Mach3
1
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
Raw Data
Mach1 Mach2 Mach3
25.40 23.40 20.00
26.31 21.80 22.20
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
14 - 74
Ranks
Mach1 Mach2 Mach3
2
1
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
Raw Data
Mach1 Mach2 Mach3
25.40 23.40 20.00
26.31 21.80 22.20
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
14 - 75
Ranks
Mach1 Mach2 Mach3
2
1
3
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
Raw Data
Mach1 Mach2 Mach3
25.40 23.40 20.00
26.31 21.80 22.20
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
14 - 76
Ranks
Mach1 Mach2 Mach3
14
9
2
15
6
7
12
10
1
11
8
4
13
5
3
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
Raw Data
Ranks
Mach1 Mach2 Mach3
Mach1 Mach2 Mach3
25.40 23.40 20.00
14
9
2
26.31 21.80 22.20
15
6
7
24.10 23.50 19.75
12
10
1
23.74 22.75 20.60
11
8
4
25.10 21.60 20.40
13
5
3
38
17
Total 65
14 - 77
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
F
R I
12
n 1f
3a
HG
J
Hn an 1f n K
F
F
17f II
38f a
65 f a
a
12
16f
3 a
G
G
J
J
Ha15f a16f H5 5 5 KK
12 I
F
191.6f 48
a
H240K
p
2
j
j 1
j
2
11.58
14 - 78
2
2
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
Test Statistic:
H = 11.58
Decision:
= .05
Conclusion:
0
5.991
14 - 79
2
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
= .05
Test Statistic:
H = 11.58
Decision:
Reject at = .05
Conclusion:
0
5.991
14 - 80
2
© 2000 Prentice-Hall, Inc.
Kruskal-Wallis H-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
= .05
0
5.991
14 - 81
2
Test Statistic:
H = 11.58
Decision:
Reject at = .05
Conclusion:
There Is Evidence Pop.
Distrib. Are Different
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
14 - 82
© 2000 Prentice-Hall, Inc.
Frequently Used
Nonparametric Tests
1. Sign Test
2. Wilcoxon Rank Sum Test
3. Wilcoxon Signed Rank Test
4. Kruskal Wallis H-Test
5. Friedman Fr-Test
14 - 83
Friedman Fr-Test
© 2000 Prentice-Hall, Inc.
1. Tests the Equality of 2 or More (p)
Population Probability Distributions
When Blocking Variable Used
2. Corresponds to Randomized Block F-Test
3. Used to Analyze Randomized Block
Designs
4. Uses 2 Distribution with p - 1 df
If Number of Blocks or Treatments > 5
14 - 84
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Assumptions
1. Independent, Random Samples
2. Measurements Can Be Ranked Within
Blocks
3. Continuous Population Probability
Distributions
14 - 85
Friedman Fr-Test
Procedure
© 2000 Prentice-Hall, Inc.
1. Assign Ranks, Ri , to the Observations
Within Each Block
Smallest Value = 1; Largest Value = nj
Average Ties
2. Sum Ranks Within Each Block
14 - 86
Friedman Fr-Test
Procedure
© 2000 Prentice-Hall, Inc.
1. Assign Ranks, Ri , to the Observations
Within Each Block
Smallest Value = 1; Largest Value = nj
Average Ties
2. Sum Ranks Within Each Block
3. Compute Test Statistic
Squared total of
p
each block
12
Fr
R 2j 3 b p 1
b p p 1 j 1
a f
14 - 87
a f
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Example
You’re a research assistant for the NIH. You’re
investigating the effects of plants on human stress.
You record finger
Subj. Live Photo None
temperatures under 3
1
91.4
93.5
96.6
conditions: presence
2
94.9
96.6
90.5
of a live plant, plant
3
97.0
95.8
95.4
photo, nothing. At
4
93.7
96.2
96.7
the .05 level, does
5
96.0
96.6
93.5
finger temperature
depend on experimental condition?
14 - 88
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
H0:
Ha:
=
df =
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
2
0
14 - 89
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
=
df =
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
2
0
14 - 90
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
Test Statistic:
Decision:
Conclusion:
2
0
14 - 91
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
Test Statistic:
Decision:
= .05
Conclusion:
0
5.991
14 - 92
2
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 93
Plant
Ranks
Photo None
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 94
Plant
1
Ranks
Photo None
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 95
Plant
1
Ranks
Photo None
2
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 96
Plant
1
Ranks
Photo None
2
3
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 97
Plant
1
Ranks
Photo None
2
3
1
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 98
Plant
1
2
Ranks
Photo None
2
3
1
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 99
Plant
1
2
Ranks
Photo None
2
3
3
1
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 100
Plant
1
2
3
1
2
Ranks
Photo None
2
3
3
1
2
1
2
3
3
1
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
Raw Data
Plant Photo None
91.4
93.5
96.6
94.9
96.6
90.5
97.0
95.8
95.4
93.7
96.2
96.7
96.0
96.6
93.5
14 - 101
Plant
1
2
3
1
2
Total 9
Ranks
Photo None
2
3
3
1
2
1
2
3
3
1
12
9
Friedman Fr-Test
Solution
© 2000 Prentice-Hall, Inc.
p
12
2
Fr
Rj 3 b p 1
b p p 1 j 1
a f
a f
12
af
9 a
12f af
9
5 3 4
afafaf
12 I
F
a
306f 60
H60K
2
1.2
14 - 102
2
2
afaf
3 5 4
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
Test Statistic:
Fr = 1.2
Decision:
= .05
Conclusion:
0
5.991
14 - 103
2
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
= .05
Test Statistic:
Fr = 1.2
Decision:
Do Not Reject at = .05
Conclusion:
0
5.991
14 - 104
2
© 2000 Prentice-Hall, Inc.
Friedman Fr-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
= .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):
= .05
0
5.991
14 - 105
2
Test Statistic:
Fr = 1.2
Decision:
Do Not Reject at = .05
Conclusion:
There Is No Evidence
Distrib. Are Different
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Coefficient
14 - 106
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Coefficient
1. Measures Correlation Between Ranks
2. Corresponds to Pearson Product
Moment Correlation Coefficient
3. Values Range from -1 to +1
14 - 107
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Coefficient
1. Measures Correlation Between Ranks
2. Corresponds to Pearson Product
Moment Correlation Coefficient
3. Values Range from -1 to +1
4. Equation (Shortcut)
rs 1
14 - 108
6 d 2
d i
n n2 1
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Procedure
1. Assign Ranks, Ri , to the Observations
of Each Variable Separately
2. Calculate Differences, di , Between
Each Pair of Ranks
3. Square Differences, di 2, Between Ranks
4. Sum Squared Differences for Each
Variable
5. Use Shortcut Approximation Formula
14 - 109
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Example
You’re a research assistant for the FBI. You’re
investigating the relationship between a person’s
attempts at deception
Subj. Deception Pupil
& % changes in their
1
87
10
pupil size. You ask
2
63
6
subjects a series of
3
95
11
questions, some of
4
50
7
which they must
5
43
0
answer dishonestly.
At the .05 level, what is the correlation coefficient?
14 - 110
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Table
Subj. Decep. R1i Pupil R2i
Total
14 - 111
di
di2
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Table
Subj. Decep. R1i Pupil R2i
1
2
3
4
5
87
63
95
50
43
10
6
11
7
0
Total
14 - 112
di
di2
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Table
Subj. Decep. R1i Pupil R2i
1
2
3
4
5
87
63
95
50
43
4
3
5
2
1
10
6
11
7
0
Total
14 - 113
di
di2
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Table
Subj. Decep. R1i Pupil R2i
1
2
3
4
5
87
63
95
50
43
4
3
5
2
1
10
6
11
7
0
Total
14 - 114
4
2
5
3
1
di
di2
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Table
Subj. Decep. R1i Pupil R2i
1
2
3
4
5
87
63
95
50
43
4
3
5
2
1
10
6
11
7
0
Total
14 - 115
4
2
5
3
1
di
0
1
0
-1
0
di2
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Table
Subj. Decep. R1i Pupil R2i
1
2
3
4
5
87
63
95
50
43
4
3
5
2
1
10
6
11
7
0
Total
14 - 116
4
2
5
3
1
di
di2
0
1
0
-1
0
0
1
0
1
0
2
© 2000 Prentice-Hall, Inc.
Spearman’s Rank
Correlation Solution
n
rs 1
6 d i2
i 1
2
d i
6af
2
1
5d
5 1i
n n 1
2
1 0.10
0.90
14 - 117
Conclusion
© 2000 Prentice-Hall, Inc.
1. Distinguished Parametric &
Nonparametric Test Procedures
2. Explained a Variety of Nonparametric
Test Procedures
3. Solved Hypothesis Testing Problems
Using Nonparametric Tests
4. Computed Spearman’s Rank Correlation
14 - 118