Lecture 26. December 19, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.

Similar documents
Fish SR P Diff Sgn rank Fish SR P Diff Sng rank

Non-parametric (Distribution-free) approaches p188 CN

Nonparametric Statistics. Leah Wright, Tyler Ross, Taylor Brown

Inferential Statistics

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

Nonparametric hypothesis tests and permutation tests

TMA4255 Applied Statistics V2016 (23)

Resampling Methods. Lukas Meier

Lecture 22. December 19, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.

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

Unit 14: Nonparametric Statistical Methods

Module 9: Nonparametric Statistics Statistics (OA3102)

STAT Section 5.8: Block Designs

1 Comparing two binomials

Chapter 7 Comparison of two independent samples

Nonparametric tests. Mark Muldoon School of Mathematics, University of Manchester. Mark Muldoon, November 8, 2005 Nonparametric tests - p.

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

S D / n t n 1 The paediatrician observes 3 =

Non-parametric tests, part A:

Non-parametric Inference and Resampling

The independent-means t-test:

Business Statistics MEDIAN: NON- PARAMETRIC TESTS

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

Session 3 The proportional odds model and the Mann-Whitney test

Wilcoxon Test and Calculating Sample Sizes

Contents 1. Contents

Power and nonparametric methods Basic statistics for experimental researchersrs 2017

Lecture 24. Ingo Ruczinski. November 24, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University

Non-parametric methods

Advanced Statistics II: Non Parametric Tests

3. Nonparametric methods

Solutions exercises of Chapter 7

Comparison of Two Samples

Analyzing Small Sample Experimental Data

Permutation Tests. Noa Haas Statistics M.Sc. Seminar, Spring 2017 Bootstrap and Resampling Methods

Data analysis and Geostatistics - lecture VII

Statistics: revision

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

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

Lecture 25. Ingo Ruczinski. November 24, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University

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

Nonparametric Methods

Lecture 3: Mixture Models for Microbiome data. Lecture 3: Mixture Models for Microbiome data

Lecture 7: Hypothesis Testing and ANOVA

ST4241 Design and Analysis of Clinical Trials Lecture 9: N. Lecture 9: Non-parametric procedures for CRBD

Introduction to Nonparametric Statistics

Statistical Analysis of Chemical Data Chapter 4

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

Non-Parametric Statistics: When Normal Isn t Good Enough"

Comparison of Two Population Means

MATH4427 Notebook 5 Fall Semester 2017/2018

Mitosis Data Analysis: Testing Statistical Hypotheses By Dana Krempels, Ph.D. and Steven Green, Ph.D.

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

Introduction to Statistical Analysis

ST4241 Design and Analysis of Clinical Trials Lecture 7: N. Lecture 7: Non-parametric tests for PDG data

Introduction to Statistical Data Analysis III

MATH Notebook 3 Spring 2018

Nonparametric statistic methods. Waraphon Phimpraphai DVM, PhD Department of Veterinary Public Health

Agonistic Display in Betta splendens: Data Analysis I. Betta splendens Research: Parametric or Non-parametric Data?

MATH Notebook 2 Spring 2018

Exam details. Final Review Session. Things to Review

Lecture Slides. Elementary Statistics. by Mario F. Triola. and the Triola Statistics Series

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

Statistics Handbook. All statistical tables were computed by the author.

Chapter 18 Resampling and Nonparametric Approaches To Data

Lecture Slides. Section 13-1 Overview. Elementary Statistics Tenth Edition. Chapter 13 Nonparametric Statistics. by Mario F.

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

6 Single Sample Methods for a Location Parameter

Inferences About the Difference Between Two Means

Transition Passage to Descriptive Statistics 28

Nonparametric Statistics Notes

Lecture 28. Ingo Ruczinski. December 3, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University

Intro to Parametric & Nonparametric Statistics

5 Introduction to the Theory of Order Statistics and Rank Statistics

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

STATISTICS 4, S4 (4769) A2

Rank-Based Methods. Lukas Meier

Class 4: Classification. Quaid Morris February 11 th, 2011 ML4Bio

Name: Biostatistics 1 st year Comprehensive Examination: Applied in-class exam. June 8 th, 2016: 9am to 1pm

16. Nonparametric Methods. Analysis of ordinal data

Introduction to Statistical Analysis. Cancer Research UK 12 th of February 2018 D.-L. Couturier / M. Eldridge / M. Fernandes [Bioinformatics core]

Data Analysis: Agonistic Display in Betta splendens I. Betta splendens Research: Parametric or Non-parametric Data?

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

3 Joint Distributions 71

1 Hypothesis testing for a single mean

Data Analysis and Statistical Methods Statistics 651

Distribution-Free Procedures (Devore Chapter Fifteen)

Chapter 8 Class Notes Comparison of Paired Samples

Chapter 15: Nonparametric Statistics Section 15.1: An Overview of Nonparametric Statistics

Sign test. Josemari Sarasola - Gizapedia. Statistics for Business. Josemari Sarasola - Gizapedia Sign test 1 / 13

1 ONE SAMPLE TEST FOR MEDIAN: THE SIGN TEST

Basic Statistical Analysis

Analysis of variance (ANOVA) Comparing the means of more than two groups

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

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

Lecture 17. Ingo Ruczinski. October 26, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University

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

STAT100 Elementary Statistics and Probability

Things you always wanted to know about statistics but were afraid to ask

Non-parametric Hypothesis Testing

Transcription:

s Sign s Lecture 26 Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University December 19, 2007

s Sign s 1 2 3 s 4 Sign 5 6 7 8 9 10 s

s Sign 1 Distribution-free s 2 Sign 3 Sign rank 4 Rank sum 5 Discussion of non-parametric s s

s s Sign s Distribution free methods require fewer assumptions than parametric methods Focus on ing rather than estimation Not sensitive to outlying observations Especially useful for cruder data (like ranks) Throws away some of the information in the data May be less powerful than parametric counterparts, when the parametric assumptions are true For large samples, are equally efficient to parametric counterparts

s Sign s Fish SR P Diff Sgn rank Fish SR P Diff Sng rank 1.32.39.07 +15.5 13.20.22.02 +6.5 2.40.47.07 +15.5 14.31.30 -.01-2.5 3.11.11.00 15.62.60 -.02-6.5 4.47.43 -.04-11.0 16.52.53.01 +2.5 5.32.42.10 +20.0 17.77.85.08 +17.5 6.35.30 -.05-13.5 18.23.21 -.02-6.5 7.32.43.11 +20.0 19.30.33.03 +9.0 8.63.98.35 +23.0 20.70.57 -.13-21.0 9.50.86.36 +24.0 21.41.43.02 +6.5 10.60.79.19 +22.0 22.53.49 -.04-11.0 11.38.33 -.05-13.5 23.19.20.01 +2.5 12.46.45 -.01-2.5 24.31.35.04 +11.0 25.48.40 -.08-17.5 Measurements are mecury levels in fish (ppm) Data from Rice Mathematical Statistics and Data Analysis; second edition

Alternatives to the paired t- s Sign s Let D i = difference (P - SR) Let θ be the population median of the D i H 0 : θ = 0 versus H a : θ 0 (or > or <) Notice that θ = 0 iff p = P(D > 0) =.5 Let X be the number of times D > 0 X is then binomial(n, p) The sign s wether H 0 : p =.5 using X

Example s Sign s θ = median difference p - sr H 0 : θ = 0 versus H a : θ 0 Number of instances where the difference is bigger than 0 is 15 out of 25 trials binom.(15, 25) p-value = 0.4244 Or we could have used large sample s for a binomial proportion prop.(15, 25, p =.5) X-squared = 0.64, df = 1, p-value = 0.4237

Discussion s Sign Magnitude of the differences is discarded Perhaps too much information lost Could easily have ed H 0 : θ = θ 0 by calculating the number of times D > θ 0 and performing a binomial We can invert these s to get a distribution free confidence interval for the median s

s Sign s Wilcoxon s statistic uses the information in the signed ranks of the differences Saves some of the information regarding the magnitude of the differences Still s H 0 : θ = 0 versus the three alternatives Appropriately normalized, the statistic follows a normal distribution Also the exact small sample distribution of the signed rank statistic is known (if there are no ties)

procedure s Sign s 1 Take the paired differences 2 Take the absolute values of the differences 3 Rank these absolute values, throwing out the 0s 4 Multiply the ranks by the sign of the difference (+1 for a positive difference and -1 for a negative difference) 5 Cacluate the rank sum W + of the positive ranks

procedure s Sign s If θ > 0 then W + should be large If θ < 0 then W + should be small Properly normalized, W + follows a large sample normal distribution For small sample sizes, W + has an exact distribution under the null hypothesis Can get critical values from tables in the textbook

s Sign s Assume no ties Simulate n observations from any distribution that has θ = 0 as its median Rank the absolute value of the data, retain the signs, calculate the signed rank statistic Apply this procedure over and over, the proportion of time that the observed statistic is larger or smaller (depending on the hypothesis) is a approximation to the P-value

s Sign s Here s a slightly more elegant way to simulate from the null distribution Consider the ranks 1,..., n Randomly assign the signs as binary with probability.5 of being positive and.5 of being negative Calculate the signed rank statistic Apply this procedure over and over, the proportion of time that the observed statistic is larger or smaller (depending on the hypothesis) is a approximation to the P-value

Large sample distribution of W + s Sign s Under H 0 and if there are no ties E(W + ) = n(n + 1)/4 Var(W + ) = n(n + 1)(2n + 1)/24 TS = {W + E(W + )}/Sd(W + ) Normal(0, 1) There is a correction term necessary for ties Without ties, it s possible to do an exact (small sample)

Example s Sign s diff <- c(.07,.07,.00, -.04,...) wilcox.(diff, exact = FALSE) H 0 : Med diff = 0 vesus H a : Med diff 0 W + = 194.5 E(W + ) = 24 25/4 = 150 Var(W + ) = 24 25 49/24 = 1, 225 TS = (194.5 150)/ 1, 224 = 1.27 P-value =.20 R s P-value (uses correction for ties) = 0.21

s Sign s Methods for unpaired samples Comparing two measuring techniques A and B Units are in deg C per gram Method A Method B 79.98 80.05 80.02 80.04 80.03 79.94 80.02 80.02 79.98 80.04 80.00 79.97 80.03 80.02 79.97 80.03 80.03 80.04 79.95 79.97 79.97 Data from Rice Mathematical Statistics and Data Analysis; second edition

The s Sign s Tests whether or not the two treatments have the same location Assumes independent identically distributed errors, not necessarily normal Null hypothesis can also be written more generally as a stochastic shift for two arbitrary distributions Test uses the sum of the ranks obtained by discarding the treatment labels Also called the Wilcoxon rank sum

The Mann-Whitney s Sign s Procedure 1 Discard the treatment labels 2 Rank the observations 3 Calculate the sum of the ranks in the first treatment 4 Either calculate the asymptotic normal distrubtion of this statistic compare with the exact distribution under the null hypothesis

s Sign s Method A Method B 7.5 21.0 11.5 19.0 15.5 1.0 11.5 11.5 7.5 19.0 9.0 4.5 15.5 11.5 4.5 15.5 15.5 19.0 2.0 4.5 4.5 180 51 Sum has to add up to 21 22/2 = 231

s Sign s Aside Gauss supposedly came up with this in grade school x = 1 + 2 + 3 + 4 +... + n x = n + n-1 + n-2 + n-3 +... + 1 Therefore 2x = n+1 + n+1 + n+1 + n+1 +... + n+1 So 2x = n (n + 1) / 2 So x = n (n + 1) / 2

Results s Sign s Let W be the sum of the ranks for the first treatment (A) Let n A and n B be the sample sizes Then E(W ) = n A (n A + n B + 1)/2 Var(W ) = n A n B (n A + n B + 1)/12 TS = {W E(W )}/Sd(W ) N(0, 1) Also the exact distribution of W can be calculated

Example s Sign s W = 51 E(W ) = 8(8 + 13 + 1)/2 = 88 Sd(W ) = 8 13(8 + 13 + 1)/12 = 13.8 TS = (51 88)/13.8 = 2.68 Two-sided P-value=.007 R function wilcox. will perform the

s Sign s Note that under H 0, the two are exchangeable Therefore, any allocation of the ranks between the two is equally likely Procedure: Take the ranks 1,..., N A + N B and permute them Take the first N A ranks and allocate them to Group A; allocate the remainder to Group B Calculate the statistic Repeat this process over and over; the proportion of times the statistic is larger or smaller (depending on the alternative) than the observed value is an exact P-value

Notes about nonpar s s Sign s Tend to be more robust to outliers than parametric counterparts Do not require normality assumptions Usually have exact small-sample versions Are often based on ranks rather than the raw data Loss in power over parametric counterparts is often not bad Nonpar s are not assumption free

s Sign s s s are similar to the rank-sum s, though they use the actual data rather than the ranks That is, consider the null hypothesis that the distribution of the observations from each group is the same Then, the group labels are irrelevant We then discard the group levels and permute the combined data Split the permuted data into two with n A and n B observations (say by always treating the first n A observations as the first group) Evaluate the probability of getting a statistic as large or large than the one observed An example statistic would be the difference in the averages between the two ; one could also use a t-statistic

s Sign This is an easy way to produce a null distribution for a of equal distributions Similar in flavor to the bootstrap This procedure produces an exact Less robust, but more powerful than the rank sum s Very popular in genomic applications s

s Sign s Frequency 0 50 100 150 200 250 Histogram of simtheta 10 5 0 5 10 simtheta