20
Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

Embed Size (px)

Citation preview

Page 1: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

Kruskal-Wallis Test

Ben Rindlisbacher

Brigham Young UniversityMarriott School of Management

Page 2: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

Outline/Agenda1. Who are Kruskal and Wallis?

2. What is the Kruskal-Wallis Test?

3. Brainstorming activity: Organizational Application

4. Nuts and Bolts

5. How does the Kruskal-Wallis Test work?

6. Why should I care? A Real-World Example

7. Practice Exercise

8. Summary

9. Readings list

Page 3: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

Who were Kruskal and Wallis? William H. Kruskal:

• Accomplished Mathematician• Statistician• Ph.D. from Columbia University

Together they developed the Kruskal-Wallis Test

W. Allen Wallis:

•American Economist

•Statistician

•President – University of Rochester

Page 4: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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

Page 5: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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.

Page 6: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

Nuts and Bolts• The Kruskal-Wallis Test is comprised of the following

seven steps:1. Define the Null and Alternative Hypothesis

2. State your Alpha

3. Calculate the Degrees of Freedom

4. State your Decision Rule

5. Calculate your Test Statistic

6. State your Results

7. State your Conclusion

Page 7: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

How does the Kruskal-Wallis Test work?• Example: The following scores (data) have been gathered and

ranked from a process within your company:

• Using the ordinal data from the table above determine if there is a difference between the three samples, using an alpha of .05

Sample 1 Sample 2 Sample 327 20 34

2 8 314 14 3

18 36 237 21 309 22 6

Page 8: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

How does the Kruskal-Wallis Test work?• Step #1: Define the Null and Alternative Hypothesis

• = Null Hypothesis• = Alternative Hypothesis

• So…

Page 9: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

How does the Kruskal-Wallis Test work?

• Step #2: State your Alpha

= 0.05

Alpha =

Page 10: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

How does the Kruskal-Wallis Test work?

• Step #3: Calculate the Degrees of Freedom

•DF = K - 1

•DF = 3 - 1 = 2

Page 11: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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 (Chi – squared) is greater than 5.99 we will reject our null hypothesis

Page 12: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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)

Original Score Rank2 13 24 36 47 58 69 7

14 818 920 1021 1122 1223 1327 1430 1531 1634 1736 18

Sample 1 Sample 2 Sample 314 10 171 6 163 8 29 18 135 11 157 12 4

Page 13: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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 314 10 171 6 163 8 29 18 135 11 157 12 4

T 39 65 67n 6 6 6

Page 14: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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

Page 15: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

How does the Kruskal-Wallis Test work?• Step #6: State your Result

• Our Decision Rule: If > 5.99, reject the null hypothesis

AND• H = 2.854

SO• Because 2.854 < 5.99 we will NOT reject the null hypothesis

Page 16: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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 327 20 34

2 8 314 14 3

18 36 237 21 309 22 6

Page 17: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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

Page 18: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

Practice Exercise• Imagine that your company performs specialty treatments for customers.

The following data has been recorded from the treatment process:

• 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

Group 1 Group 2 Group 3 Group 427 20 34 282 8 31 54 14 3 10

18 36 23 197 21 30 299 22 6 24

Page 19: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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

Page 20: Kruskal-Wallis Test Ben Rindlisbacher Brigham Young University Marriott School of Management

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.