Permutation and Randomization Tests 1

Similar documents
Jednoczynnikowa analiza wariancji (ANOVA)

8.6 Jonckheere-Terpstra Test for Ordered Alternatives. 6.5 Jonckheere-Terpstra Test for Ordered Alternatives

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. B) Blood type Frequency

Exact Permutation Algorithm for Paired Observations: A General and Efficient Version

Statistical tests. Paired t-test

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

CHAPTER 6 PROBABILITY. Chapter 5 introduced the concepts of z scores and the normal curve. This chapter takes

2. Inference for comparing two proportions

Lectures 15/16 ANOVA. ANOVA Tests. Analysis of Variance. >ANOVA stands for ANalysis Of VAriance >ANOVA allows us to:

Laboratory 1: Uncertainty Analysis

Chapter 20. Inference about a Population Proportion. BPS - 5th Ed. Chapter 19 1

Math 1111 Math Exam Study Guide

Hypergeometric Probability Distribution

Game Mechanics Minesweeper is a game in which the player must correctly deduce the positions of

Lesson Sampling Distribution of Differences of Two Proportions

Example 1. An urn contains 100 marbles: 60 blue marbles and 40 red marbles. A marble is drawn from the urn, what is the probability that the marble

Name: Exam 01 (Midterm Part 2 Take Home, Open Everything)

MITOCW mit_jpal_ses06_en_300k_512kb-mp4

Univariate Descriptive Statistics

Most typical tests can also be done as permutation tests. For example: Two sample tests (e.g., t-test, MWU test)

Introduction. Descriptive Statistics. Problem Solving. Inferential Statistics. Chapter1 Slides. Maurice Geraghty

Assignment 4: Permutations and Combinations

Multivariate Permutation Tests: With Applications in Biostatistics

OFF THE WALL. The Effects of Artist Eccentricity on the Evaluation of Their Work ROUGH DRAFT

Lecture 18 - Counting

Chapter 19. Inference about a Population Proportion. BPS - 5th Ed. Chapter 19 1

Week 3 Classical Probability, Part I

Proportions. Chapter 19. Inference about a Proportion Simple Conditions. Inference about a Proportion Sampling Distribution

Sampling Terminology. all possible entities (known or unknown) of a group being studied. MKT 450. MARKETING TOOLS Buyer Behavior and Market Analysis

Chapter 3: Elements of Chance: Probability Methods

BAYESIAN STATISTICAL CONCEPTS

Please Turn Over Page 1 of 7

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC)

How to Do Trigonometry Without Memorizing (Almost) Anything

Massachusetts Institute of Technology 6.042J/18.062J, Spring 04: Mathematics for Computer Science April 16 Prof. Albert R. Meyer and Dr.

Hypothesis Tests. w/ proportions. AP Statistics - Chapter 20

EXACT P-VALUES OF SAVAGE TEST STATISTIC

On the Monty Hall Dilemma and Some Related Variations

Chapter 5 - Elementary Probability Theory

Permutation inference for the General Linear Model

Chapter 7: Sorting 7.1. Original

ANGLO-CHINESE JUNIOR COLLEGE MATHEMATICS DEPARTMENT. Paper 2 26 August 2015 JC 2 PRELIMINARY EXAMINATION Time allowed: 3 hours

An Idea for a Project A Universe for the Evolution of Consciousness

Comparative Power Of The Independent t, Permutation t, and WilcoxonTests

Nessie is alive! Gerco Onderwater. Role of statistics, bias and reproducibility in scientific research

Lecture Slides. Elementary Statistics Twelfth Edition. by Mario F. Triola. and the Triola Statistics Series. Section 2.2- #

3. Data and sampling. Plan for today

Kenken For Teachers. Tom Davis January 8, Abstract

INTRODUCTORY STATISTICS LECTURE 4 PROBABILITY

InstrumentationTools.com

Player Speed vs. Wild Pokémon Encounter Frequency in Pokémon SoulSilver Joshua and AP Statistics, pd. 3B

Math 58. Rumbos Fall Solutions to Exam Give thorough answers to the following questions:

MAT.HS.PT.4.CANSB.A.051

Solutions to Odd-Numbered End-of-Chapter Exercises: Chapter 13

Demand for Commitment in Online Gaming: A Large-Scale Field Experiment

Libyan Licenses Plate Recognition Using Template Matching Method

Cards Against Inanity

Pascal to Fermat. August 24, 1654

TEST QUESTION. Literacy. Free teaching material for a fact-based worldview

WLAN a Algorithm Packet Detection Carrier Frequency Offset, and Symbol Timing. Hung-Yi Lu

Moore, IPS 6e Chapter 05

A Mathematical Analysis of Oregon Lottery Win for Life

Today. Nondeterministic games: backgammon. Algorithm for nondeterministic games. Nondeterministic games in general. See Russell and Norvig, chapter 6

Reciprocating Trust or Kindness

PERMUTATION TESTS FOR COMPLEX DATA

Stock Market Indices Prediction Using Time Series Analysis

CIS 2033 Lecture 6, Spring 2017

Sampling Designs and Sampling Procedures

One-Sample Z: C1, C2, C3, C4, C5, C6, C7, C8,... The assumed standard deviation = 110

Lesson 16: Relating Scale Drawings to Ratios and Rates

Arranging Rectangles. Problem of the Week Teacher Packet. Answer Check

Notes for Recitation 3

C) 1 4. Find the indicated probability. 2) A die with 12 sides is rolled. What is the probability of rolling a number less than 11?

Probability (Devore Chapter Two)

Card-Based Protocols for Securely Computing the Conjunction of Multiple Variables

How To Survey Your Garden. And Draw A Scale Plan ~ The Critical First Stage to a Great Garden. By Rachel Mathews Successful Garden Design.

MITOCW watch?v=-qcpo_dwjk4

Series Circuits. Chapter

Section 6.4. Sampling Distributions and Estimators

Bell Work. Get out the two copies of your desmos picture, the one copy of your equations, and the construction paper you brought.

Midterm 2 Practice Problems

Randomized Algorithms

GAMBLING ( ) Name: Partners: everyone else in the class

Problem of the Month: Between the Lines

LC OL Probability. ARNMaths.weebly.com. As part of Leaving Certificate Ordinary Level Math you should be able to complete the following.

Random Card Shuffling

Combinatorics. Chapter Permutations. Counting Problems

Norman Do. Continued calculation What is the sum of the following two expressions?

The Genetic Algorithm

APPENDIX 2.3: RULES OF PROBABILITY

Statistics 101: Section L Laboratory 10

MSI: Anatomy (of integers and permutations)

Math 1111 Math Exam Study Guide

Mark S. Litaker and Bob Gutin, Medical College of Georgia, Augusta GA. Paper P-715 ABSTRACT INTRODUCTION

Lab S-3: Beamforming with Phasors. N r k. is the time shift applied to r k

( ) Online MC Practice Quiz KEY Chapter 5: Probability: What Are The Chances?

Honors Precalculus Chapter 9 Summary Basic Combinatorics

RANDOM EXPERIMENTS AND EVENTS

Spring 2016 Math 54 Test #2 Name: Write your work neatly. You may use TI calculator and formula sheet. Total points: 103

Ms. Karahoca Date Grade 6. Estimation Versus Calculation: How Do You Win These Things?! Winning free stuff makes everybody smile

Transcription:

Permutation and 1 STA442/2101 Fall 2012 1 See last slide for copyright information. 1 / 19

Overview 1 Permutation Tests 2 2 / 19

The lady and the tea From Fisher s The design of experiments, first published in 1935 Once upon a time, there was a British lady who claimed that she could tell from the taste which had been poured into the cup first, the tea or the milk. So Fisher designed an experiment to test it. Eight cups of tea were prepared. In four, the tea was poured first. In the other four, the milk was poured first. Other features of the cups of tea (size, temperature, etc.) were held constant. Cups were presented in a random order (critical). The lady tasted them, and judged. She knew there were four of each type. 3 / 19

The null hypothesis The null hypothesis is that the lady has no ability to taste the difference. If so, all possible ways of lining up the lady s judgements and the truth about the tea cups should be equally likely. Equally likely because of the random order of presentation. The test statistic is the number of correct judgements. What is the distribution of the test statistic under the null hypothesis? 4 / 19

Data file Truth Judgement 1 tea milk 2 milk tea 3 milk milk 4 milk milk 5 tea tea 6 tea tea 7 tea milk 8 milk tea Under H 0, the reasons for the lady s judgements are unknown, except that they have nothing to do with the truth. The judgements are what they are; they are fixed. Because of randomization, all 8! = 40, 320 permutations of the cups are equally likely, and each one has its own number of correct judgements. But there are lots of repeats. 5 / 19

Counting argument How many ways are there to choose 4 cups to put the tea in first? ( 8 4) = 70 All are equally likely. Only one lines up perfectly with the lady s judgements. The chances of this under H 0 are 1 70 = 0.0143 < 0.05. So H 0 would be rejected at α = 0.05 if she guessed perfectly. 6 / 19

The permutation distribution In general Decide on a test statistic T. List the possible values of T. Under H 0, all ways of re-arranging the data are equally likely. P (T = t) is proportional to the number of ways of getting the value t. The permutation p-value is the probability of getting a value of T as extreme or more extreme as the value we observed, extreme meaning in a direction inconsistent with H 0. 7 / 19

Permutation distribution is hypergeometric For the tea-tasting experiment P (T = t) = ( 4 4 t)( ( 8 4) 4 t ) Of the four cups where the tea was poured first, select t of them to say tea correctly, and 4 t to say tea incorrectly. 8 / 19

P (T = t) = t)( 4 t) (4 4 ( 8 4) > p = function(t) + {p = choose(4,t)*choose(4,4-t)/choose(8,4) + p} > > cbind(0:4,p(0:4)) [,1] [,2] [1,] 0 0.01428571 [2,] 1 0.22857143 [3,] 2 0.51428571 [4,] 3 0.22857143 [5,] 4 0.01428571 If she tasted 10 cups, it would be possible to reject H 0 without requiring perfect judgement. 9 / 19

Fisher s exact test Again, testing association of two binary variables. This time, no requirement of 50-50 split. p-values are still exact probabilities based on the hypergeometric distribution. Large samples are not required. 10 / 19

Permutation tests are not just for categorical data Another example from Fisher s The design of experiments Darwin s experiment on self-fertilized versus cross-fertilized corn plants: Plants are grown in 15 pairs, one cross and one self-fertilized. Response variable is height. Calculate differences. Do A t-test, or... 11 / 19

A randomization test for matched pairs Fisher wishes the self-fertilized plants had been randomly assigned to be on either the left or the right. Otherwise he loves the experiment. Under null hypothesis that self-fertilized versus cross-fertilized does not matter at all, only chance determined whether A was subtracted from B or B was subtracted from A. So the absolute value of the difference is what it is, but the plus or minus sign is by chance alone (under H 0). Test statistic is sum of the differences. There are 2 15 = 32, 768 ways to swap the plus and minus signs, all equaly likely under H 0. Calculate the sum of differences for each one, yielding a permutation distribution for the test statistic under H 0. The p-value is the proportion of these that equal or exceed in absolute value the sum of differences Darwin observed: D = 314. Fisher s answer is p = 0.05267, compared to p = 0.0497 from a t-test. He used his brain as well as doing a lot of tedious calculation. 12 / 19

Some big advantages of the permutation test idea Test is distribution-free under H 0. Some non-parametric methods depend on large sample sizes for their validity. Permutation tests do not. Even for tiny samples, the chance of false significance cannot exceed 0.05. p-values are exact and not asymptotic. There is no pretense of random samplng from some imaginary population. All the probbability comes from random assignment. Can easily be extended to tests comparing several independent treatments. 13 / 19

More comments For observational studies too, the null hypothesis is that the explanatory variable(s) and response variable(s) are independent. It s even better than that. Bell and Doksum (1967) proved that any valid distribution-free test of independence must be a permutation test (maybe a permutation test in disguise). It doesn t matter if data are categorical or quantitative. By scrambling the data, any possible relationship between explanatory and response variables is destroyed. If either explanatory or response variable is multivariate, scramble vectors of data. Whatis the test statistic? In fact, the test statistic is up to you. No matter what you choose, the chance of wrongly rejecting limited to α. But some choices are better than otherss, depending on 14 / 19

To summarize A permutation test is conducted by following these three steps. 1 Compute some test statistic using the set of original observations 2 Re-arrange the observations in all possible orders, computing the test statistic each time. 3 Calculate the permutation test p-value, which is the proportion of test statistic values from the re-arranged data that equal or exceed the value of the test statistic from the original data. 15 / 19

Fisher said Statistical methods for research workers, 1936 Actually, the statistician does not carry out this very tedious process but his conclusions have no justification beyond the fact they could have been arrived at by this very elementary method. 16 / 19

Main drawback is that it s hard to compute Fisher considered permutation tests to be mostly hypothetical, but that was before computers. Even with computers, listing all the permutations can be out of the question, and combinatoric simplification may be challenging. One way around the computational problem is to convert the data to ranks, and then do it. Then, permutation distributions can be figured out in advanc All the common non-parametric rank tests are permutation tests carried out on ranks. 17 / 19

Randomization tests: A modern solution Scramble the values of the response variable in a random order. Compute the test statistic for the randomly shuffled data. In this way, we have randomly sampled a value of the test statistic from its permutation distribution. Carry out the procedure a large number of times. By the Law of Large Numbers, the the permutation p-value is approximated by the proportion of randomly generated values that exceed or equal the observed value of the test statistic. This proportion is the p-value of the randomization test. 18 / 19

Copyright Information This slide show was prepared by Jerry Brunner, Department of Statistics, University of Toronto. It is licensed under a Creative Commons Attribution - ShareAlike 3.0 Unported License. Use any part of it as you like and share the result freely. The L A TEX source code is available from the course website: http://www.utstat.toronto.edu/ brunner/oldclass/appliedf12 19 / 19