Sie sind auf Seite 1von 53

Statistics for

Business and
Economics
Nonparametric Statistics
Chapter 14
Learning Objectives
1. Distinguish Parametric & Nonparametric
Test Procedures
2. Explain a Variety of Nonparametric Test
Procedures
3. Solve Hypothesis Testing Problems
Using Nonparametric Tests
4. Compute Spearmans Rank Correlation
Hypothesis Testing Procedures
Hypothesis
Testing
Procedures
Nonparametric Parametric
Z Test
Kruskal-Wallis
H-Test
Wilcoxon
Rank Sum
Test
t Test
One-Way
ANOVA
Many More Tests Exist!
Parametric Test Procedures
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
Nonparametric Test Procedures
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
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
1984-1994 T/Maker Co.
Disadvantages of Nonparametric
Tests
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
1984-1994 T/Maker Co.
Frequently Used Nonparametric
Tests
1. Sign Test
2. Wilcoxon Rank Sum Test
3. Wilcoxon Signed Rank Test
4. Kruskal Wallis H-Test
5. Friedmans F
r
-Test
6. Spearmans Rank Correlation Coefficient
Sign Test
Sign Test
1. Tests One Population Median, q (eta)
2. Corresponds to t-Test for 1 Mean
3. Assumes Population Is Continuous
4. Small Sample Test Statistic: # Sample
Values Above (or Below) Median
Alternative Hypothesis Determines
5. Can Use Normal Approximation If n > 10
Sign Test Uses P-Value
to Make Decision
Binomial: n = 8 p = 0.5
P-Value Is the Probability of Getting an Observation At
Least as Extreme as We Got. If 7 of 8 Observations
Favor H
a
, Then P-Value = P(x > 7) = .031 + .004 = .035.
If o = .05, Then Reject H
0
Since P-Value s o.
Sign Test Example
Youre an analyst for Chef-
Boy-R-Dee. Youve 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 less than 3?
Sign Test Solution
H0: q = 3
Ha: q < 3
o = .05
Test Statistic:
P-Value:
Decision:

Conclusion:

Do Not Reject at o = .05
There Is No Evidence
Median Is Less Than 3
P(x > 2) = 1 - P(x s 1)
= .937
(Binomial Table, n = 7,
p = 0.50)
S = 2
(Ratings 1 & 2 Are
Less Than q = 3:
2, 5, 3, 4, 1, 4, 5)
Wilcoxon Rank Sum
Test
Wilcoxon Rank Sum Test
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 n
i
> 10
Wilcoxon Rank Sum Test
Procedure
1. Assign Ranks, R
i
, to the n
1
+ n
2
Sample
Observations
If Unequal Sample Sizes, Let n
1
Refer to Smaller-Sized
Sample
Smallest Value = 1
Average Ties
2. Sum the Ranks, T
i
, for Each Sample
3. Test Statistic Is T
A
(Smallest Sample)
Wilcoxon Rank Sum Test
Example
Youre 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?
Wilcoxon Rank Sum
Table (Portion)
o = .05 one-tailed; o = .10 two-tailed
Wilcoxon Rank Sum Test
Computation Table
Factory 1 Factory 2
Rate Rank Rate Rank
71 1 85 5
82 3 3.5 82 4 3.5
77 2 94 8
92 7 97 9
88 6 ... ...
Rank Sum 19.5 25.5
Wilcoxon Rank Sum Test
Solution
H0: Identical Distrib.
Ha: Shifted Left or Right
o = .10
n1 = 4 n2 = 5
Critical Value(s):
Test Statistic:
Decision:

Conclusion:

Do Not Reject at o = .10
There Is No Evidence
Distrib. Are Not Equal
Reject Reject
Do Not
Reject
13 27 E Ranks
T2 = 5 + 3.5 + 8+ 9 = 25.5
(Smallest Sample)
Wilcoxon Signed
Rank Test
Wilcoxon
Signed Rank Test
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
Signed Rank Test
Procedure
1. Obtain Difference Scores, D
i
= X
1i
- X
2i

2. Take Absolute Value of Differences, D
i

3. Delete Differences With 0 Value
4. Assign Ranks, R
i
, Where Smallest = 1
5. Assign Ranks Same Signs as D
i

6. Sum + Ranks (T
+
) & - Ranks (T
-
)
Test Statistic Is T
-
(One-Tailed Test)
Test Statistic Is Smaller of T
-
or T
+
(2-Tail)
Signed Rank Test Computation
Table
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
1984-1994 T/Maker Co.
Signed Rank Test Computation
Table
Wilcoxon Signed Rank
Table (Portion)
One-Tailed Two-Tailed
n = 5 n = 6 n = 7 ..
o = .05 o = .10
1 2 4 ..
o = .025 o = .05
1 2 ..
o = .01 o = .02
0 ..
o = .005 o = .01
..
n = 11 n = 12 n = 13
: : : :

Signed Rank Test
Solution
H0: Identical Distrib.
Ha: Current Shifted
Right
o = .05
n = 5 (not 6; 1 elim.)
Critical Value(s):
Test Statistic:
Decision:

Conclusion:

Reject at o = .05
There Is Evidence New
Package Is Faster
Reject
Do Not
Reject
1 T
0
Since One-Tailed
Test & Current
Shifted Right, Use T
-
:
T
-
= 0
Kruskal-Wallis H-
Test
Kruskal-Wallis H-Test
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 n
j
> 5
Kruskal-Wallis H-Test
Assumptions
1. Independent, Random Samples
2. At Least 5 Observations Per Sample
3. Continuous Population Probability
Distributions
Kruskal-Wallis H-Test
Procedure
1. Assign Ranks, R
i
, to the n Combined
Observations
Smallest Value = 1; Largest Value = n
Average Ties
2. Sum Ranks for Each Group
Kruskal-Wallis H-Test
Procedure
1. Assign Ranks, R
i
, to the n Combined
Observations
Smallest Value = 1; Largest Value = n
Average Ties
2. Sum Ranks for Each Group
3. Compute Test Statistic
( )
( ) 1 3
1
12
1
2
+
|
|
.
|

\
|

+
=

=
n
n
R
n n
H
p
j
j
j
Squared total of
each group
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?
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
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
Ranks
Mach1 Mach2 Mach3
14 9 2
15 6 7
12 10 1
11 8 4
13 5 3
65 38 17
Total
Kruskal-Wallis H-Test
Solution
( )
( )
( ) ( )
( ) ( ) ( )
( )
( )
58 . 11
48 6 . 191
240
12
16 3
5
17
5
38
5
65
16 15
12
1 3
1
12
2 2 2
1
2
=

|
.
|

\
|
=

|
|
.
|

\
|
|
|
.
|

\
|
+ +

=
+
|
|
.
|

\
|

+
=

=
n
n
R
n n
H
p
j
j
j
_
2
0 5.991
Kruskal-Wallis H-Test
Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
o = .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):

Test Statistic:
Decision:

Conclusion:

Reject at o = .05
There Is Evidence Pop.
Distrib. Are Different
o = .05
H = 11.58
Friedman F
r
-Test for
a Randomized Block
Design
Friedman F
r
-Test
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 Randomized Block
Experimental Designs
4. Uses _
2
Distribution with p - 1 df
If either p, the number of treatments, or b, the number of
blocks, exceeds 5
Friedman F
r
-Test Assumptions
1. The p treatments are randomly assigned
to experimental units within the b blocks
Samples
2. The measurements can be ranked within
the blocks
3. Continuous population probability
distributions
Friedman F
r
-Test Procedure
1. Assign Ranks, R
i
= 1 p, to the p
treatments in each of the b blocks
Smallest Value = 1; Largest Value = p
Average Ties
2. Sum Ranks for Each Treatment
Friedman F
r
-Test Procedure
1. Assign Ranks, R
i
= 1 p, to the p
treatments in each of the b blocks
Smallest Value = 1; Largest Value = p
Average Ties
Sum Ranks for Each Treatment
Compute Test Statistic

( )
( ) 1 3
1
12
1
2
+
|
|
.
|

\
|

+
=

=
p b R
p bp
F
p
j
j r
Squared total of
each treatment
Friedman F
r
-Test Example
Three new traps were tested
to compare their ability to
trap mosquitoes. Each of
the traps, A, B, and C were
placed side-by-side at each
five different locations. The
number of mosquitoes in
each trap was recorded. At
the .05 level, is there a
difference in the
distribution of number of
mosquitoes caught by the
three traps?
TrapA TrapB TrapC
3 5 0
23 17 15
11 5 7
8 4 2
19 11 5
Friedman F
r
-Test Solution
Raw Data
TrapA TrapB TrapC
3 5 0
23 17 15
11 5 7
8 4 2
19 11 5

Ranks
TrapA TrapB TrapC
2 3 1
3 2 1
3 1 2
3 2 1
3 2 1
14 10 6
Total
Friedman F
r
-Test Solution
( )
( )
64 . 6 60 ) 332 (
60
12
) 1 3 ( ) 5 ( 3 ) 6 10 14 (
) 1 3 ( ) 3 )( 5 (
12
1 3
1
12
2 2 2
1
2
=
|
.
|

\
|
=
+
|
|
.
|

\
|
+ +
+
=
+
|
|
.
|

\
|

+
=

=
r
r
p
j
j r
F
F
p b R
p bp
F
_
2
0 5.991
Friedman F
r
-Test Solution
H0: Identical Distrib.
Ha: At Least 2 Differ
o = .05
df = p - 1 = 3 - 1 = 2
Critical Value(s):

Test Statistic:
Decision:

Conclusion:

Reject at o = .05
There Is Evidence Pop.
Distrib. Are Different
o = .05
F
r
= 6.64
Spearmans Rank
Correlation
Coefficient
Spearmans Rank
Correlation Coefficient
1. Measures Correlation Between Ranks
2. Corresponds to Pearson Product Moment
Correlation Coefficient
3. Values Range from -1 to +1
Spearmans 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)
( ) 1
6
1
2
2

=

n n
d
r
s
Spearmans Rank Correlation
Procedure
1. Assign Ranks, R
i
, to the Observations
of Each Variable Separately
2. Calculate Differences, d
i
, Between
Each Pair of Ranks
3. Square Differences, d
i
2
, Between Ranks
4. Sum Squared Differences for Each
Variable
5. Use Shortcut Approximation Formula

Spearmans Rank
Correlation Example
Youre a research assistant for the FBI. Youre
investigating the relationship between a persons
attempts at deception
& % changes in their
pupil size. You ask
subjects a series of
questions, some of
which they must
answer dishonestly.
At the .05 level, what is the correlation
coefficient?
Subj. Deception Pupil
1 87 10
2 63 6
3 95 11
4 50 7
5 43 0
Spearmans Rank Correlation
Table
Subj. Decep. R
1i
Pupil R
2i
d
i
d
i
2

1 87 4 10 4 0 0
2 63 3 6 2 1 1
3 95 5 11 5 0 0
4 50 2 7 3 -1 1
5 43 1 0 1 0 0
Total 2

Spearmans Rank
Correlation Solution
( )
( )
( )
90 . 0
10 . 0 1
1 5 5
2 6
1
1
6
1
2
2
1
2
=
=

=

=

=
n n
d
r
n
i
i
s