Non-parametric tests I

Similar documents
Non-Parametric Tests (I)

Difference tests (2): nonparametric

Nonparametric Statistics

1 Nonparametric Statistics

CHAPTER 14 NONPARAMETRIC TESTS

Rank-Based Non-Parametric Tests

Comparing Means in Two Populations

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

Nonparametric Two-Sample Tests. Nonparametric Tests. Sign Test

HYPOTHESIS TESTING: POWER OF THE TEST

1.5 Oneway Analysis of Variance

Permutation Tests for Comparing Two Populations

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

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

Statistics for Sports Medicine

EPS 625 INTERMEDIATE STATISTICS FRIEDMAN TEST

Skewed Data and Non-parametric Methods

Permutation & Non-Parametric Tests

LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

Hypothesis testing - Steps

THE KRUSKAL WALLLIS TEST

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

Testing for differences I exercises with SPSS

Analysis of Variance ANOVA

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

Statistical tests for SPSS

QUANTITATIVE METHODS BIOLOGY FINAL HONOUR SCHOOL NON-PARAMETRIC TESTS

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

How To Compare Birds To Other Birds

Non-Inferiority Tests for Two Means using Differences

Introduction to Hypothesis Testing. Hypothesis Testing. Step 1: State the Hypotheses

Descriptive Statistics

The Wilcoxon Rank-Sum Test

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

Stat 5102 Notes: Nonparametric Tests and. confidence interval

Projects Involving Statistics (& SPSS)

NCSS Statistical Software

Nonparametric Statistics

Tutorial 5: Hypothesis Testing

Nonparametric and Distribution- Free Statistical Tests

Section 13, Part 1 ANOVA. Analysis Of Variance

Two Related Samples t Test

UNDERSTANDING THE DEPENDENT-SAMPLES t TEST

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

Research Methodology: Tools

Lesson 9 Hypothesis Testing

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

MEASURES OF LOCATION AND SPREAD

SPSS Tests for Versions 9 to 13

Pearson's Correlation Tests

Chapter G08 Nonparametric Statistics

Statistics Review PSY379

UNDERSTANDING THE TWO-WAY ANOVA

Exact Nonparametric Tests for Comparing Means - A Personal Summary

NAG C Library Chapter Introduction. g08 Nonparametric Statistics

Outline. Definitions Descriptive vs. Inferential Statistics The t-test - One-sample t-test

Non-Inferiority Tests for One Mean

The Dummy s Guide to Data Analysis Using SPSS

How To Test For Significance On A Data Set

NCSS Statistical Software. One-Sample T-Test

Two-sample hypothesis testing, II /16/2004

THE FIRST SET OF EXAMPLES USE SUMMARY DATA... EXAMPLE 7.2, PAGE 227 DESCRIBES A PROBLEM AND A HYPOTHESIS TEST IS PERFORMED IN EXAMPLE 7.

Research Methods & Experimental Design

t-test Statistics Overview of Statistical Tests Assumptions

Intro to Parametric & Nonparametric Statistics

Using Excel for inferential statistics

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

T-test & factor analysis

An Introduction to Statistics Course (ECOE 1302) Spring Semester 2011 Chapter 10- TWO-SAMPLE TESTS

Estimation of σ 2, the variance of ɛ

Chapter 12 Nonparametric Tests. Chapter Table of Contents

Difference of Means and ANOVA Problems

Study Guide for the Final Exam

Come scegliere un test statistico

II. DISTRIBUTIONS distribution normal distribution. standard scores

Chapter 2. Hypothesis testing in one population

StatCrunch and Nonparametric Statistics

Statistiek II. John Nerbonne. October 1, Dept of Information Science

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

NCSS Statistical Software

UNDERSTANDING THE INDEPENDENT-SAMPLES t TEST

UNIVERSITY OF NAIROBI

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

Paired T-Test. Chapter 208. Introduction. Technical Details. Research Questions

SPSS Explore procedure

STATISTICAL SIGNIFICANCE OF RANKING PARADOXES

Nonparametric statistics and model selection

Introduction to Analysis of Variance (ANOVA) Limitations of the t-test

Simple Regression Theory II 2010 Samuel L. Baker

Introduction to Hypothesis Testing OPRE 6301

Chapter 8. Comparing Two Groups

Introduction. Chapter 14: Nonparametric Tests

The operating characteristics of the nonparametric Levene test for equal variances with assessment and evaluation data

SPSS/Excel Workshop 3 Summer Semester, 2010

3.4 Statistical inference for 2 populations based on two samples

Additional sources Compilation of sources:

Chapter 7 Section 7.1: Inference for the Mean of a Population

Erik Parner 14 September Basic Biostatistics - Day 2-21 September,

Statistics for the intensivist (3) ICU Fellowship Training Radboudumc

Transcription:

Non-parametric tests I Objectives Mann-Whitney Wilcoxon Signed Rank Relation of Parametric to Non-parametric tests 1

the problem Our testing procedures thus far have relied on assumptions of independence, equal variance, and normality of the data. Although the tests used are robust to departures from these assumptions (especially with larger sample sizes and balanced data), we may find some assumptions are too badly violated to use these procedures. Here we begin studying tests that do not require the assumption of normality. 2

Non-parametric tests Parametric: involving an assumption about the underlying distribution of the data Non-parametric: (a.k.a. distribution-free ) not requiring an assumption of the data s distribution. NOT however, assumption free in general. 3

What will we learn? Equivalent to: Mann-Whitney Wilcoxon Signed Rank Kruskall- Wallis Two-sample t-test Paired sample t-test One-way ANOVA 4

Two-sample tests Recall the null and alternative hypothesis for a two-tailed test in a two-sample case: H 0 : µ 1 = µ 2 H A : µ 1 µ 2 The two-sample t-test requires independence, equal variance and normality. What if our data are not normally distributed? 5

Mann-Whitney test The Mann-Whitney test (a.k.a the Wilcoxon Rank Sum Test) requires independent data with equal variances. To conduct this (or any other statistical test) we need: test statistic critical value from null distribution 6

M.W. test statistic To find the M.W. test statistics U and U : 1. Rank data and separate into two groups 2. U = n 1 n 2 + n 1(n 1 +1) 2 R 1 3. U = n 1 n 2 + n 2(n 2 +1) 2 R 2 Where: R i = ranks in group i and n 1 n 2 NB: U = n 1 n 2 U and U = n 1 n 2 U Also: R 1 + R 2 = N(N+1) 2 where N = n 1 + n 2 is a useful check. 7

M.W. critical value When you ve found U and U, take the larger of the two and compare it to U α,n1,n 2 (this is where n 1 < n 2 is relevant) found in many introductory statistics texts (e.g. Zar Table B.11). If the larger value of U and U is greater than U α,n1,n 2, reject the null hypothesis at the α- level. If not, fail to reject the null hypothesis. 8

Example Goal: determine whether the feather density (# feathers/sq. inch) of the Adelie penguin is the same as the Chinstrap penguin. We have data from 7 and 8 penguins randomly selected from each species. Adelie Rank Chinstrap Rank 87.0 87.2 82.5 92.5 78.7 81.5 81.3 78.8 80.5 86.2 74.5 85.3 77.8 87.1 89.0 Our hypotheses are: H 0 : Adelie density = Chinstrap density H A : Adelie density Chinstrap density 9

Why the bizarre hypothesis language? The hypotheses above have been framed in words rather than in terms of parameters because we re considering a shift in the location of the distributions, rather than inference particularly about the means. This does not mean we cannot say that one population will be larger than the other more often than not, however, which is often what we want to know. 10

Example Adelie Rank Chinstrap Rank 87.0 5 87.2 3 82.5 8 92.5 1 78.7 13 81.5 9 81.3 10 78.8 12 80.5 11 86.2 6 74.5 15 85.3 7 77.8 14 87.1 4 89.0 2 sum 76 44 U = 7 8 + U = 7 8 + 7(7 + 1) 2 8(8 + 1) 2 76 = 8 44 = 48 U.05(2),7,8 = 45 R code for critical value qwilcox(.975,7,8,lower.tail = T,log.p=F) 11

Example Because the larger of our test statistics: U = 48 is larger than our critical value U.05(2),7,8 = 45 we reject the null hypothesis. This leads to a few questions: Why does this work? How do we deal with tied ranks? What about one-tailed hypotheses? Does it matter if ranking is large to small or small to large? 12

Why does Mann-Whitney work? If neither distribution tends to produce greater values than the other, i.e. if the null hypothesis is true, and the variances are equal, then we would expect the rankings to be randomly intermingled between the two samples. If one distribution does tend to produce greater values than the other, then one sample will usually have higher rankings than the other, in which case one of U or U will be a large value. 13

How do we deal with tied ranks? When multiple observations have the same rank, give them the appropriate average. Example: The 3rd, 4th and 5th observations are all equal. They get assigned (3+4+5)/3 = 4. The next observation gets assigned rank 6. Example: The 7th and 8th observations are equal. They get assigned (7 + 8)/2 = 7.5. The next observation gets assigned rank 9. See Zar example 8.14 (p.150) for a full example of this. 14

One-tailed hypotheses In a two-tailed test, we need to consider both U and U. In a one-tailed test, only one of these will be relevant. Which one we pick, however, depends on whether we rank the largest observation as 1 or the smallest as 1. Zar s table 8.2 (p.149) gives us a helpful summary of how to decide which one we want. (Here, G1 refers to Group 1.) H 0 : G1 G2 H 0 : G1 G2 H A : G1 < G2 H A : G1 > G2 Rank 1 U U small Rank 1 U U large Note that this still assumes n 1 n 2! 15

MW: Direction of ranking For a two-tailed test, it doesn t matter if ranking is smallest to largest or largest to smallest, because you consider both U and U. For a one-tailed test, you need to pay attention to which test statistic you want to consider, which will depend on the direction of ranking. 16

What about paired samples? Recall the paired-sample t-test: run a 1-sample test on the differences requires a natural pairing of the data 17

Wilcoxon Signed Rank test The Wilcoxon signed rank test requires independent data with equal variances. We also have an assumption that the data are symmetric about the median. To conduct this we need: test statistic critical value from null distribution paired sampling of the data 18

WSR test statistic 1. calculate d j = x j y j 2. rank d j (1=smallest, ties are handled as in Mann-Whitney) 3. gives signs to the ranks ( + if d j is positive, if d j is negative) 4. Calculate T + = (+) ranks T = ( ) ranks NB: T is the sum of the ranks, not the signed ranks, so it is a positive number. 19

WSR critical value For two-tailed tests we reject H 0 that the measurements from the two populations are the same if either T + or T is smaller than the critical T α(2),n value found in Zar table B.12. As with the Mann-Whitney, only use one of T + or T in one-tailed tests. (NB: ranking is small to large.): H 0 : Obs in pop 1 Obs in pop 2 H A : Obs in pop 1 > Obs in pop 2 Reject H 0 if T T α(1),n. H 0 : Obs in pop 1 Obs in pop 2 H A : Obs in pop 1 < Obs in pop 2 Reject H 0 if T + T α(1),n. 20

Why does WSR work? If the two populations are the same, we would expect the differences to be roughly split between positive and negative, in which case T + T and neither one will be very small. When one population is different from the other, this will show up as either many positive or many negative differences, leading to very few of the other, and hence a small value for T + or T. 21

Wilcoxon Signed Rank - Example Let s revisit the boys shoe data from homework 4 and use the Wilcoxon Signed Rank test. Rank A B Diff d Sign 13.2 14-0.8 9-8.2 8.8-0.6 8-10.9 11.2-0.3 4-14.3 14.2 0.1 1 + 10.7 11.8-1.1 10-6.6 6.4 0.2 2 + 9.5 9.8-0.3 4-10.8 11.3-0.5 6.5-8.8 9.3-0.5 6.5-13.3 13.6-0.3 4 - T + = 1 + 2 = 3 T = 9 + 8 + 4 + 10 + 4 + 6.5 + 6.5 + 4 = 52 22

Example For a two-tailed test, we compare the smaller of these values to the critical T α(2),10 value. (Reject if smaller than the critical value in this case!) For a one-tailed null that thicknesses from A are B, we compare T to T α(1),10 and reject if T is smaller. For a one-tailed null that thicknesses from A are B, we compare T + to T α(1),10 and reject if T + is smaller. For α =.05, T.05(2),10 = 8 and T.05(1),10 = 10. We would reject the two-tailed null, as well as the second null given above. 23