Permutation & Non-Parametric Tests



Similar documents
Non-Parametric Tests (I)

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

The Wilcoxon Rank-Sum Test

Comparing Means in Two Populations

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 Statistics

1 Nonparametric Statistics

Skewed Data and Non-parametric Methods

Rank-Based Non-Parametric Tests

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

Statistiek I. Proportions aka Sign Tests. John Nerbonne. CLCG, Rijksuniversiteit Groningen.

StatCrunch and Nonparametric Statistics

HYPOTHESIS TESTING: POWER OF THE TEST

Research Methodology: Tools

Non-Inferiority Tests for Two Means using Differences

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

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

Introduction. Statistics Toolbox

Chicago Booth BUSINESS STATISTICS Final Exam Fall 2011

C. The null hypothesis is not rejected when the alternative hypothesis is true. A. population parameters.

HYPOTHESIS TESTING WITH SPSS:

NCSS Statistical Software

CHAPTER 14 NONPARAMETRIC TESTS

QUANTITATIVE METHODS BIOLOGY FINAL HONOUR SCHOOL NON-PARAMETRIC TESTS

Stat 5102 Notes: Nonparametric Tests and. confidence interval

Solutions: Problems for Chapter 3. Solutions: Problems for Chapter 3

Statistics for Sports Medicine

Hypothesis Testing --- One Mean

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

Odds ratio, Odds ratio test for independence, chi-squared statistic.

Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4)

Section 13, Part 1 ANOVA. Analysis Of Variance

LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

Comparing Two Groups. Standard Error of ȳ 1 ȳ 2. Setting. Two Independent Samples

Nonparametric Two-Sample Tests. Nonparametric Tests. Sign Test

Analysis of Variance ANOVA

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

Exact Nonparametric Tests for Comparing Means - A Personal Summary

Practice problems for Homework 11 - Point Estimation

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

Chapter 7 Notes - Inference for Single Samples. You know already for a large sample, you can invoke the CLT so:

ISyE 2028 Basic Statistical Methods - Fall 2015 Bonus Project: Big Data Analytics Final Report: Time spent on social media

Two Related Samples t Test

EPS 625 INTERMEDIATE STATISTICS FRIEDMAN TEST

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

This can dilute the significance of a departure from the null hypothesis. We can focus the test on departures of a particular form.

Chapter 8. Comparing Two Groups

Independent t- Test (Comparing Two Means)

3.4 Statistical inference for 2 populations based on two samples

THE KRUSKAL WALLLIS TEST

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

Nonparametric statistics and model selection

One-Way Analysis of Variance (ANOVA) Example Problem

Psychology 60 Fall 2013 Practice Exam Actual Exam: Next Monday. Good luck!

Normal Approximation. Contents. 1 Normal Approximation. 1.1 Introduction. Anthony Tanbakuchi Department of Mathematics Pima Community College

Study Guide for the Final Exam

NCSS Statistical Software. One-Sample T-Test

Using Excel for inferential statistics

Topic 8. Chi Square Tests

Experimental Design. Power and Sample Size Determination. Proportions. Proportions. Confidence Interval for p. The Binomial Test

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

Difference tests (2): nonparametric

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

Nonparametric Statistics

1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

Dongfeng Li. Autumn 2010

Two-sample hypothesis testing, II /16/2004

UNDERSTANDING THE INDEPENDENT-SAMPLES t TEST

STATISTICAL SIGNIFICANCE OF RANKING PARADOXES

Tutorial 5: Hypothesis Testing

MATH 140 Lab 4: Probability and the Standard Normal Distribution

Chapter 26: Tests of Significance

Hypothesis Testing: Two Means, Paired Data, Two Proportions

A) B) C) D)

Implementation exercises for the course Heuristic Optimization

UNDERSTANDING THE DEPENDENT-SAMPLES t TEST

Comparison of frequentist and Bayesian inference. Class 20, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

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

The binomial distribution and proportions. Erik-Jan Smits & Eleonora Rossi

Chapter 8 Hypothesis Testing Chapter 8 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing

BA 275 Review Problems - Week 6 (10/30/06-11/3/06) CD Lessons: 53, 54, 55, 56 Textbook: pp , ,

6.2 Permutations continued

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

Probabilistic Strategies: Solutions

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

General Method: Difference of Means. 3. Calculate df: either Welch-Satterthwaite formula or simpler df = min(n 1, n 2 ) 1.

Two-sample inference: Continuous data

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

Testing for differences I exercises with SPSS

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

Comparing Multiple Proportions, Test of Independence and Goodness of Fit

t Tests in Excel The Excel Statistical Master By Mark Harmon Copyright 2011 Mark Harmon

Chapter 4: Statistical Hypothesis Testing

Hypothesis testing. c 2014, Jeffrey S. Simonoff 1

AP: LAB 8: THE CHI-SQUARE TEST. Probability, Random Chance, and Genetics

LAB : THE CHI-SQUARE TEST. Probability, Random Chance, and Genetics

Transcription:

Permutation & Non-Parametric Tests Statistical tests Gather data to assess some hypothesis (e.g., does this treatment have an effect on this outcome?) Form a test statistic for which large values indicate a departure from the hypothesis. Compare the observed value of the statistic to its distribution under the null hypothesis.

Paired t-test Pairs (X 1, Y 1 ),...,(X n, Y n ) independent. X i Normal(µ A, σ A ) Y i Normal(µ B, σ B ) Test H 0 : µ A = µ B vs H a : µ A µ B Paired t-test: D i = Y i X i D 1,...,D n iid Normal(µ B µ A,σ D ) Sample mean D; samplesds D T= D/(s D / n) Compare to a t distribution with n 1 d.f. Example Y X 200 180 100 120 140 160 180 200 Y 160 140 120 D 100 10 0 10 20 30 40 100 110 120 130 140 150 160 X D =14.7 s D =19.6 n=11 T=2.50 P=2*(1-pt(2.50,10)) =0.031

Sign test Suppose we are concerned about the normal assumption. (X 1, Y 1 ),...,(X n, Y n ) independent. Test H 0 : X s and Y s have the same distribution Another statistic: S = #{i : X i < Y i } =#{i : D i > 0} (the number of pairs for which X i < Y i ) Under H 0,S Binomial(n, p=0.5) Suppose S obs > n/2. The P-value is 2 Pr(S S obs H 0 ) = 2*(1-pbinom(Sobs-1,n,0.5)) Example For our example, 8 out of 11 pairs had Y i > X i. P-value = 2 * (1-pbinom(7,11,0.5)) =23% Compare this to P = 3% for the t-test!

Signed Rank test Another nonparametric test. This one is also called the Wilcoxon signed rank test. Rank the differences according to their absolute values. R=sumofranksofpositive(ornegative)values D 28.6 5.3 13.5 12.9 37.3 25.0 5.1 34.6 12.1 9.0 39.4 rank 8 2 6 5 10 7 1 9 4 3 11 R=2+4+5=11 Compare this to the distribution of R when each rank has an equal chance of being positive or negative. In R: wilcox.test(d) P = 0.054 Permutation test (X 1, Y 1 ),...,(X n, Y n ) T obs Randomly flip the pairs. (For each pair, toss a fair coin. If heads, switch X and Y; if tails, do not switch.) Compare the observed T statistic to the distribution of the T-statistic when the pairs are flipped at random. If the observed statistic is extreme relative to this permutation/randomization distribution, then reject the null hypothesis (that the X s and Y s have the same distribution). Actual data: (117.3,145.9) (100.1,94.8) (94.5,108.0) (135.5,122.6) (92.9,130.2) (118.9,143.9) (144.8,149.9) (103.9,138.5) (103.8,91.7) (153.6,162.6) (163.1,202.5) T obs = 2.50 Example shuffled data: (117.3,145.9) (94.8,100.1) (108.0,94.5) (135.5,122.6) (130.2,92.9) (118.9,143.9) (144.8,149.9) (138.5,103.9) (103.8,91.7) (162.6,153.6) (163.1,202.5) T = 0.19

Permutation distribution 5 4 3 2 1 0 1 2 3 4 5 P-value = Pr( T T obs ) Small n: Look at all 2 n possible flips Large n: Look at a sample (w/ repl) of 1000 such flips Example data: All 2 11 permutations: P = 0.037; sample of 1000: P = 0.040. Paired comparisons At least four choices: Paired t-test Sign test Signed rank test Permutation test with the t-statistic Which to use? Paired t-test depends on the normality assumption Sign test is pretty weak Signed rank test ignores some information Permutation test is recommended The fact that the permutation distribution of the t-statistic is generally well-approximated by a t distribution recommends the ordinary t-test. But if you can estimate the permutation distribution, do it.

2-sample t-test X 1,...,X n iid Normal(µ A, σ) Y 1,...,Y m iid Normal(µ B, σ) Test H 0 : µ A = µ B vs H a : µ A µ B Test statistic: T = X Y s p 1 n + 1 m where s p = s 2 A (n 1)+s2 B (m 1) n+m 2 Compare to the t distribution with n + m 2 d.f. Example Y X 40 50 60 70 80 90 100 X =47.5 s A =10.5 n=6 Y =74.3 s B =20.6 m=9 s p =17.4 T= 2.93 P=2*pt(-2.93,6+9-2) =0.011.

Wilcoxon rank-sum test Rank the X s and Y s from smallest to largest (1, 2,..., n+m) R = sum of ranks for X s (Also known as the Mann-Whitney Test) X Y rank 35.0 1 38.2 2 43.3 3 46.8 4 49.7 5 50.0 6 51.9 7 57.1 8 61.2 9 74.1 10 75.1 11 84.5 12 90.0 13 95.1 14 101.5 15 R=1+2+3+6+8+9=29 P-value = 0.026 use wilcox.test() Note: The distribution of R (given that X s and Y s have the same dist n) is calculated numerically Permutation test XorY group X 1 1 X 2 1. 1 X n 1 T obs Y 1 2 Y 2 2. 2 Y m 2 XorY group X 1 2 X 2 2. 1 X n 2 T Y 1 1 Y 2 2. 1 Y m 1 Group status shuffled Compare the observed t-statistic to the distribution obtained by randomly shuffling the group status of the measurements.

Permutation distribution 4 3 2 1 0 1 2 3 4 5 6 7 P-value = Pr( T T obs ) Small n & m: Look at all ( ) n+m n possible shuffles Large n & m: Look at a sample (w/ repl) of 1000 such shuffles Example data: All 5005 permutations: P = 0.015; sample of 1000: P = 0.013. Estimating the permutation P-value Let P be the true P-value (if we do all possible shuffles). Do N shuffles, and let X be the number of times the statistic after shuffling is bigger or equal to the observed statistic. ˆP = X N where X Binomial(N,P) E(ˆP) =P SD(ˆP) = P(1 P) N If the true P-value was P = 5%, and we do N=1000 shuffles: SD(ˆP) = 0.7%.

Summary The t-test relies on a normality assumption. If this is a worry, consider: Paired data: Sign test Signed rank test Permutation test Unpaired data: Rank-sum test Permutation test The crucial assumption is independence! The fact that the permutation distribution of the t-statistic is often closely approximated by a t distribution is good support for just doing t-tests.