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

Similar documents
Violating the normal distribution assumption. So what do you do if the data are not normal and you still need to perform a test?

One sided tests. An example of a two sided alternative is what we ve been using for our two sample tests:

Categorical Data Analysis. The data are often just counts of how many things each category has.

Dealing with the assumption of independence between samples - introducing the paired design.

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

- measures the center of our distribution. In the case of a sample, it s given by: y i. y = where n = sample size.

Correlation. We don't consider one variable independent and the other dependent. Does x go up as y goes up? Does x go down as y goes up?

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math.

MITOCW ocw f99-lec09_300k

Regression, Part I. - In correlation, it would be irrelevant if we changed the axes on our graph.

Survey on Population Mean

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

Physics 509: Non-Parametric Statistics and Correlation Testing

Contingency Tables. Contingency tables are used when we want to looking at two (or more) factors. Each factor might have two more or levels.

MITOCW ocw f99-lec01_300k

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

Distribution-Free Procedures (Devore Chapter Fifteen)

Two sided, two sample t-tests. a) IQ = 100 b) Average height for men = c) Average number of white blood cells per cubic millimeter is 7,000.

Non-parametric methods

We're in interested in Pr{three sixes when throwing a single dice 8 times}. => Y has a binomial distribution, or in official notation, Y ~ BIN(n,p).

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

Wilcoxon Test and Calculating Sample Sizes

The Inductive Proof Template

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

Note that we are looking at the true mean, μ, not y. The problem for us is that we need to find the endpoints of our interval (a, b).

MITOCW ocw f99-lec23_300k

We're in interested in Pr{three sixes when throwing a single dice 8 times}. => Y has a binomial distribution, or in official notation, Y ~ BIN(n,p).

6.041SC Probabilistic Systems Analysis and Applied Probability, Fall 2013 Transcript Tutorial:A Random Number of Coin Flips

Nonparametric Statistics. Leah Wright, Tyler Ross, Taylor Brown

STATISTICS 4, S4 (4769) A2

3: Linear Systems. Examples. [1.] Solve. The first equation is in blue; the second is in red. Here's the graph: The solution is ( 0.8,3.4 ).

Business Statistics. Lecture 10: Course Review

Statistics 1. Edexcel Notes S1. Mathematical Model. A mathematical model is a simplification of a real world problem.

Contingency Tables. Safety equipment in use Fatal Non-fatal Total. None 1, , ,128 Seat belt , ,878

Design of the Fuzzy Rank Tests Package

Introduction to hypothesis testing

Module 9: Nonparametric Statistics Statistics (OA3102)

3. Nonparametric methods

MITOCW MIT18_01SCF10Rec_24_300k

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

Intuitive Biostatistics: Choosing a statistical test

SEVERAL μs AND MEDIANS: MORE ISSUES. Business Statistics

Descriptive Statistics (And a little bit on rounding and significant digits)

8.1-4 Test of Hypotheses Based on a Single Sample

An Analysis of College Algebra Exam Scores December 14, James D Jones Math Section 01

Chapter 7 Comparison of two independent samples

MITOCW R11. Double Pendulum System

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

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

4/6/16. Non-parametric Test. Overview. Stephen Opiyo. Distinguish Parametric and Nonparametric Test Procedures

22: Applications of Differential Calculus

Relating Graph to Matlab

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

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

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

Inferences About the Difference Between Two Means

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

Note that we are looking at the true mean, μ, not y. The problem for us is that we need to find the endpoints of our interval (a, b).

Physics 509: Bootstrap and Robust Parameter Estimation

Chapter 7 Class Notes Comparison of Two Independent Samples

Confidence Intervals. - simply, an interval for which we have a certain confidence.

Non-parametric tests, part A:

Nonparametric Statistics

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

MITOCW ocw f99-lec17_300k

Transition Passage to Descriptive Statistics 28

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

Do not copy, post, or distribute. Independent-Samples t Test and Mann- C h a p t e r 13

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

Data Analysis and Statistical Methods Statistics 651

Review for Final. Chapter 1 Type of studies: anecdotal, observational, experimental Random sampling

Statistical Analysis for QBIC Genetics Adapted by Ellen G. Dow 2017

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

MITOCW MITRES18_006F10_26_0602_300k-mp4

Confidence intervals

Non-parametric Hypothesis Testing

STAT Chapter 8: Hypothesis Tests

Mathematical Notation Math Introduction to Applied Statistics

CPSC 320 Sample Solution, Reductions and Resident Matching: A Residentectomy

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

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

But, there is always a certain amount of mystery that hangs around it. People scratch their heads and can't figure

MITOCW ocw f99-lec16_300k

Non-parametric (Distribution-free) approaches p188 CN

Solutions exercises of Chapter 7

MITOCW ocw f07-lec39_300k

MITOCW ocw f07-lec37_300k

MITOCW watch?v=ko0vmalkgj8

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

Do students sleep the recommended 8 hours a night on average?

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

MITOCW watch?v=vjzv6wjttnc

Inferential Statistics

MITOCW 18. Quiz Review From Optional Problem Set 8

Hypothesis Testing. We normally talk about two types of hypothesis: the null hypothesis and the research or alternative hypothesis.

MITOCW ocw-5_60-s08-lec19_300k

More on Asymptotic Running Time Analysis CMPSC 122

Probability and Statistics

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

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

Transcription:

Two sample tests (part II): What to do if your data are not distributed normally: Option 1: if your sample size is large enough, don't worry - go ahead and use a t-test (the CLT will take care of non-normal data if you sample size is large enough). If your data only show minor deviations from normality, you can probably make do with a sample size as small as 15 or 0 (each sample!). If your data show more serious deviations, then you need a larger sample size before the CLT will take care of things for you. 30 or even 50 might be needed. This is particularly true if you see long tails in your data. Option : use a different test. One that does not need the normal distribution assumption. Introducing the Mann-Whitney U test. This is your only option if you don't meet the conditions under option 1. The Mann-Whitney U test (or Wilcoxon-Mann-Whitney U test): The only assumption for this test is random data. You still need to make sure you collected the data randomly. What are you testing? That the two distributions are the same! In other words, your H 0 becomes: H 0 : D 1 = D and H 1 : D 1 D (or, of course, < or > ) The MWU test detects differences in distributions. That can mean a number of different things, but what it does not mean is that it tests for: - equal means or - equal medians If you want to test for means or medians, you need to make an additional assumption. Assume that the distributions are only different in location, but not shape (e.g., two identical binomials, two identical uniforms, etc.)

So your hypotheses are: OR If you make this assumption, then the MWU test can be used to test for means (or medians). How safe is this assumption? Depends: It's a bit like the equal variance assumption for the t-test. You should probably at least look at the distributions for each sample and see if they're approximately the same. Use histograms or boxplots. You can also use more sophisticated graphics similar to q-q plots, but they're beyond our class. H 0 : The populations distributions of Y 1 and Y are the same (note capitalized Y s). H 1 : The population distributions of Y 1 and Y are not the same. which was abbreviated as H 0 : D 1 = D and H 1 : D 1 D above. You assume equal distributions except for location and do: H 0 : μ 1 = μ H 1 : μ 1 μ Once you've made this choice, you proceed like as for any hypothesis test: Figure out your α. Calculate your test statistic. As you might guess, this is called U, not t : Make your comparison (using U tables) Reject or fail to reject. The complicated bit is calculating your test statistic: Important: if you've had BIOL 14 or 31, the method to calculate U* is different. But it eventually gets you the same value for U*. Feel free to do it either way, but I will present the method from our text.

Calculating U* by using ranks: i) Rank all your data. Do both samples at the same time. You should probably sort your data in each column from smallest to larges before doing this - it'll make things much easier. ii) Add up the sums of the ranks for each sample. That gives you R 1 and R. iii) Now we calculate two values for U: U = n 1 n + n 1(n 1 + 1) R 1 and U ' = n 1 n + n (n + 1) R You can also note (if you wish to be a bit lazy) that: U ' = n 1 n U iv) Now pick the larger of U or U', that's your U* (i.e., U* = max(u,u') ) Note that R 1 + R = N ( N + 1) both R 1 and R., so you can check your work if you calculate (you can also check your work by doing: U + U' = n 1 n ) v) Use this value to look up U table using your value of α (see table B.11, p. 747). You'll need your sample sizes: Designate n 1 as the smaller sample and n as the larger sample (it doesn't make any difference to using the table). If U* U table, reject H 0 ; otherwise fail to reject. vi) For a one sided test, just use the appropriate row at the top. (Of course, you need to make sure your data agree with H 1 ). Comment: this table also works if you use the other method of calculating U* (as presented in 14/31). Let's do an example, using 8.11 from the text. This is presented a bit differently than in your text.

We wish to find out if male and female students are the same height: H 0 : male and female students are the same height H 1 : male and female students are not the same height or if we assume equal distributions except for location: H 0 : mean height of male and female students is the same H 1 : mean height of male and female students is not the same Let α = 0.05 Now we need to sort and rank our data: Height of rank males females rank 4 170 163 1 6 175 165 8 180 168 3 9 183 173 5 10 185 178 7 11 188 1 193 Sum 60 18 (Your book does the ranks backwards - giving the highest height a value of 1. It's irrelevant how you do it (your book even mentions this), but I think this way makes more sense). so now: and U = 7 5 + 7(8) U ' = 5 7 + 5(6) 60 = 3 18 = 3 (note check: 60 + 18 = 78 = 1(13) ) And U* = max(3,3) = 3. Now we need to do our comparison: For comparison purposes, we let n 1 = larger sample size and n = smaller sample size, so we have: n 1 = 7 n = 5

Looking at table B.11 and using α = 0.05, we get U table = 30. Finally: Since U* = 3 U table = 30, we reject H 0 and conclude that heights of male and female students are different. (If we had wanted a one sided test (males being taller than females makes sense), we would checked that R 1 > R (R 1 represents the ranks of males, so R 1 should be larger), and then used the row for one sided tests in our table (U table = 9)). Some comments on the Mann-Whitney U test: The problem of ties: If two (or more) data points are equal, then take the average of all the ranks and assign that to each data point. For example: a b 3 3 3 5 4 5 7 9 6 ( is the average of (1 + + 3)/3) Note that the check will still work. Power of the MWU test: Why does it work? This test is quite powerful, even compared to the t-test. If the data are normal, the t-test will do better. If the data are not normal, the MWU test can do much better. Note that if the data are normal, that does not mean the MWU test is invalid : It's just not as good as the t-test We don't have the time to really delve into this. But note the following: If everything in the first sample is bigger than in the second sample, then R 1 will have the sum of all the bigger ranks, and R 1 will be much bigger than R. In other words, if R 1 >> R ( >> means big difference, though it's obviously a bit vague) that implies that the null hypothesis is not true.

On the other hand, if R 1 R, that implies that the ranks are about the same in each sample, and that there really isn't a big difference. If you want more details, check out Wikipedia.