Supplement on the Kruskal-Wallis test. So what do you do if you don t meet the assumptions of an ANOVA?

Similar documents
CHAPTER 14 NONPARAMETRIC TESTS

Rank-Based Non-Parametric Tests

Recall this chart that showed how most of our course would be organized:

1.5 Oneway Analysis of Variance

Friedman's Two-way Analysis of Variance by Ranks -- Analysis of k-within-group Data with a Quantitative Response Variable

1.6 The Order of Operations

QUANTITATIVE METHODS BIOLOGY FINAL HONOUR SCHOOL NON-PARAMETRIC TESTS

Analysis of Variance ANOVA

SPSS Explore procedure

The Kruskal-Wallis test:

STATISTICAL SIGNIFICANCE OF RANKING PARADOXES

SCHOOL OF HEALTH AND HUMAN SCIENCES DON T FORGET TO RECODE YOUR MISSING VALUES

Come scegliere un test statistico

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Nonparametric Statistics

Intro to Parametric & Nonparametric Statistics

Testing Research and Statistical Hypotheses

Introduction to proc glm

Comparing Means in Two Populations

CHAPTER 12 TESTING DIFFERENCES WITH ORDINAL DATA: MANN WHITNEY U

Post-hoc comparisons & two-way analysis of variance. Two-way ANOVA, II. Post-hoc testing for main effects. Post-hoc testing 9.

13: Additional ANOVA Topics. Post hoc Comparisons

THE KRUSKAL WALLLIS TEST

Statistical Models in R

Lesson 1: Comparison of Population Means Part c: Comparison of Two- Means

Projects Involving Statistics (& SPSS)

Overview of Non-Parametric Statistics PRESENTER: ELAINE EISENBEISZ OWNER AND PRINCIPAL, OMEGA STATISTICS

Confidence Intervals on Effect Size David C. Howell University of Vermont

Class 19: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.1)

Difference tests (2): nonparametric

" Y. Notation and Equations for Regression Lecture 11/4. Notation:

2 Sample t-test (unequal sample sizes and unequal variances)

Independent samples t-test. Dr. Tom Pierce Radford University

SPSS Tests for Versions 9 to 13

An Innocent Investigation

Parametric and non-parametric statistical methods for the life sciences - Session I

Math Matters: Why Do I Need To Know This? 1 Probability and counting Lottery likelihoods

NONPARAMETRIC STATISTICS 1. depend on assumptions about the underlying distribution of the data (or on the Central Limit Theorem)

Regression III: Advanced Methods

Nonparametric Two-Sample Tests. Nonparametric Tests. Sign Test

The Wilcoxon Rank-Sum Test

NCSS Statistical Software

0.8 Rational Expressions and Equations

Nonparametric tests these test hypotheses that are not statements about population parameters (e.g.,

Statistical tests for SPSS

Simple Regression Theory II 2010 Samuel L. Baker

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

Writing Thesis Defense Papers

COLLEGE ALGEBRA. Paul Dawkins

Section 13, Part 1 ANOVA. Analysis Of Variance

Research Methods & Experimental Design

1 Nonparametric Statistics

Study Guide for the Final Exam

Parametric and Nonparametric: Demystifying the Terms

StatCrunch and Nonparametric Statistics

individualdifferences

statistics Chi-square tests and nonparametric Summary sheet from last time: Hypothesis testing Summary sheet from last time: Confidence intervals

CHAPTER 11 CHI-SQUARE AND F DISTRIBUTIONS

The Dummy s Guide to Data Analysis Using SPSS

Nonparametric and Distribution- Free Statistical Tests

First-year Statistics for Psychology Students Through Worked Examples. 3. Analysis of Variance

Chapter 23. Two Categorical Variables: The Chi-Square Test

Stat 5102 Notes: Nonparametric Tests and. confidence interval

Nonparametric Statistics

Biostatistics: DESCRIPTIVE STATISTICS: 2, VARIABILITY

E(y i ) = x T i β. yield of the refined product as a percentage of crude specific gravity vapour pressure ASTM 10% point ASTM end point in degrees F

Chapter G08 Nonparametric Statistics

Chapter 12 Nonparametric Tests. Chapter Table of Contents

Part 3. Comparing Groups. Chapter 7 Comparing Paired Groups 189. Chapter 8 Comparing Two Independent Groups 217

Section 1.5 Exponents, Square Roots, and the Order of Operations

Math 4310 Handout - Quotient Vector Spaces

Club Accounts Question 6.

Stat 411/511 THE RANDOMIZATION TEST. Charlotte Wickham. stat511.cwick.co.nz. Oct

Assumptions. Assumptions of linear models. Boxplot. Data exploration. Apply to response variable. Apply to error terms from linear model

CS 147: Computer Systems Performance Analysis

Testing Group Differences using T-tests, ANOVA, and Nonparametric Measures

Do you wish you could attract plenty of clients, so you never have to sell again?

Types of Data, Descriptive Statistics, and Statistical Tests for Nominal Data. Patrick F. Smith, Pharm.D. University at Buffalo Buffalo, New York

Students' Opinion about Universities: The Faculty of Economics and Political Science (Case Study)

Confidence intervals

Chapter 5 Analysis of variance SPSS Analysis of variance

Two-Sample T-Tests Allowing Unequal Variance (Enter Difference)

WHERE DOES THE 10% CONDITION COME FROM?

Two-Sample T-Tests Assuming Equal Variance (Enter Means)

Solving Equations by the Multiplication Property

Easy Casino Profits. Congratulations!!

Analyzing and interpreting data Evaluation resources from Wilder Research

Session 7 Fractions and Decimals

A Statistical Analysis of Popular Lottery Winning Strategies

Descriptive Statistics

Case Study in Data Analysis Does a drug prevent cardiomegaly in heart failure?

Statistics. One-two sided test, Parametric and non-parametric test statistics: one group, two groups, and more than two groups samples

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Vieta s Formulas and the Identity Theorem

Linear Programming Problems

A full analysis example Multiple correlations Partial correlations

2.2 Derivative as a Function

Objective. Materials. TI-73 Calculator

One-Way ANOVA using SPSS SPSS ANOVA procedures found in the Compare Means analyses. Specifically, we demonstrate

Transcription:

Supplement on the Kruskal-Wallis test So what do you do if you don t meet the assumptions of an ANOVA? {There are other ways of dealing with things like unequal variances and non-normal data, but we won t learn them here. Most of these require transformations, and transformations come with a whole set of problems that we don t have time to deal with. See 2.7 [2.7] {2.7} particularly the section on non-linear transformations to get an idea of what kind of transformations we mean. The text doesn t really point out what some of the problems are when using transformations.} As long as the data are still random, we can employ what s called the Kruskal-Wallis test. The only assumption we still need to worry about is randomness. But what are we testing now? - H0: All k population distributions are identical - H1: At least one of these is different (tends to yield larger/smaller observations than the others). - if we assume distributions are similar except in location, we can use means (or medians) instead. Then proceed as usual: - select α - calculate test statistic (let s call it W*) - compare it to a value from KW tables - if W* to W table (but see below), then reject. So, what is W*? It s a bit messy, and is given by: W * = 1 S 2 k 2 i=1 n i N N 1 2 4 Yech! But let s not give up yet. It s really not that difficult. Let s figure out what the various parts of this are:

- N = total sample size (= n*, using our ANOVA notation) - = sum of the ranks of the i th sample: n i = R X ij j=1 - this says, take the rank of each of the x s and sum these values for each sample (this is very similar to K 1 and K 2 in the Mann- Whitney test, except now we re using ranks instead of number smaller in other sample ) - notice that the very first thing we ll have to do is to rank our observations from smallest to largest (write in the rank next to our each of our observations). - S 2 = an analogue of the variance (notice this is capitalized). It s given as follows: S 2 = 1 N 1 R X ij 2 N 1 2 N all ranks 4 - okay, now you re really worried. But let s stick with it for just a little longer. - this says, Sum up all the square of each of the ranks, then subtract the other quantity (the one involving N). That s not too bad. It s actually very similar to the calculator formula for variance that we didn t have a chance to talk about (but are in my notes). - Now we know how to calculate W* (it ll be much more obvious after an example). But what about W? - This is a bit of a problem. Remember how you needed to have n and n in the Mann-Whitney U-test? - now we have 2, 3, 4... or more samples, so we really can t list the probabilities for everything. - Let s take another quick look at W*. It turns out if there are no ties, we can re-write it as: W * = 12 k 2 3 N 1 N N 1 i=1 n i

- (if there are no ties, then use this formula - it s a lot easier) - the stuff in the sum symbol is kind of analogous to what we observed -we re using the actual ranks and getting a kind of sum (squared and adjusted by n i, but still a sum). - the 3(N+1) term is kind of what we would expect for the sums if the ranks were basically equal in each sample. - the term in front of the sum symbol is another type of expected value. {Note: the sum of a bunch of numbers going from 1...n = n(n+1)/2, so you might recognize that both 3(N+1) and the quantity out front are a little similar)}. - so we have an observed quantity (-) an expected quantity, where the observed is also divided by an expected quantity. Sound just a little familiar? - As it turns out W* has (approximately) the Chi-square distribution. - So what do you look up for W? A Chi-square value with k-1 degrees of freedom. - As mentioned, this is an approximation, and exact tables do exist, but they take up a good portion of a book! Minitab seems to do approximation. (More sophisticated software like SAS has an option for getting the exact values of W). - So how does it all work?? An example (let s use the Sheep example, but this time we ll do a KW test instead of an ANOVA) - let s do H0: the diets are all the same. H1: at least one of the diets is different. α =.05 Diet 1 Diet 2 Diet 3 value rank rank 2 value rank rank 2 value rank rank 2 8 2 4 9 3.5 12.25 15 7 49 16 8.5 72.25 16 8.5 72.25 10 5 25 9 3.5 12.25 21 12 144 17 10 100 11 6 36 6 1 1 18 11 121 Sum ( ) 14 88.5 41 385 23 175 n i 3 5 4

- Notice that N = n* = 12; also notice that the highest rank is 12, so everything s fine so far (if one or more values are tied, you need to use the average rank). - Now we calculate S 2 : S 2 = 1 132 11 649 12 4 = 12.909 - Now we merely plug all this into W* to get: W * = 1 12.909 142 3 412 5 232 4 12 132 4 = 2.075 - Let s get W table, using our Chi-square table and 2 d.f.: W table = 5.99 - And since W* < W table, we fail to reject and conclude we have no evidence to show the diets are different. (Incidentally, the same result we got with ANOVA) - Okay, let s summarize: - When do you use KW? When you don t meet the assumptions of ANOVA: - As usual, with a larger sample size, ANOVA will start to do better, and you don t need to worry about the normal assumption as much. - What about equal variances? Well, use a little common sense. Don t just assume they re unequal unless you only have two categories (then use a t- test or Mann-Whitney!). This is kind of the opposite to what was said before. If you re worried about them being seriously unequal, use a KW test, but be aware that to use the KW test for means (or medians), it too, assumes equal variances. - How about power? Pretty good; even when the data are normal it doesn t do too badly. - Why not use it all the time? - ANOVA is much more flexible. As mentioned, the number of designs available for ANOVA is almost endless. - and even though the power isn t bad, it isn t the best test to use if data are normal.

- Multiple comparisons are available for the KW test, but we just don t have time to dig into that as well. - We didn t do too much with the theory here. The basic idea is very similar to that of the Mann-Whitney U test, the only odd thing is that we can get away with using Chi-square tables instead of exact tables. - The easy way to do this (as usual) is to use a computer package; for example, here's the printout from R: R: Kruskal-Wallis rank sum test data: gain by diet Kruskal-Wallis chi-squared = 2.0748, df = 2, p-value = 0.3544 (R calls the test statistics Kruskal-Wallis chi-squared ) - Finally, what about two way or more complicated designs? - The Kruskal-Wallis test is designed for one-way type analyses. - There are two-way non-parametric tests; if you need to use something like this, you can look up the Quade test of the Friedman test (the Friedman test is related to the sign test). - A non-parametric test is a test that doesn't assume a particular distribution for the date. The sign test, the Mann-Whitney test and the Kruskal-Wallis test are three examples that we've talked about. We'll discuss at least one more.