Nonparametric tests. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 704: Data Analysis I

Similar documents
Y i = η + ɛ i, i = 1,...,n.

Data are sometimes not compatible with the assumptions of parametric statistical tests (i.e. t-test, regression, ANOVA)

Nonparametric hypothesis tests and permutation tests

Version 1: Equality of Distributions. 3. F (x) and G(x) represent the distribution functions corresponding to the Xs and Y s, respectively.

6 Single Sample Methods for a Location Parameter

GROUPED DATA E.G. FOR SAMPLE OF RAW DATA (E.G. 4, 12, 7, 5, MEAN G x / n STANDARD DEVIATION MEDIAN AND QUARTILES STANDARD DEVIATION

Chapter 7 Comparison of two independent samples

Distribution-Free Procedures (Devore Chapter Fifteen)

Nonparametric Statistics. Leah Wright, Tyler Ross, Taylor Brown

Non-parametric Inference and Resampling

Introduction to Statistical Data Analysis III

T.I.H.E. IT 233 Statistics and Probability: Sem. 1: 2013 ESTIMATION AND HYPOTHESIS TESTING OF TWO POPULATIONS

Wilcoxon Test and Calculating Sample Sizes

Unit 14: Nonparametric Statistical Methods

Point and Interval Estimation II Bios 662

Business Statistics. Lecture 10: Course Review

Non-parametric Tests

Stat 427/527: Advanced Data Analysis I

Non-parametric tests, part A:

The Chi-Square Distributions

STAT 461/561- Assignments, Year 2015

The Chi-Square Distributions

TMA4255 Applied Statistics V2016 (23)

Dr. Maddah ENMG 617 EM Statistics 10/12/12. Nonparametric Statistics (Chapter 16, Hines)

Review: General Approach to Hypothesis Testing. 1. Define the research question and formulate the appropriate null and alternative hypotheses.

5 Introduction to the Theory of Order Statistics and Rank Statistics

DETAILED CONTENTS PART I INTRODUCTION AND DESCRIPTIVE STATISTICS. 1. Introduction to Statistics

PSY 307 Statistics for the Behavioral Sciences. Chapter 20 Tests for Ranked Data, Choosing Statistical Tests

Module 9: Nonparametric Statistics Statistics (OA3102)

What to do today (Nov 22, 2018)?

Section 9.4. Notation. Requirements. Definition. Inferences About Two Means (Matched Pairs) Examples

Nonparametric Tests. Mathematics 47: Lecture 25. Dan Sloughter. Furman University. April 20, 2006

Advanced Statistics II: Non Parametric Tests

1 Hypothesis testing for a single mean

Contents 1. Contents

Outline. PubH 5450 Biostatistics I Prof. Carlin. Confidence Interval for the Mean. Part I. Reviews

Non-parametric (Distribution-free) approaches p188 CN

Chapter 23: Inferences About Means

Comparison of Two Population Means

One-way ANOVA Model Assumptions

Solutions exercises of Chapter 7

Lecture 2: Basic Concepts and Simple Comparative Experiments Montgomery: Chapter 2

This is particularly true if you see long tails in your data. What are you testing? That the two distributions are the same!

Week 7.1--IES 612-STA STA doc

STAT 135 Lab 8 Hypothesis Testing Review, Mann-Whitney Test by Normal Approximation, and Wilcoxon Signed Rank Test.

E509A: Principle of Biostatistics. (Week 11(2): Introduction to non-parametric. methods ) GY Zou.

ANOVA - analysis of variance - used to compare the means of several populations.

Nonparametric Statistics

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)

MATH4427 Notebook 5 Fall Semester 2017/2018

STATISTICS 4, S4 (4769) A2

Analysis of 2x2 Cross-Over Designs using T-Tests

20 Hypothesis Testing, Part I

STAT Section 5.8: Block Designs

, 0 x < 2. a. Find the probability that the text is checked out for more than half an hour but less than an hour. = (1/2)2

Chapter 16. Nonparametric Tests

Bootstrap tests. Patrick Breheny. October 11. Bootstrap vs. permutation tests Testing for equality of location

Frequency table: Var2 (Spreadsheet1) Count Cumulative Percent Cumulative From To. Percent <x<=

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages:

Parametric versus Nonparametric Statistics-when to use them and which is more powerful? Dr Mahmoud Alhussami

Resampling Methods. Lukas Meier

Review of Statistics 101

Inferential Statistics

Dover- Sherborn High School Mathematics Curriculum Probability and Statistics

One-Sample Numerical Data

Contents 1. Contents

Introduction and Descriptive Statistics p. 1 Introduction to Statistics p. 3 Statistics, Science, and Observations p. 5 Populations and Samples p.

Fall 2017 STAT 532 Homework Peter Hoff. 1. Let P be a probability measure on a collection of sets A.

Chapter 18 Resampling and Nonparametric Approaches To Data

SEVERAL μs AND MEDIANS: MORE ISSUES. Business Statistics

Outline. Topic 20 - Diagnostics and Remedies. Residuals. Overview. Diagnostics Plots Residual checks Formal Tests. STAT Fall 2013

Hypothesis testing, part 2. With some material from Howard Seltman, Blase Ur, Bilge Mutlu, Vibha Sazawal

Introduction to hypothesis testing

Non-parametric methods

Math Review Sheet, Fall 2008

Contents 1. Contents

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

Epidemiology Principle of Biostatistics Chapter 11 - Inference about probability in a single population. John Koval

In many situations, there is a non-parametric test that corresponds to the standard test, as described below:

Fish SR P Diff Sgn rank Fish SR P Diff Sng rank

Estimating the accuracy of a hypothesis Setting. Assume a binary classification setting

STAT Section 3.4: The Sign Test. The sign test, as we will typically use it, is a method for analyzing paired data.

z and t tests for the mean of a normal distribution Confidence intervals for the mean Binomial tests

TRANSFORMATIONS TO OBTAIN EQUAL VARIANCE. Apply to ANOVA situation with unequal variances: are a function of group means µ i, say

3. Nonparametric methods

Introduction to Nonparametric Analysis (Chapter)

Introduction to Statistical Analysis

Statistics Primer. ORC Staff: Jayme Palka Peter Boedeker Marcus Fagan Trey Dejong

Non-Parametric Two-Sample Analysis: The Mann-Whitney U Test

AMS7: WEEK 7. CLASS 1. More on Hypothesis Testing Monday May 11th, 2015

EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix)

Sampling Distributions: Central Limit Theorem

Contents. Acknowledgments. xix

1 Statistical inference for a population mean

Design of the Fuzzy Rank Tests Package

Chapter 24. Comparing Means

Hypothesis testing I. - In particular, we are talking about statistical hypotheses. [get everyone s finger length!] n =

STAT100 Elementary Statistics and Probability

Regression with a Single Regressor: Hypothesis Tests and Confidence Intervals

Statistics: revision

Transcription:

1 / 16 Nonparametric tests Timothy Hanson Department of Statistics, University of South Carolina Stat 704: Data Analysis I

Nonparametric one and two-sample tests 2 / 16 If data do not come from a normal population (and if the sample is not large), we cannot use a t-test. One useful approach to creating test statistics is through the use of rank statistics. Resampling methods provide alternative approaches for testing simple hypotheses and obtaining confidence intervals. For example, the t approach can be used with a permutation test to test H 0 : µ 1 = µ 2 versus any of the alternatives, regardless of whether the data are normal or not. This is covered in Section 16.9 (pp. 712 716) and available in proc multtest.

Sign test for one population 3 / 16 The sign test assumes the data come from from a continuous distribution with model Y i = η + ɛ i, i = 1,..., n. η is the population median and ɛ i follow an unknown, continuous distribution. Want to test H 0 : η = η 0 where η 0 is known versus one of the three common alternatives: H a : η < η 0, H a : η η 0, or H a : η > η 0.

Sign test 4 / 16 Test statistic is B = n i=1 I{y i > η 0 }, the number of y 1,..., y n larger than η 0. Under H 0, B bin(n, 0.5). Reject H 0 if B is unusual relative to this binomial distribution. Question: How would you form a large sample test statistic from B? You would not need to do that here, but this is common with more complex test statistics with non-standard distributions.

Example: eye relief data 5 / 16 Data: Data are time in minutes that a drug takes to relieve n = 20 irritated eyes, measured redness. Rao (1998) page 178. proc univariate gives the sign test (and the Wilcoxin signed-rank test), but for a two-sided alternative. How do we get the p-value for a one-sided alternative? 0.4 4.6 2.2 1.2 4.5 5.7 8.0 2.1 4.8 3.0 8.8 11.4 1.3 1.4 2.1 1.3 12.5 2.4 4.6 2.8

SAS code & output 6 / 16 data relief; input time @@; datalines; 0.4 4.6 2.2 1.2 4.5 5.7 8.0 2.1 4.8 3.0 8.8 11.4 1.3 1.4 2.1 1.3 12.5 2.4 4.6 2.8 ; proc univariate plot data=relief mu0=5; * hypothesized value is 5 minutes; var time; run; Tests for Location: Mu0=5 Test -Statistic- -----p Value------ Student s t t -0.96423 Pr > t 0.3470 Sign M -5 Pr >= M 0.0414 Signed Rank S -32.5 Pr >= S 0.2342

Wilcoxin signed rank test 7 / 16 Again, test H 0 : η = η 0. However, this method assumes a symmetric pdf around the median η. Test statistic built from ranks of { y 1 η 0, y 2 η 0,..., y n η 0 }, denoted R 1,..., R n. The signed rank for observation i is { R + Ri y i = i > η 0 0 y i η 0 }. The signed rank statistic is W + = n i=1 R+ i. If W + is large, this is evidence that η > η 0. If W + is small, this is evidence that η < η 0.

Discussion 8 / 16 Both the sign test and the signed-rank test can be used with paired data (e.g. we could test whether the median difference is zero). When to use what? Use t-test when data are approximately normal, or in large sample sizes. Use sign test when data are highly skewed, multimodal, etc. Use signed rank test when data are approximately symmetric but non-normal (e.g. heavy or light-tailed, multimodal yet symmetric, etc.) Note: The sign test and signed-rank test are more flexible than the t-test because they require less strict assumptions, but the t-test has more power when the data are approximately normal.

Eye relief 9 / 16 proc sgplot data=relief; histogram time; Which of the three tests (t-test, sign, signed rank) is most appropriate? How do the p-values differ for the latter two?

Mann-Whitney-Wilcoxin test (pp. 795 796) 10 / 16 The Mann-Whitney test assumes Y 11,... Y 1n1 iid F1 independent Y 21,..., Y 2n2 iid F2, where F 1 is the cdf of data from the first group and F 2 is the cdf of data from the second group. The null hypothesis is H 0 : F 1 = F 2, i.e. that the distributions of data in the two groups are identical. The alternative is commonly taken to be H 1 : F 1 F 2. One-sided tests can also be performed.

Inference for location shift 11 / 16 Although the test statistic is built assuming F 1 = F 2, the alternative is often taken to be that the population medians are unequal. This is a fine way to report the results of the test. Additionally, a CI will give a plausible range for in the shift model F 2 (x) = F 1 (x ). can be the difference in medians or means.

An aside... 12 / 16 The test is consistent for H 0 : P(X < Y ) = 0.5 versus H a : P(X < Y ) 0.5 where X F 1 independent of Y F 2. Consistent means the probability of rejecting goes to one if H a is true. This alternative implies H 1 : F 1 F 2 but not vice-versa. When using this form of the test, there are essentially no assumptions on either F 1 or F 2. If one rather assumes the model F 2 (x) = F 1 (x ), then the test reduces to H 0 : = 0 versus H a : 0. Under this scenario the test statistic can be inverted to provide a CI for, which is the mean or median difference. One must assume that the distributions have the same overall shape but not location. The confidence interval for is called the Hodges-Lehmann estimate.

Building the test statistic 13 / 16 The Mann-Whitney test is intuitive. The data are y 11, y 12,..., y 1n1 and y 21, y 22,..., y 2n2. For each observation j in the first group count the number of observations in the second group c j that are smaller; ties result in adding 0.5 to the count. Assuming H 0 is true, on average half the observations in group 2 would be above Y 1j and half would be below if they come from the same distribution. That is E(c j ) = 0.5n 2. The sum of these guys is U = n 1 j=1 c j and has mean E(U) = 0.5n 1 n 2. The variance is a bit harder to derive, but is Var(U) = n 1 n 2 (n 1 + n 2 + 1)/12.

Large sample inference 14 / 16 Something akin to the CLT tells us Z 0 = U E(U) n1 n 2 (n 1 + n 2 + 1)/12 N(0, 1), when H 0 is true. Seeing a U far away from what we expect under the null gives evidence that H 0 is false; U is then standardized as usual (subtract off then mean we expect under the null and standardize by an estimate of the standard deviation of U). A p-value can be computed as usual as well as a CI. Note: This test essentially boils down to replacing the observed values with their ranks and carrying out a simple pooled t-test!

proc npar1way 15 / 16 Gives five different nonparametric two-sample tests, including Mann-Whitney-Wilcoxin. ******************************** * Mann-Whitney-Wilcoxin ********************************; proc npar1way data=teaching hl; * hl adds Hodges-Lehmann confidence interval for delta; class attend; var rating; run; ******************************** * permutation test (if interested) ********************************; proc multtest data=teaching permutation nsample=10000; test mean(rating); class attend; run;

proc npar1way output The NPAR1WAY Procedure Wilcoxon Scores (Rank Sums) for Variable rating Classified by Variable attend Sum of Expected Std Dev Mean attend N Scores Under H0 Under H0 Score ------------------------------------------------------------------------ Attended 63 4128.50 3496.50 165.227042 65.531746 NotAtten 47 1976.50 2608.50 165.227042 42.053191 Average scores were used for ties. Wilcoxon Two-Sample Test Statistic 1976.5000 Normal Approximation Z -3.8220 One-Sided Pr < Z <.0001 Two-Sided Pr > Z 0.0001 t Approximation One-Sided Pr < Z 0.0001 Two-Sided Pr > Z 0.0002 Z includes a continuity correction of 0.5. Hodges-Lehmann Estimation Location Shift -0.5000 Interval Asymptotic 95% Confidence Limits Midpoint Standard Error -0.7000-0.2000-0.4500 0.1276 16 / 16