The Kruskal-Wallis H Test

Slides:



Advertisements
Similar presentations
Quntative Data Analysis SPSS Exploring Assumptions
Advertisements

Introductory Mathematics & Statistics for Business
Prepared by Lloyd R. Jaisingh
Overview of Lecture Parametric vs Non-Parametric Statistical Tests.
Overview of Lecture Partitioning Evaluating the Null Hypothesis ANOVA
Lecture 2 ANALYSIS OF VARIANCE: AN INTRODUCTION
1 Contact details Colin Gray Room S16 (occasionally) address: Telephone: (27) 2233 Dont hesitate to get in touch.
SADC Course in Statistics Common Non- Parametric Methods for Comparing Two Samples (Session 20)
SADC Course in Statistics Tests for Variances (Session 11)
Non-parametric tests, part A:
Elementary Statistics
Non-Parametric Statistics
Chi-Square and Analysis of Variance (ANOVA)
Hypothesis Tests: Two Independent Samples
The Kruskal-Wallis H Test
Chapter 15 ANOVA.
© The McGraw-Hill Companies, Inc., Chapter 10 Testing the Difference between Means and Variances.
Chapter Thirteen The One-Way Analysis of Variance.
Chapter 18: The Chi-Square Statistic
Ch 14 實習(2).
Copyright ©2006 Brooks/Cole A division of Thomson Learning, Inc. Introduction to Probability and Statistics Twelfth Edition Robert J. Beaver Barbara M.
1 Chapter 20: Statistical Tests for Ordinal Data.
Simple Linear Regression Analysis
Multiple Regression and Model Building
Kruskal Wallis and the Friedman Test.
Chapter 15 Nonparametric Statistics General Objectives: In Chapters 8–10, we presented statistical techniques for comparing two populations by comparing.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Test statistic: Group Comparison Jobayer Hossain Larry Holmes, Jr Research Statistics, Lecture 5 October 30,2008.
Lecture 9: One Way ANOVA Between Subjects
Statistics for Managers Using Microsoft® Excel 5th Edition
The Kruskal-Wallis Test The Kruskal-Wallis test is a nonparametric test that can be used to determine whether three or more independent samples were.
Chapter 15 Nonparametric Statistics
Nonparametric or Distribution-free Tests
Non-parametric Dr Azmi Mohd Tamil.
Copyright © 2010, 2007, 2004 Pearson Education, Inc Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
NONPARAMETRIC STATISTICS
Non-parametric Tests. With histograms like these, there really isn’t a need to perform the Shapiro-Wilk tests!
Statistics 11 Correlations Definitions: A correlation is measure of association between two quantitative variables with respect to a single individual.
Chapter 11 Nonparametric Tests.
Common Nonparametric Statistical Techniques in Behavioral Sciences Chi Zhang, Ph.D. University of Miami June, 2005.
Lesson Inferences about the Differences between Two Medians: Dependent Samples.
What are Nonparametric Statistics? In all of the preceding chapters we have focused on testing and estimating parameters associated with distributions.
Copyright © 2012 Pearson Education. Chapter 23 Nonparametric Methods.
Biostatistics, statistical software VII. Non-parametric tests: Wilcoxon’s signed rank test, Mann-Whitney U-test, Kruskal- Wallis test, Spearman’ rank correlation.
Nonparametric Statistics. In previous testing, we assumed that our samples were drawn from normally distributed populations. This chapter introduces some.
MGT-491 QUANTITATIVE ANALYSIS AND RESEARCH FOR MANAGEMENT OSMAN BIN SAIF Session 26.
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
1 Nonparametric Statistical Techniques Chapter 17.
Nonparametric Statistics
Lesson 15 - R Chapter 15 Review. Objectives Summarize the chapter Define the vocabulary used Complete all objectives Successfully answer any of the review.
Kruskal-Wallis H TestThe Kruskal-Wallis H Test is a nonparametric procedure that can be used to compare more than two populations in a completely randomized.
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Friedman F r TestThe Friedman F r Test is the nonparametric equivalent of the randomized block design with k treatments and b blocks. All k measurements.
NON-PARAMETRIC STATISTICS
Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
NONPARAMETRIC STATISTICS In general, a statistical technique is categorized as NPS if it has at least one of the following characteristics: 1. The method.
Chapter 21prepared by Elizabeth Bauer, Ph.D. 1 Ranking Data –Sometimes your data is ordinal level –We can put people in order and assign them ranks Common.
Copyright © 2010, 2007, 2004 Pearson Education, Inc Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
Lesson Test to See if Samples Come From Same Population.
Chapter 13 Understanding research results: statistical inference.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
1 Nonparametric Statistical Techniques Chapter 18.
Chapter 12 Chi-Square Tests and Nonparametric Tests
十二、Nonparametric Methods (Chapter 12)
Non-parametric tests, part A:
Test to See if Samples Come From Same Population
Nonparametric Statistics
Introduction to SAS Essentials Mastering SAS for Data Analytics
Presentation transcript:

The Kruskal-Wallis H Test Sporiš Goran, PhD. http://kif.hr/predmet/mki http://www.science4performance.com/

The Kruskal-Wallis H Test The Kruskal-Wallis H Test is a nonparametric procedure that can be used to compare more than two populations in a completely randomized design. All n = n1+n2+…+nk measurements are jointly ranked (i.e.treat as one large sample). We use the sums of the ranks of the k samples to compare the distributions.

The Kruskal-Wallis H Test Rank the total measurements in all k samples from 1 to n. Tied observations are assigned average of the ranks they would have gotten if not tied. Calculate Ti = rank sum for the ith sample i = 1, 2,…,k And the test statistic

The Kruskal-Wallis H Test H0: the k distributions are identical versus Ha: at least one distribution is different Test statistic: Kruskal-Wallis H When H0 is true, the test statistic H has an approximate chi-square distribution with df = k-1. Use a right-tailed rejection region or p-value based on the Chi-square distribution.

Example Four groups of students were randomly assigned to be taught with four different techniques, and their achievement test scores were recorded. Are the distributions of test scores the same, or do they differ in location? 88 62 81 79 67 78 59 3 83 69 75 2 73 87 65 1 80 89 94 4

Teaching Methods 55 15 35 31 Ti (14) (2) (11) (9) (4) (8) (1) (12) (5) (7) (6) (13) (3) (10) (15) (16) 88 62 81 79 67 78 59 3 83 69 75 2 73 87 65 1 80 89 94 4 Rank the 16 measurements from 1 to 16, and calculate the four rank sums. H0: the distributions of scores are the same Ha: the distributions differ in location

Teaching Methods H0: the distributions of scores are the same Ha: the distributions differ in location Reject H0. There is sufficient evidence to indicate that there is a difference in test scores for the four teaching techniques. Rejection region: For a right-tailed chi-square test with a = .05 and df = 4-1 =3, reject H0 if H  7.81.

Key Concepts I. Nonparametric Methods These methods can be used when the data cannot be measured on a quantitative scale, or when The numerical scale of measurement is arbitrarily set by the researcher, or when The parametric assumptions such as normality or constant variance are seriously violated.

Key Concepts Kruskal-Wallis H Test: Completely Randomized Design 1. Jointly rank all the observations in the k samples (treat as one large sample of size n say). Calculate the rank sums, Ti = rank sum of sample i, and the test statistic 2. If the null hypothesis of equality of distributions is false, H will be unusually large, resulting in a one-tailed test. 3. For sample sizes of five or greater, the rejection region for H is based on the chi-square distribution with (k - 1) degrees of freedom.

Testing for trends: the Jonckheere-Terpstra test This test looks at the differences between the medians of the groups, just as the Kruskall-Wallis test does. Additionally, it includes information about whether the medians are ordered. In our example, we predict an order for the number of sperms in the 4 groups, indeed: no meal > 1 meal > 4 meals > 7 meals In the coding variable, we have already encoded the order which we expect (1>2>3>4)‏

Output of the J-T test If you have J-T in your version of SPSS, it would look like this Z-score = (912-1200)/116.33=-2.476 J-T test should always be 1-tailed (since we have a directed hypo!) We compare -2.47 against 1.65 which is the z-value for an -level of 5% for a 1- tailed test. Since 2.47>1.65 the result is significant. The negative sign means that medians are in descending order (a positive sign would have meant ascending order).

Differences between several related groups: Friedman's ANOVA Friedman's ANOVA is the non-parametric analogue to a repeated measure ANOVA (see chapter 11) where the same subjects have been subjected to various conditions. Example here: Testing the effect of a new diet called 'Andikins diet' on n=10 women. Their weight (in kg) was tested 3 times: Start Month 1 Month 2 Would they loose weight in the course of the diet?

Theory of Friedman's ANOVA Subject's weight on each of the 3 dates is listed in a separate column. Then ranks for the 3 dates are determined and listed in separate columns. Then, the ranks are summed up for each Condition (Ri)‏ Always the 3 scores are compared: The smallest one gets 1, the next 2, and the biggest one 3. Diet data with ranks

The Test statistic Fr From the sum of ranks for each group, the test statistic Fr is derived: k Fr = 12/Nk (k+1) Σi=1 R2i - 3N(k+1)‏ = (12/(10x3)(3+1)) (192 + 202 + 212)) – (3x10)(3+1)‏ =12/120 (361+400+441) – 120 =0.1 (1202) – 120 =120.2 - 120 = 0.2

Data Input and provisional analysis (using) diet.sav First, test for normality: Analyze  Descriptive Statistics  Explore, tick 'Normality plots with tests' in the 'Plots' window Data sheet In the Shapiro-Wilk test (which is more accurate than the K-S Test, two groups (Start, 1 month) show non-normal distributions. This violation of a parametric constraint justifies the choice of a non-para-metric test.

Running Friedman's ANOVA Analyze  Non-parametric Tests  K Related Samples... If you have 'Exact', tick 'Exact and limit calculation time to 5 minutes. Other options Other options Exact... Request everything there is - it is not much...

Other options Kendall's W: Similar to Friedman's ANOVA, but looks specifically at agreement between raters. For example: to what extent (from 0-1) women rate Justin Timberlake, David Beckham, or Tony Blair on their attractiveness. This is like a correlation coefficient. Cochran's Q: This is an extension of NcNemar's test. It is like a Friedman's test for dichotomous data. For example, if women should judge whether they would like to kiss Justin Timberlake, David Beckham, or Tony Blair and they could only answer: Yes or No.

Output from Friedman's ANOVA The F-Statistics is called Chi-Square, here. It has df=2 (k-1, where k is the # of groups). The statistics is n.s.

Posthoc tests for Friedman's ANOVA Wilcoxon signed-rank tests but correcting for the numbers of tests we do, here  = .05/3=.0167. Analyze  Nonparametric Tests  2-Related Tests, tick 'Wilcoxon', specify the 3 pairs of groups Mean ranks and sum of ranks for all 3 comparisons So, actually, we do not have to calculate any further... All comparisons are ns, as expected from the overall ns effect.

Posthoc tests for Friedman's ANOVA - calculation by hand We take the difference between the mean ranks of the different groups and compare them to a value based on the value of z (corrected for the # of comparions) and a constant based on the total sample size (n=10) and the # of conditions (k=3)‏ Ru - Rvzk(k-1)  k(k+1)/6N zk(k-1) = .05/3(3-1) = .00833 If the difference is significant, it should have a higher value than the value of z for which only .00833 other values of z are bigger. As before, we look in the Appendix A.1 under the column Smaller Portion. The number corresponding to .00833 is the critical value: it is between 2.39 and 2.4. k(k-1) = 3 (3-1) = 6

Calculating the critical differences Critical difference = zk(k-1)  k(k+1)/6N crit. Diff = 2.4  (3(3+1)/6x10 crit. Diff = 2.4  12/60 crit. Diff = 2.4  0.2 crit. Diff = 1.07  If the differences between mean ranks are  the critical difference 1.07, then that difference is significant.

Calculating the differences between mean ranks for diet data  None of the differences is  the critical difference 1.07, hence none of the comparisons is significant.

Calculating the effect size Again, we will only calculate the effect sizes for single comparisons: r = z 2n rStart – 1 month = -0.051/ = -.01 rStart – 2 months = -0.255/0 = -.06 r1 month – 2 months = -0.153/0 =-.03 Tiny effects Tiny effects Tiny effects

Reporting the results of Friedman's ANOVA (Field_2005_566)‏ „The weight of participants did not significantly change over the 2 months of the diet (2(2) = 0.20, p > .05). Wilcoxon tests were used to follow up on this finding. A Bonferroni correction was applied and so all effects are reported at a .0167 level of significance. It appeared that weight didn't significantly change from the start of the diet to 1 month, T=27, r=-.01, from the start of the diet to 2 months, T=25, r=-.06, or from 1 month to 2 months, T=26,r=-0.3. We can conclude that the Andikinds diet (...) is a complete failure.“