The Mann-Whitney U test Peter Shaw. Introduction We meet our first inferential test. You should not get put off by the messy-looking formulae – it’s usually.

Slides:



Advertisements
Similar presentations
Introduction to Hypothesis Testing
Advertisements

Chapter 7 Hypothesis Testing
1 COMM 301: Empirical Research in Communication Lecture 15 – Hypothesis Testing Kwan M Lee.
Statistics.  Statistically significant– When the P-value falls below the alpha level, we say that the tests is “statistically significant” at the alpha.
Chapter 16 Introduction to Nonparametric Statistics
statistics NONPARAMETRIC TEST
Statistical Significance What is Statistical Significance? What is Statistical Significance? How Do We Know Whether a Result is Statistically Significant?
HYPOTHESIS TESTING Four Steps Statistical Significance Outcomes Sampling Distributions.
Introduction to Hypothesis Testing
Statistical Significance What is Statistical Significance? How Do We Know Whether a Result is Statistically Significant? How Do We Know Whether a Result.
1/55 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 10 Hypothesis Testing.
Introduction to Hypothesis Testing
Inference about a Mean Part II
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
PSY 307 – Statistics for the Behavioral Sciences
Today Concepts underlying inferential statistics
Statistics for Managers Using Microsoft® Excel 5th Edition
Inference about Population Parameters: Hypothesis Testing
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
Statistical hypothesis testing – Inferential statistics I.
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
AM Recitation 2/10/11.
Statistics 11 Hypothesis Testing Discover the relationships that exist between events/things Accomplished by: Asking questions Getting answers In accord.
Hypothesis Testing:.
Chapter 10 Hypothesis Testing
Copyright © 2010, 2007, 2004 Pearson Education, Inc Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
Tuesday, September 10, 2013 Introduction to hypothesis testing.
Fundamentals of Hypothesis Testing: One-Sample Tests
Hypothesis testing – mean differences between populations
Confidence Intervals and Hypothesis Testing
Significance Tests …and their significance. Significance Tests Remember how a sampling distribution of means is created? Take a sample of size 500 from.
Section 10.1 ~ t Distribution for Inferences about a Mean Introduction to Probability and Statistics Ms. Young.
Is this quarter fair? How could you determine this? You assume that flipping the coin a large number of times would result in heads half the time (i.e.,
Fundamentals of Data Analysis Lecture 4 Testing of statistical hypotheses.
1 Power and Sample Size in Testing One Mean. 2 Type I & Type II Error Type I Error: reject the null hypothesis when it is true. The probability of a Type.
From last lecture (Sampling Distribution): –The first important bit we need to know about sampling distribution is…? –What is the mean of the sampling.
Non-parametric Tests. With histograms like these, there really isn’t a need to perform the Shapiro-Wilk tests!
Introduction To Biological Research. Step-by-step analysis of biological data The statistical analysis of a biological experiment may be broken down into.
Individual values of X Frequency How many individuals   Distribution of a population.
Significance Tests: THE BASICS Could it happen by chance alone?
Psy B07 Chapter 4Slide 1 SAMPLING DISTRIBUTIONS AND HYPOTHESIS TESTING.
Hypotheses tests for means
1 Lecture note 4 Hypothesis Testing Significant Difference ©
Hypothesis Testing A procedure for determining which of two (or more) mutually exclusive statements is more likely true We classify hypothesis tests in.
1 Psych 5500/6500 The t Test for a Single Group Mean (Part 1): Two-tail Tests & Confidence Intervals Fall, 2008.
Nonparametric Statistics. In previous testing, we assumed that our samples were drawn from normally distributed populations. This chapter introduces some.
Essential Question:  How do scientists use statistical analyses to draw meaningful conclusions from experimental results?
1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known 
Educational Research Chapter 13 Inferential Statistics Gay, Mills, and Airasian 10 th Edition.
Statistical Inference for the Mean Objectives: (Chapter 9, DeCoursey) -To understand the terms: Null Hypothesis, Rejection Region, and Type I and II errors.
Copyright ©2013 Pearson Education, Inc. publishing as Prentice Hall 9-1 σ σ.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
KNR 445 Statistics t-tests Slide 1 Introduction to Hypothesis Testing The z-test.
Ex St 801 Statistical Methods Inference about a Single Population Mean.
Stats Lunch: Day 3 The Basis of Hypothesis Testing w/ Parametric Statistics.
26134 Business Statistics Tutorial 11: Hypothesis Testing Introduction: Key concepts in this tutorial are listed below 1. Difference.
Testing the Differences between Means Statistics for Political Science Levin and Fox Chapter Seven 1.
Welcome to MM570 Psychological Statistics
CD-ROM Chap 16-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition CD-ROM Chapter 16 Introduction.
Introduction Suppose that a pharmaceutical company is concerned that the mean potency  of an antibiotic meet the minimum government potency standards.
IMPORTANCE OF STATISTICS MR.CHITHRAVEL.V ASST.PROFESSOR ACN.
1 Hypothesis Testing Basic Problem We are interested in deciding whether some data credits or discredits some “hypothesis” (often a statement about the.
Uncertainty and confidence Although the sample mean,, is a unique number for any particular sample, if you pick a different sample you will probably get.
BIOL 582 Lecture Set 2 Inferential Statistics, Hypotheses, and Resampling.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 8 th Edition Chapter 9 Hypothesis Testing: Single.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Inference and Tests of Hypotheses
Inferential Statistics
Section 11.1: Significance Tests: Basics
Presentation transcript:

The Mann-Whitney U test Peter Shaw

Introduction We meet our first inferential test. You should not get put off by the messy-looking formulae – it’s usually run on a PC anyway. The important bit is to understand the philosophy of the test.

Imagine.. That you have acquired a set of measurements from 2 different sites.  Maybe one is alleged to be polluted, the other clean, and you measure residues in the soil.  Maybe these are questionnaire returns from students identified as M or F. You want to know whether these 2 sets of measurements genuinely differ. The issue here is that you need to rule out the possibility of the results being random noise.

The formal procedure: Involves the creation of two competing explanations for the data recorded.  Idea 1:These are pattern-less random data. Any observed patterns are due to chance. This is the null hypothesis H0  Idea 2: There is a defined pattern in the data. This is the alternative hypothesis H1 Without the statement of the competing hypotheses, no meaning test can be run.

Occam’s razor If competing explanations exist, chose the simpler unless there is good reason to reject it. Here, you must assume H0 to be true until you can reject it. In point of fact you can never ABSOLUTELY prove that your observations are non-random. Any pattern could arise in random noise, by chance. Instead you work out how likely H0 is to be true.

Example Noise complaints 1= no complaint, 5 = very unhappy Homes near airportControl site You conduct a questionnaire survey of homes in the Heathrow flight path, and also a control population of homes in South west London. Responses to the question “How intrusive is plane noise in your daily life” are tabulated:

Stage 1: Eyeball the data! These data are ordinal, but not normally distributed (allowable scores are 1, 2, 3, 4 or 5). Use Non-parametric statistics It does look as though people are less happy under the flightpath, but recall that we must state our hypotheses H0, H1  H0: There is no difference in attitudes to plane noise between the two areas – any observed differences are due to chance.  H1: Responses to the question differed between the two areas.

Now we assess how likely it is that this pattern could occur by chance: This is done by performing a calculation. Don’t worry yet about what the calculation entails. What matters is that the calculation gives an answer (a test statistic) whose likelihood can be looked up in tables. Thus by means of this tool - the test statistic - we can work out an estimate of the probability that the observed pattern could occur by chance in random data

One philosophical hurdle to go: The test statistic generates a probability - a number for 0 to 1, which is the probability of H0 being true. If p = 0, H0 is certainly false. (Actually this is over-simple, but a good approximation) If p is large, say p = 0.8, H0 must be accepted as true. But how about p = 0.1, p = 0.01?

Significance We have to define a threshold, a boundary, and say that if p is below this threshold H0 is rejected otherwise H1 is accepted. This boundary is called the significance level. By convention it is set at p=0.05 (1:20), but you can chose any other number - as long as you specify it in the write-up of your analyses. WARNING!! This means that if you analyse 100 sets of random data, the expectance (log-term average) is that 5 will generate a significant test.

The procedure: Data Test statistic U = 15.5 Probability of H0 being true p = 0.03 Set up H0, H1. Decide significance level p=0.05 Is p above critical level? YN Reject H0 Accept H0

This particular test: The Mann-Whitney U test is a non-parametric test which examines whether 2 columns of data could have come from the same population (ie “should” be the same) It generates a test statistic called U (no idea why it’s U). By hand we look U up in tables; PCs give you an exact probability. It requires 2 sets of data - these need not be paired, nor need they be normally distributed, nor need there be equal numbers in each set.

How to do it 1 : rank all data into ascending order, then re-code the data set replacing raw data with ranks. Data Data 5 #13 3 #5 4 #10 2 #4 4 #9 4 #7 3 #6 1 #2 5 #12 2 #3 4 #8 1 #1 5 #11 Data 5 #13 = 12 3 #5 = #10 = #4 = #9 = #7 = #6 = #2 = #12 = 12 2 #3 = #8 = #1 = #11 = 12 2 Harmonize ranks where the same value occurs more than once

Once data are ranked: Add up ranks for each column; call these r x and r y (Optional but a good check:  r x + r y = n2/2 + n/2, or you have an error) Calculate  Ux = NxNy + Nx(Nx+1)/2 - Rx  Uy = NxNy + Ny(Ny+1)/2 - Ry take the SMALLER of these 2 values and look up in tables. If U is LESS than the critical value, reject H0 NB This test is unique in one feature: Here low values of the test stat. Are significant - this is not true for any other test.

In this case: Data 5 #13 = 12 3 #5 = #10 = #4 = #9 = #7 = #6 = #2 = #12 = 12 2 #3 = #8 = #1 = #11 = 12 ___ ___ rx=67 ry=24 Check: rx + ry *13/2 + 13/2 = 91 CHECK. Ux = 6*7 + 7*8/ = 3 Uy = 6*7 + 6*7/ = 39 Lowest U value is 3. Critical value of U (7,6) = 4 at p = Calculated U is < tabulated U so reject H0. At p = 0.01 these two sets of data differ.

Tails.. Generally use 2 tailed tests Upper tail of distribution Lower tail of distribution 2 tailed test : These populations DIFFER. 1 tailed test : Population X is Greater than Y (or Less than Y).

Kruskal-Wallis: The U test’s big cousin When we have 2 groups to compare (M/F, site 1/site 2, etc) the U test is correct applicable and safe. How to handle cases with 3 or more groups? The simple answer is to run the Kruskal-Wallis test. This is run on a PC, but behaves very much like the M-W U. It will give one significance value, which simply tells you whether at least one group differs from one other. Males Females Do males differ from females? Site 1 Site 2 Do results differ between these sites? Site 3

Your coursework: I will give each of you a sheet with data collected from 3 sites. (Don’t try copying – each one is different and I know who gets which dataset!). I want you to show me your data processing skills as follows: 1: Produce a boxplot of these data, showing how values differ between the categories. 2: Run 3 separate Mann-Whitny U tests on them, comparing 1-2, 1-3 and 2-3. Only call the result significant if the p value is < : Run a Kruskal-Wallis anova on the three groups combined, and comment on your results.