Comparison of two means

Similar documents
Previously, when making inferences about the population mean,, we were assuming the following simple conditions:

Chapter 25. Paired Samples and Blocks. Copyright 2010 Pearson Education, Inc.

The Confidence Interval. Finally, we can start making decisions!

Applied Statistical Analysis EDUC 6050 Week 4

Chapter 23. Inference About Means. Copyright 2010 Pearson Education, Inc.

EPS 625 INTERMEDIATE STATISTICS TWO-WAY ANOVA IN-CLASS EXAMPLE (FLEXIBILITY)

Review for Test 2 STA 3123

The t-test: Answers the question: is the difference between the two conditions in my experiment "real" or due to chance?

One-Way ANOVAs t-test two statistically significant Type I error alpha null hypothesis dependant variable Independent variable three levels;

Statistical inference provides methods for drawing conclusions about a population from sample data.

Testing Means. Related-Samples t Test With Confidence Intervals. 6. Compute a related-samples t test and interpret the results.

Creative Commons Attribution-NonCommercial-Share Alike License

- Decide on an estimator for the parameter. - Calculate distribution of estimator; usually involves unknown parameter

Chapter 9. Factorial ANOVA with Two Between-Group Factors 10/22/ Factorial ANOVA with Two Between-Group Factors

An Introduction to Bayesian Statistics

12.1 Inference for Linear Regression. Introduction

Hypothesis testing: comparig means

Psy201 Module 3 Study and Assignment Guide. Using Excel to Calculate Descriptive and Inferential Statistics

Confidence Intervals On Subsets May Be Misleading

Today: Binomial response variable with an explanatory variable on an ordinal (rank) scale.

Objectives. Quantifying the quality of hypothesis tests. Type I and II errors. Power of a test. Cautions about significance tests

Missy Wittenzellner Big Brother Big Sister Project

Sheila Barron Statistics Outreach Center 2/8/2011

Chapter 8 Estimating with Confidence

STA 3024 Spring 2013 EXAM 3 Test Form Code A UF ID #

Chapter 19. Confidence Intervals for Proportions. Copyright 2010 Pearson Education, Inc.

14.1: Inference about the Model

Lab #7: Confidence Intervals-Hypothesis Testing (2)-T Test

Comparing Two Means using SPSS (T-Test)

INVESTIGATION SLEEPLESS DRIVERS

The Z Test. Assignment. Terms You Should Know. Psychological Statistics The Z Test. G&W, Chapter 6. Z-test

STAT 113: PAIRED SAMPLES (MEAN OF DIFFERENCES)

Lecture Notes Module 2

PSYCHOLOGY 300B (A01) One-sample t test. n = d = ρ 1 ρ 0 δ = d (n 1) d

Chapter 19. Confidence Intervals for Proportions. Copyright 2010, 2007, 2004 Pearson Education, Inc.

Hypothesis Testing. Richard S. Balkin, Ph.D., LPC-S, NCC

appstats26.notebook April 17, 2015

The Single-Sample t Test and the Paired-Samples t Test

Module 28 - Estimating a Population Mean (1 of 3)

Key Concept. Chapter 9 Inferences from Two Samples. Requirements. November 18, S9.5_3 Comparing Variation in Two Samples

Properties of the F Distribution. Key Concept. Chapter 9 Inferences from Two Samples. Requirements

(a) Find a 95% confidence interval on the difference in mean active concentrations for the two catalysts.

Dr. Kelly Bradley Final Exam Summer {2 points} Name

Midterm STAT-UB.0003 Regression and Forecasting Models. I will not lie, cheat or steal to gain an academic advantage, or tolerate those who do.

Examining differences between two sets of scores

Chapter 14. Inference for Regression Inference about the Model 14.1 Testing the Relationship Signi!cance Test Practice

* σ = The Z Test. Formulas and Symbols You Should Know. Assignment: Heiman Chapter 10. Terms You Should Know.

YSU Students. STATS 3743 Dr. Huang-Hwa Andy Chang Term Project 2 May 2002

Math Section MW 1-2:30pm SR 117. Bekki George 206 PGH

One-Way Independent ANOVA

Problem #1 Neurological signs and symptoms of ciguatera poisoning as the start of treatment and 2.5 hours after treatment with mannitol.

Hour 2: lm (regression), plot (scatterplots), cooks.distance and resid (diagnostics) Stat 302, Winter 2016 SFU, Week 3, Hour 1, Page 1

Inferential Statistics: An Introduction. What We Will Cover in This Section. General Model. Population. Sample

Theoretical Exam. Monday 15 th, Instructor: Dr. Samir Safi. 1. Write your name, student ID and section number.

Homework Exercises for PSYC 3330: Statistics for the Behavioral Sciences

Chapter 1: Exploring Data

Two Factor Analysis of Variance

Non-parametric methods for linkage analysis

STA Module 9 Confidence Intervals for One Population Mean

Comparing multiple proportions

Stat Wk 9: Hypothesis Tests and Analysis

Sample Size Considerations. Todd Alonzo, PhD

Research Analysis MICHAEL BERNSTEIN CS 376

***SECTION 10.1*** Confidence Intervals: The Basics

SPRING GROVE AREA SCHOOL DISTRICT. Course Description. Instructional Strategies, Learning Practices, Activities, and Experiences.

LAB ASSIGNMENT 4 INFERENCES FOR NUMERICAL DATA. Comparison of Cancer Survival*

Villarreal Rm. 170 Handout (4.3)/(4.4) - 1 Designing Experiments I

Student Performance Q&A:

Midterm Exam MMI 409 Spring 2009 Gordon Bleil

Chapter 8: Estimating with Confidence

Multiple Regression Analysis

Use Survey Happiness Complete. SAV file on Blackboard Assigned to Mistake 8

HS Exam 1 -- March 9, 2006

DIFFERENCE BETWEEN TWO MEANS: THE INDEPENDENT GROUPS T-TEST

CHAPTER OBJECTIVES - STUDENTS SHOULD BE ABLE TO:

Final Exam Practice Test

How to Conduct On-Farm Trials. Dr. Jim Walworth Dept. of Soil, Water & Environmental Sci. University of Arizona

Simple Linear Regression the model, estimation and testing

Chapter 5: Field experimental designs in agriculture

Test 1C AP Statistics Name:

BIOL 458 BIOMETRY Lab 7 Multi-Factor ANOVA

CHAPTER III METHODOLOGY

Statistics for Psychology

PSYCH-GA.2211/NEURL-GA.2201 Fall 2016 Mathematical Tools for Cognitive and Neural Science. Homework 5

Reflection Questions for Math 58B

Chapter 8: Estimating with Confidence

Statistics for EES Factorial analysis of variance

OCW Epidemiology and Biostatistics, 2010 David Tybor, MS, MPH and Kenneth Chui, PhD Tufts University School of Medicine October 27, 2010

Section 9.2b Tests about a Population Proportion

Chapter 13: Introduction to Analysis of Variance

8/28/2017. If the experiment is successful, then the model will explain more variance than it can t SS M will be greater than SS R

Intro to SPSS. Using SPSS through WebFAS

False Discovery Rates and Copy Number Variation. Bradley Efron and Nancy Zhang Stanford University

Advanced ANOVA Procedures

STATISTICS - CLUTCH CH.11: HYPOTHESIS TESTING: PART 1.

CHAPTER 8 Estimating with Confidence

Two-Way Independent ANOVA

Chapter 12. The One- Sample

Business Statistics Probability

PSY 216: Elementary Statistics Exam 4

Transcription:

1 Comparison of two means Most studies are comparative in that they compare outcomes from one group with outcomes from another, for example the mean blood pressure in reponse to two different treatments. 1 Paired ttest Deveaux et al Chapter 25 in the matchedpairs design each subject in one group is paired with a similar subject in the other group one treatment is randomly assigned to one member of the pair the other treatment is given to the other example: to compare two treatments for a disease, pair subjects who are similarly affected, same sex, age, etc. in many cases, the two treatments are given to the same subject in random order with a washout period between. eg. population of patients with high blood pressure currently receiving no medication. Blood pressure is measured on a sample of patients at beginning of study, then they are put on a statin. After one year on the treatment, the blood pressure is measured again. Does the statin reduce blood pressure? the difference between the two measurements in a pair should only reflect the different treatments or experimental conditions Individuals act as their own controls, so that the between individual source of variability is removed. When comparing means, the usual approach is to take the difference of means. The direction of the difference is important. For example, if the difference is (afterbefore), the natural alternative hypothesis in the statin example is that the mean difference is less than 0. recall that the mean of the differences equals the difference of the means if we can assume the differences are normally distributed, they can be analyzed using the onesample t test or confidence interval

2 Example: Suppose we are comparing costs of auto repairs at two locations. We get an estimate at both places for the 6 same cars that have recently been involved in collisions: Car Cost at garage 1 Cost at garage 2 Difference 1 760 730 30 2 1020 910 110 3 950 840 110 4 130 150 20 5 300 270 30 6 630 580 50 Is there evidence that mean costs are different at the two locations? repair costs vary considerably between cars for each car, the first location tends to be more expensive than the second Hypotheses: H 0 : µ d = 0 H a : µ d 0 for the column of differences, n = 6, df = 5, ȳ = 51.667, s = 50.761 so test statistic is t = ȳ µ 0 s/ n = 51.667 0 50.761/ 6 = 2.493. 2.493 is between 2.015 and 2.571, so P (T > 2.493) is between.025 and.05 P value is between 2(0.025) and 2(0.05), that is, between 0.05 and 0.10 (double because twosided alternative) there is only weak evidence of a difference in costs

3 Example: Ten patients were randomly selected to take part in a nutritional program designed to lower blood cholesterol. Two months following the commencement of the program, the pediatrician measured the blood cholesterol levels of the 10 patients again. The results are as follows: Patient Before After Difference 1 210 212 2 2 217 210 7 3 208 210 2 4 215 213 2 5 202 200 2 6 209 208 1 7 207 203 4 8 200 199 1 9 221 218 3 10 218 214 4 Construct a 95% confidence interval for the mean improvement in serum cholestrol. a plot of the data shows little apparent difference between before and after y 200 205 210 215 220 0.5 1.0 1.5 2.0 2.5 before/after

4 once the paired points are joined, however, it becomes clear that most values are lower after the nutritional program the mean and standard deviation of the differences are ȳ = 2.0 and s = 2.749 with 9 df, the table value is t = 2.262 the 95% confidence interval is 2.0 ± 2.262(2.749)/ 10 or or 2.0 ± 1.966.034, 3.966 because this interval does not include 0, the difference is significantly different from 0 at the α =.05 level this may seem surprising considering the individual 95% confidence intervals, for before: (205.74, 215.66), for after: (204.24, 213.16) the paired analysis removes the variation due to the subject, so the difference has a small standard error

5 2 Comparison of means of two independent samples pooled t procedure (DVB Ch. 24, p 668671) matching is not always possible however, can divide individuals at random into the two groups to be compared give one group one treatment and the other group the other or can take random sample from each of two populations because of randomization, groups should be similar in all respects apart from treatment any differences are attributable to the treatment unlike in the matched pairs experiment, the two samples are independent Notation Population Sample Group Mean SD Size Mean SD 1 µ 1 σ n 1 ȳ 1 s 1 2 µ 2 σ n 2 ȳ 2 s 2 important assumption: the population standard deviations are the same in the two groups. (more on this later) call this common SD σ want to make confidence intervals for µ 1 µ 2 or test hypotheses about µ 1 µ 2 idea: base inferences on ȳ 1 ȳ 2 center for confidence interval numerator of test statistic Theory mean of ȳ 1 ȳ 2 is µ 1 µ 2 SD of ȳ 1 ȳ 2 is σ 1 n1 + 1 n2

6 standardized difference is z = (ȳ 1 ȳ 2 ) (µ 1 µ 2 ) σ 1 n1 + 1 n2 problem: as before, don t know σ use pooled sample variance a weighted average of the two sample variances larger sample has larger weight s 2 p = (n 1 1)s 2 1 + (n 2 1)s 2 2 n 1 + n 2 2 now follow usual steps (but with slight changes) replace σ by s p replace normal distribution by t distribution with n 1 + n 2 2 d.f. confidence interval for µ 1 µ 2 is (ȳ 1 ȳ 2 ) ± t n 1 +n 2 2s 1 p + 1 n 1 n 2 test of H 0 : µ 1 = µ 2 uses t = ȳ1 ȳ 2 s p 1 n 1 + 1 n 2

7 Example: Nine observations of surfacesoil ph were made at each of two different locations. Location 1 8.53 8.52 8.01 7.99 7.93 7.89 7.85 7.82 7.80 Location 2 7.85 7.73 7.58 7.40 7.35 7.30 7.27 7.27 7.23 Construct a 99% confidence interval for the difference in mean sufacesoil ph at the two locations, using the following summaries. Minitab n ȳ s Location 1 9 8.038.285 Location 2 9 7.442.224 the pooled twosample confidence interval and test can be done in Minitab output follows for the ph example MTB > set c1 DATA> 8.53 8.52 8.01 7.99 7.93 7.89 7.85 7.82 7.80 DATA> set c2 DATA> 7.85 7.73 7.58 7.40 7.35 7.30 7.27 7.27 7.23 DATA> set c3 DATA> (1)9 DATA> set c4 DATA> (2)9 DATA> mplot c1 c3 c2 c4 8.50+ 2 8.00+ 2 2 3 B B B 7.50+ B 4 B ++++++ 1.00 1.20 1.40 1.60 1.80 2.00 A = C1 vs. C3 B = C2 vs. C4 MTB > twosample.99 c1 c2; SUBC> pooled. TWOSAMPLE T FOR C1 VS C2 N MEAN STDEV SE MEAN C1 9 8.038 0.285 0.095 C2 9 7.442 0.224 0.075 99 PCT CI FOR MU C1 MU C2: (0.242, 0.949) TTEST MU C1 = MU C2 (VS NE): T= 4.92 P=0.0002 DF=16 POOLED STDEV = 0.257

8 the plot shows the values are higher at location 1 the spread of the values is nearly the same at the two locations there is no strong evidence that the values are not from normal population note the subcommand pooled must be used the subcommand alternative can be used to specify a onesided alternative

9 Example: To assess whether the level of iron in the blood is the same for children with cystic fibrosis as for healthy children, a random sample is selected from each population. The n 1 = 9 healthy children have average serum iron level ȳ = 18.9µmol/l and standard deviation s 1 = 5.9µmol/l. The n 2 = 13 children with cystic fibrosis have average iron level ȳ = 11.9µmol/l with sample standard deviation s 2 = 6.3µmol/l. Is there a true difference in population means? the hypotheses are, H 0 : µ 1 = µ 2 and H a : µ 1 µ 2 pooling seems appropriate here so s p = 6.1431 the test statistic is s 2 p = (9 1)5.92 + (13 1)6.3 2 9 + 13 2 = 754.76 = 37.738 20 t = now, with 20 degrees of freedom, P (t > 2.528) =.01 and P (t > 2.845) =.005), so.005 < P (t > 2.628) <.01 = ȳ 1 ȳ 2 s p 1 n 1 + 1 n 2 = 7 2.6636 = 2.6280 18.9 11.9 6.1431(.4336) doubling, because the alternative is twosided, the P value is between.01 and.02 there is strong evidence against the null hypothesis of no diffence in iron level.

10 Two independent samples vs.paired can be difficult to tell whether data should be treated as paired or not if the two samples are of different sizes, the data cannot be paired if the two samples are the same size, the data might be paired, but might not be to decide, read the description of the data key words for paired problem: paired, matched, before/after conclusions can be totally wrong, if wrong analysis is used typically, using a twosample procedure when a paired procedure should be used leads to a larger P value a wider confidence interval because the pooled variance estimate is much larger than the variances of the differences