Skewed Data and Non-parametric Methods



Similar documents
LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

How To Test For Significance On A Data Set

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

Non-Parametric Tests (I)

NCSS Statistical Software

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

2 Sample t-test (unequal sample sizes and unequal variances)

Projects Involving Statistics (& SPSS)

Comparing Means in Two Populations

Nonparametric Two-Sample Tests. Nonparametric Tests. Sign Test

How To Check For Differences In The One Way Anova

Difference tests (2): nonparametric

Difference of Means and ANOVA Problems

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

Nonparametric Statistics

Sample Size and Power in Clinical Trials

1 Nonparametric Statistics

THE KRUSKAL WALLLIS TEST

Permutation & Non-Parametric Tests

Non-Inferiority Tests for Two Means using Differences

CALCULATIONS & STATISTICS

SPSS Tests for Versions 9 to 13

StatCrunch and Nonparametric Statistics

Paired 2 Sample t-test

The Wilcoxon Rank-Sum Test

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

II. DISTRIBUTIONS distribution normal distribution. standard scores

CHAPTER 14 NONPARAMETRIC TESTS

Descriptive Statistics

Independent t- Test (Comparing Two Means)

UNDERSTANDING THE DEPENDENT-SAMPLES t TEST

THE FIRST SET OF EXAMPLES USE SUMMARY DATA... EXAMPLE 7.2, PAGE 227 DESCRIBES A PROBLEM AND A HYPOTHESIS TEST IS PERFORMED IN EXAMPLE 7.

Introduction. Statistics Toolbox

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

Statistical tests for SPSS

QUANTITATIVE METHODS BIOLOGY FINAL HONOUR SCHOOL NON-PARAMETRIC TESTS

Chapter 7 Section 7.1: Inference for the Mean of a Population

Additional sources Compilation of sources:

Analysis of Variance. MINITAB User s Guide 2 3-1

Statistics. One-two sided test, Parametric and non-parametric test statistics: one group, two groups, and more than two groups samples

Minitab Session Commands

Descriptive Statistics

X X X a) perfect linear correlation b) no correlation c) positive correlation (r = 1) (r = 0) (0 < r < 1)

Two Related Samples t Test

Recall this chart that showed how most of our course would be organized:

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

EPS 625 INTERMEDIATE STATISTICS FRIEDMAN TEST

A) B) C) D)

Introduction. Hypothesis Testing. Hypothesis Testing. Significance Testing

Data Analysis Tools. Tools for Summarizing Data

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

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

Normal Distribution. Definition A continuous random variable has a normal distribution if its probability density. f ( y ) = 1.

Descriptive Analysis

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

Descriptive Statistics. Purpose of descriptive statistics Frequency distributions Measures of central tendency Measures of dispersion

Exact Nonparametric Tests for Comparing Means - A Personal Summary

Introduction to Minitab and basic commands. Manipulating data in Minitab Describing data; calculating statistics; transformation.

Using Excel for inferential statistics

Chapter 8 Paired observations

Come scegliere un test statistico

Once saved, if the file was zipped you will need to unzip it. For the files that I will be posting you need to change the preferences.

Case Study Call Centre Hypothesis Testing

NCSS Statistical Software

DATA INTERPRETATION AND STATISTICS

Permutation Tests for Comparing Two Populations

Bowerman, O'Connell, Aitken Schermer, & Adcock, Business Statistics in Practice, Canadian edition

Using Microsoft Excel to Analyze Data from the Disk Diffusion Assay

CHAPTER 14 ORDINAL MEASURES OF CORRELATION: SPEARMAN'S RHO AND GAMMA

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

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

Final Exam Practice Problem Answers

Biostatistics: DESCRIPTIVE STATISTICS: 2, VARIABILITY

Study Guide for the Final Exam

Two-sample inference: Continuous data

Statistics Review PSY379

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

3.4 Statistical inference for 2 populations based on two samples

Analysing Questionnaires using Minitab (for SPSS queries contact -)

HYPOTHESIS TESTING: POWER OF THE TEST

Standard Deviation Estimator

Analysis of Variance ANOVA

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

Analyzing Data with GraphPad Prism

MEASURES OF LOCATION AND SPREAD

How To Run Statistical Tests in Excel

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

Tutorial 5: Hypothesis Testing

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

Confidence Intervals for the Difference Between Two Means

Mind on Statistics. Chapter 13

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

Introduction to Quantitative Methods

HYPOTHESIS TESTING: CONFIDENCE INTERVALS, T-TESTS, ANOVAS, AND REGRESSION

Simple Linear Regression Inference

Section 13, Part 1 ANOVA. Analysis Of Variance

Chapter 3 RANDOM VARIATE GENERATION

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

Transcription:

0 2 4 6 8 10 12 14 Skewed Data and Non-parametric Methods Comparing two groups: t-test assumes data are: 1. Normally distributed, and 2. both samples have the same SD (i.e. one sample is simply shifted relative to the other) 1

Violation of Assumptions 1. Ascertain if assumptions hold. Things to bear in mind are: Slight violations are probably unimportant Violations of unequal variance worse than violations of Normality What is an important violation is judged by experience 2. Use a method that does not make the assumptions or 3. Can try to transform data so that assumptions are satisfied 2

0. 3 5 0. 3 0 0. 2 5 0. 2 0 0. 1 5 0. 1 0 0. 0 5 0. 0 0 0 2 4 6 8 10 Skewness Common way data violate assumptions is that their distribution is skewed The data have asymmetric distribution, with > 50% of population above mode. Often occurs with measurement that must be positive and SD is large compared with mean. E.g. if mean-sd <0, for positive variable, Normality cannot be right as it would imply >16% population had negative values. 3

Example: Assessing Assumptions Compare 20 patients in remission from Hodgkin s disease and 20 patients in remission from non-hodgkin s disease. Variable is the number of T 4 cells per mm 3. (Altman, DG, Practical Statistics for Medical Research, 1991, Chapman & Hall, section 9.7, citing Shapiro et al. 1986, Am J Med Sci, 293-366-70). Plotting data is first step: Dotplots (found under Character Graphs under Graph) can be very useful: MTB > DotPlot 'hodgt4' 'nonhodt4'...: :: :.......... +---------+---------+---------+---------+---------+-------hodgt4 0 500 1000 1500 2000 2500... :. :.....:..... +---------+---------+---------+---------+---------+-------nonhodt4 0 250 500 750 1000 1250 4

Assessment of above plots is very subjective. Additional assessment, slightly less informal, is to look at mean and SD: MTB > Describe 'hodgt4' 'nonhodt4'. N MEAN MEDIAN TRMEAN STDEV SEMEAN hodgt4 20 823 682 771 566 127 nonhodt4 20 522.0 433.0 504.1 293.0 65.5 Mean is less than 2 x SD for non-hodgkin s cases and less than 1.5 SD for Hodgkin s cases, so Normality not a good model. Also, SD is larger when mean is larger Should avoid using a t-test on these data. 5

Distribution-Free Methods (aka Non-parametric methods) The approach here is to use a method that does not assume Normality For two (unpaired) samples the procedure is the Mann- Whitney test (equivalent to Wilcoxon rank sum test) Choose Nonparametrics item under Stat menu and select Mann-Whitney Other non-parametric procedures exist for other situations, e.g. Wilcoxon signed ranks test is analogue of paired t-test 6

How does rank sum test work? For illustration, suppose: Hodgkin s sample contained 3 cases 1378, 958, 431 non-hodgkin s sample 4 cases 979, 1252, 116, 377 Combine two samples and rank them. The ranks will be 1,2,3,4,,7 (in general 1,2,3,,n 1 +n 2 ). Null hypothesis is that both samples come from the same (arbitrary) distribution. If true, there will be no tendency for ranks from one sample to be larger than those from other sample 7

Illustration (continued) Value 116 377 431 958 979 1252 1378 Rank 1 2 3 4 5 6 7 (Hodgkin s sample underlined) Once ranks have been found, original data can be discarded for purposes of test. (This is the way that approach avoids assuming a specific distribution) Test statistic is sum of ranks from one of the samples, e.g. 1+2+5+6 = 14 Under null hypothesis, expected value is 4 7 ( 1+ 2+ 3+ 4+ 5+ 6+ 7) = 16 Can also calculate how much observed value is expected to deviate from its expected value (in general, n n1 + n 1 2 ) 1 { 1+ 2+ + ( n1+ n2)} = n1( n1+ n2 + 1) 2 8

Using the Mann-Whitney test Output from Minitab as follows MTB > Mann-Whitney 95.0 'hodgt4' 'nonhodt4'; SUBC> Alternative 0. Mann-Whitney Confidence Interval and Test hodgt4 N = 20 Median = 681.5 nonhodt4 N = 20 Median = 433.0 Point estimate for ETA1-ETA2 is 203.0 95.0 Percent C.I. for ETA1-ETA2 is (-26.9,531.9) W = 475.0 Test of ETA1 = ETA2 vs. ETA1 ~= ETA2 is significant at 0.0810 The test is significant at 0.0810 (adjusted for ties) Cannot reject at alpha = 0.05 Mann-Whitney test is show in red (and marked ) For skewed data, mean and SD may not be appropriate, so Median and inter-quartile ranges etc. are used to give estimates of treatment effect. In Minitab output ETA1, ETA2, are used to refer to medians of the two samples 9

0 2 4 6 8 10 12 14 Point Estimate & Confidence Interval Above output contains line hodgt4 N = 20 Median = 681.5 nonhodt4 N = 20 Median = 433.0 Point estimate for ETA1-ETA2 is 203.0 Note: 681.5-433.0 203.0: value of 203.0 is median of all possible differences x-y, where x is one sample and y is in the other. Confidence interval assumes two distributions have the same shape, which is often not reasonable: distribution-free assumption-free Also, analysis based on ranks must lose information 10

0. 3 5 0. 3 0 0. 2 5 0. 2 0 0. 1 5 0. 1 0 0. 0 5 0. 0 0 0 2 4 6 8 10 0. 3 5 0. 3 0 0. 2 5 0. 2 0 0. 1 5 0. 1 0 0. 0 5 0. 0 0-2. 5 0. 0 2. 5 Alternative Approach If assumptions of t-test violated, transform data so that t-test can be applied to transformed data. Taking logs of the data is often useful for data that are >0 because: 1. It can get rid of skewness Before log-transformation After log-transformation 2. It can turn multiplicative effects into additive ones 11

Multiplicative into Additive? Suppose the outcome in control group is Normally distributed Suppose the effect of treatment is to double the outcome Then outcome in the control group is also normal Control Treated Mean = µ Mean = 2µ SD = σ SD = 2σ So a t-test cannot be applied because the SDs are unequal If X 2X, then log(x) log(2)+log(x). Mean of log X increases but SD does not 12

Taking logs Doesn t always work, but often helps Procedure is: 1. Take logs of original data 2. Apply all statistical methods, i.e. calculating means and SDs as well as performing t-test, on logged data 3. Transform back to original scale. Care needed to get interpretation correct, do not back transform SDs, just means and confidence intervals 13

Logging Hodgkin s data Results, (using logs to base 10) (omitting inessentials) MTB > Describe 'loghod' 'lognhod'. N MEAN MEDIAN TRMEAN STDEV SEMEAN loghod 20 2.8172 2.8274 2.8183 0.3076 0.0688 lognhod 20 2.6443 2.6364 2.6513 0.2743 0.0613 MTB > TwoSample 95.0 'loghod' 'lognhod'; SUBC> Alternative 0; SUBC> Pooled. TWOSAMPLE T FOR loghod VS lognhod N MEAN STDEV SE MEAN loghod 20 2.817 0.308 0.069 lognhod 20 2.644 0.274 0.061 95 PCT CI FOR MU loghod - MU lognhod: ( -0.014, 0.360) TTEST MU loghod = MU lognhod (VS NE): T= 1.88 P=0.068 DF= 38 POOLED STDEV = 0.291 14

Things to note 1. SDs of two samples of logged data much closer than for unlogged data 2. Visual checks of Normality (e.g. Normal plot) shows logged data more Normal than unlogged 3. P value is 0.068: this is the value to quote, no transformation needed 4. Difference of logged means is 2.817-2.644 = 0.173 = log ( mean Hodgkin s T4 counts)-log ( mean non-hodgkin s T4 counts) "mean" Hodgkin's T4 counts = log( ) "mean" non - Hodgkin's T4 counts Hence "mean" Hodgkin's T4 counts "mean" non - Hodgkin's T4 counts = antilog(0.173)=1.49 So mean T4 count is about 1.5 times bigger in Hodgkin s than non-hodgkin s 95% of the time the multiplying factor will be between antilog(-0.014) and antilog(0.360) (from confidence interval), that is, between 0.97, 2.29 15

Mean In above mean is written in quotes to signify it does not mean the usual (arithmetic) mean, but the geometric mean, a measure which is more suited to skewed data. Consider data 2, 3, 5 or general sample x 1,, x n Arithmetic mean (AM) Geometric mean (GM) Example General case 2+ 3+ 5 x = 3333 + + x. 1 3 n 1 3 ( 2 3 5) = 3107. n ( x x x n ) 1 2 n 1 GM of unlogged data= antilog of AM of logged data Further reading: Bland, chapter 12 (2 nd ed.); Altman, section 9.6; articles by Bland & Altman in BMJ, vol. 312, 1996: p700, p. 770, p.1153 16