Kruskal-Wallis Test

advertisement
Kruskal-Wallis Test
Ben Rindlisbacher
Brigham Young University
Marriott School of Management
Outline/Agenda
1.
2.
3.
4.
5.
6.
7.
8.
9.
Who are Kruskal and Wallis?
What is the Kruskal-Wallis Test?
Brainstorming activity: Organizational Application
Nuts and Bolts
How does the Kruskal-Wallis Test work?
Why should I care? A Real-World Example
Practice Exercise
Summary
Readings list
Who were Kruskal and Wallis?
William H. Kruskal:
• Accomplished Mathematician
• Statistician
• Ph.D. from Columbia University
W. Allen Wallis:
• American Economist
• Statistician
• President – University of Rochester
Together they developed the Kruskal-Wallis Test
What is the Kruskal-Wallis Test?
• Kruskal-Wallis Test (one-way analysis of variance):
• A statistical test to see whether samples originate from the same
distribution (ex: post-production inspection)
• Primarily used when comparing more than two samples that come from
different sources or when the samples are of unequal size
Brainstorming Activity:
Organizational Application
• Within your organization (or a supplier’s
organization) identify a process that currently displays
an unacceptable amount of variance. (ex:
manufacturing, shipping, customer service, etc.) With
this process in mind, identify three reasons why being
able to pin-point the source of the variance from
multiple, un-evenly distributed samples could be
helpful.
Nuts and Bolts
• The Kruskal-Wallis Test is comprised of the following
seven steps:
1.
2.
3.
4.
5.
6.
7.
Define the Null and Alternative Hypothesis
State your Alpha
Calculate the Degrees of Freedom
State your Decision Rule
Calculate your Test Statistic
State your Results
State your Conclusion
How does the Kruskal-Wallis Test work?
• Example: The following scores (data) have been gathered and
ranked from a process within your company:
Sample 1 Sample 2 Sample 3
27
20
34
2
4
18
7
9
8
14
36
21
22
31
3
23
30
6
• Using the ordinal data from the table above determine if there is a
difference between the three samples, using an alpha of .05
How does the Kruskal-Wallis Test work?
• Step #1: Define the Null and Alternative Hypothesis
• 𝐻𝑜 = Null Hypothesis
• 𝐻1 = Alternative Hypothesis
• So…
• 𝐻𝑜 : There is no difference between samples
• 𝐻1 : There is a difference between samples
How does the Kruskal-Wallis Test work?
• Step #2: State your Alpha
Alpha =
= 0.05
How does the Kruskal-Wallis Test work?
• Step #3: Calculate the Degrees of Freedom
• DF = K - 1
• DF = 3 - 1 = 2
How does the Kruskal-Wallis Test work?
• Step #4: State our Decision Rule
• Using a Chi-squared table we need
to find our critical value
• With an alpha of 0.05 and DF of 2
our critical value = 5.99
• So if our 𝑥 2 (Chi – squared) is
greater than 5.99 we will reject
our null hypothesis
How does the Kruskal-Wallis Test work?
• Step #5: Calculate the Test
Statistic
• Rank the 18 scores in the example
from smallest to largest (right)
• Once the data has been ranked,
replace the original scores with the
rankings (as shown below)
Sample 1 Sample 2 Sample 3
14
1
3
9
5
7
10
6
8
18
11
12
17
16
2
13
15
4
Original Score
Rank
2
3
4
6
7
8
9
14
18
20
21
22
23
27
30
31
34
36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
How does the Kruskal-Wallis Test work?
• Step #5: Calculate the Test
Statistic (continued…)
• Calculate T or the sum of each
group/sample rankings
• Calculate n or the sample size for
each group/sample
• Sample 1; T = 39 and n = 6
• Sample 2; T = 65 and n = 6
• Sample 3; T = 67 and n = 6
Sample 1 Sample 2 Sample 3
T
n
14
1
3
9
5
7
39
6
10
6
8
18
11
12
65
6
17
16
2
13
15
4
67
6
How does the Kruskal-Wallis Test work?
• Step #5: Calculate the Test
Statistic (continued…)
• Using the following formula and
the previously solved variables,
calculate the test statistic
How does the Kruskal-Wallis Test work?
• Step #6: State your Result
• Our Decision Rule: If 𝑥 2 > 5.99, reject the null hypothesis
AND
• H = 2.854
SO
• Because 2.854 < 5.99 we will NOT reject the null hypothesis
How does the Kruskal-Wallis Test work?
• Step #7: State your Conclusion
• Because we do not reject the null hypothesis, we can conclude that there is no
significant difference among the three samples compared in this example
Sample 1 Sample 2 Sample 3
27
20
34
2
4
18
7
9
8
14
36
21
22
31
3
23
30
6
Why should I care?
A Real World Example
• A commercial plumbing co. in the Midwest
• Wanted to improve customer satisfaction scores
• Customer surveys  customer service attributes
• Kruskal-Wallis Test  compare the different
survey samples to calculate if there was difference
between the ratings of each attribute
• Most important attributes: Courtesy, Convenience,
Reliability, Quality, and Competitive Pricing
Practice Exercise
• Imagine that your company performs specialty treatments for customers.
The following data has been recorded from the treatment process:
Group 1
Group 2
Group 3
Group 4
27
2
4
18
7
9
20
8
14
36
21
22
34
31
3
23
30
6
28
5
10
19
29
24
• Using the data from the table above, utilize the seven steps of the
Kruskal-Wallis test in order to see if there is a difference between the four
samples, using an alpha of 0.05
Summary
• William H. Kruskal and W. Allen Wallis developed the Kruskal-Wallis
one-way analysis of variance test
• A statistical test to see whether samples originate from the same
distribution
• Useful when comparing three or more samples, or when samples are of
different sizes
• The Seven Steps of the Kruskal-Wallis Test
• Can be useful in real-world applications to help improve quality
Reading list
•
•
•
•
•
•
Koppes, Steve. “William Kruskal, Statistician, 1919-2005” The University of Chicago
News. University of Chicago News Office. 5 May 2005.
Elliott, Alan C.; Hynan, Linda S. “A SAS® macro implementation of a multiple
comparison post hoc test for a Kruskal-Wallis analysis” Computer Methods and Programs
in Biomedicine. Vol. 102 pp. 75-80. 2011.
Pace, Eric. “W. Allen Wallis, Economist and President of the U. of Rochester” The New
York Times. 14 October 1998 pp. 5-9.
Kruskal, Willliam, and Judith Tanner. International Encyclopedia of Statistics. New York
Free Press, 1978. Print.
Statistics Lectures. “The Kruskal-Wallis Test.” <www.statisticslectures.com
/topics/kruskalwallis/>. 2010-2012.
Goldstein, Sheldon D. “Using Kruskal-Wallis to Improve Customer Satisfaction” The
Steele Group. 2011. pp. 1-10.
Download