Objectives (Section 7.2) Two sample problems:

Slides:



Advertisements
Similar presentations
BPS - 5th Ed. Chapter 241 One-Way Analysis of Variance: Comparing Several Means.
Advertisements

Objectives 7.1, 7.2Inference for comparing means of two populations  Matched pairs t confidence interval  Matched pairs t hypothesis test  Two-sample.
Lecture 11/7. Inference for Proportions 8.2 Comparing Two Proportions © 2012 W.H. Freeman and Company.
Inference for distributions: - Comparing two means IPS chapter 7.2 © 2006 W.H. Freeman and Company.
PSY 307 – Statistics for the Behavioral Sciences
Inference for Distributions - for the Mean of a Population IPS Chapter 7.1 © 2009 W.H Freeman and Company.
6/18/2015Two Sample Problems1 Chapter 18 Two Sample Problems.
6/22/2015Two Sample Problems1 Chapter 19 Two Sample Problems.
Inference for Distributions - for the Mean of a Population
Chapter 11: Inference for Distributions
Two-sample problems for population means BPS chapter 19 © 2006 W.H. Freeman and Company.
Inferences Based on Two Samples
Ch 11 – Inference for Distributions YMS Inference for the Mean of a Population.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Confidence Intervals and Hypothesis Tests for the Difference between Two Population Means µ 1 - µ 2 Inference for  1  Independent Samples.
Chapter 11 Inference for Distributions AP Statistics 11.1 – Inference for the Mean of a Population.
IPS Chapter 7 © 2012 W.H. Freeman and Company  7.1: Inference for the Mean of a Population  7.2: Comparing Two Means  7.3: Optional Topics in Comparing.
Inference for distributions: - Comparing two means IPS chapter 7.2 © 2006 W.H. Freeman and Company.
Lecture 5 Two population tests of Means and Proportions.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Section Inference about Two Means: Independent Samples 11.3.
Two sample problems:  compare the responses in two groups  each group is a sample from a distinct population  responses in each group are independent.
Objectives (BPS chapter 19) Comparing two population means  Two-sample t procedures  Examples of two-sample t procedures  Using technology  Robustness.
Comparing Means: Confidence Intervals and Hypotheses Tests for the Difference between Two Population Means µ 1 - µ 2 1.
Inference for Distributions - for the Mean of a Population IPS Chapter 7.1 © 2009 W.H Freeman and Company.
Comparing Means: Confidence Intervals and Hypotheses Tests for the Difference between Two Population Means µ 1 - µ 2 Chapter 24 Independent Samples Chapter.
Inference for Distributions 7.2 Comparing Two Means © 2012 W.H. Freeman and Company.
Essential Statistics Chapter 171 Two-Sample Problems.
Inference for distributions: - Comparing two means.
Comparing Means: Confidence Intervals and Hypotheses Tests for the Difference between Two Population Means µ 1 - µ 2 Inference for the difference Between.
Chapter 7 Inference Concerning Populations (Numeric Responses)
Objectives (PSLS Chapter 18) Comparing two means (σ unknown)  Two-sample situations  t-distribution for two independent samples  Two-sample t test 
Analysis of Financial Data Spring 2012 Lecture 2: Statistical Inference 2 Priyantha Wijayatunga, Department of Statistics, Umeå University
Class Six Turn In: Chapter 15: 30, 32, 38, 44, 48, 50 Chapter 17: 28, 38, 44 For Class Seven: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 Read.
Comparing Means: Confidence Intervals and Hypotheses Tests for the Difference between Two Population Means µ 1 - µ 2 Chapter 22 Part 2 CI HT for m 1 -
10/31/ Comparing Two Means. Does smoking damage the lungs of children exposed to parental smoking? Forced vital capacity (FVC) is the volume (in.
Statistics for Business and Economics Module 1:Probability Theory and Statistical Inference Spring 2010 Lecture 7: Tests of significance and confidence.
CHAPTER 8 Estimating with Confidence
CHAPTER 10 Comparing Two Populations or Groups
Review of Power of a Test
Chapter 8: Estimating with Confidence
Objectives (PSLS Chapter 18)
CHAPTER 10 Comparing Two Populations or Groups
Basic Practice of Statistics - 5th Edition
Chapter 23 CI HT for m1 - m2: Paired Samples
18. Two-sample problems for population means (σ unknown)
Chapter 8 Hypothesis Testing with Two Samples.
Chapter 8: Estimating with Confidence
Hypothesis Testing: Two Sample Test for Means and Proportions
CHAPTER 21: Comparing Two Means
Inference for distributions: - Optional topics in comparing distributions IPS chapter 7.3 © 2006 W.H. Freeman and Company.
Chapter 9 Hypothesis Testing.
Inference for Distributions
Lesson Comparing Two Means.
Chapter 12: Comparing Independent Means
Warmup To check the accuracy of a scale, a weight is weighed repeatedly. The scale readings are normally distributed with a standard deviation of
CHAPTER 10 Comparing Two Populations or Groups
Chapter 8: Estimating with Confidence
Chapter 8: Estimating with Confidence
Basic Practice of Statistics - 3rd Edition Two-Sample Problems
Comparing Two Populations
Inference for Distributions 7.2 Comparing Two Means
CHAPTER 10 Comparing Two Populations or Groups
Essential Statistics Two-Sample Problems - Two-sample t procedures -
CHAPTER 10 Comparing Two Populations or Groups
Chapter 8: Estimating with Confidence
CHAPTER 10 Comparing Two Populations or Groups
Chapter 8: Estimating with Confidence
CHAPTER 10 Comparing Two Populations or Groups
Chapter 8: Estimating with Confidence
Chapter 8: Estimating with Confidence
Presentation transcript:

Objectives (Section 7.2) Two sample problems: compare the responses in two groups each group is a sample from a distinct population responses in each group are independent of those in the other group Some Methods… Two-sample z distribution Two independent samples t-distribution Two sample t-test Two-sample t-confidence interval Robustness Details of the two sample t procedures

Comparing two samples (A) Which is it? Population 1 Population 2 Sample 2 Sample 1 Which is it? We often compare two treatments used on independent samples. Is the difference between both treatments due only to variations from the random sampling (B), or does it reflects a true difference in population means (A)? Population Sample 2 Sample 1 (B) Independent samples: Subjects in one sample are completely unrelated to subjects in the other sample.

Two-sample z distribution We have two independent SRSs (simple random samples) coming maybe from two distinct populations with (m1,s1) and (m2,s2). We use 1 and 2 to estimate the unknown m1 and m2. When both populations are normal, the sampling distribution of ( 1− 2) is also normal, with standard deviation : Then the two-sample z statistic has the standard normal N(0, 1) sampling distribution.

Two independent samples t distribution We have two independent SRSs (simple random samples) coming maybe from two distinct populations with (m1,s1) and (m2,s2) unknown. We use ( 1,s1) and ( 2,s2) to estimate (m1,s1) and (m2,s2) respectively. To compare the means, both populations should be normally distributed. However, in practice, it is enough that the two distributions have similar shapes and that the sample data contain no strong outliers.

The two-sample t statistic follows approximately the t distribution with a standard error SE (spread) reflecting variation from both samples: Conservatively, the degrees of freedom (df) is equal to the smallest of (n1 − 1, n2 − 1). df m1-m2

with either a one-sided or a two-sided alternative hypothesis. Two-sample t-test The null hypothesis is that both population means m1 and m2 are equal, thus their difference is equal to zero. H0: m1 = m2 <=> m1 − m2 = 0 with either a one-sided or a two-sided alternative hypothesis. We find how many standard errors (SE) away from (m1 − m2) is ( 1− 2) by standardizing: Because in a two-sample test H0 assumes (m1 − m2) = 0, we simply use With df = smallest(n1 − 1, n2 − 1)

Does smoking damage the lungs of children exposed to parental smoking? Forced vital capacity (FVC) is the volume (in milliliters) of air that an individual can exhale in 6 seconds. FVC was obtained for a sample of children not exposed to parental smoking and a group of children exposed to parental smoking. Parental smoking FVC s n Yes 75.5 9.3 30 No 88.2 15.1 We want to know whether parental smoking decreases children’s lung capacity as measured by the FVC test. Is the mean FVC lower in the population of children exposed to parental smoking?

H0: msmoke = mno <=> (msmoke − mno) = 0 Ha: msmoke < mno <=> (msmoke − mno) < 0 (one sided) The difference in sample averages follows approximately the t distribution with 29 df: We calculate the t statistic: Parental smoking FVC s n Yes 75.5 9.3 30 No 88.2 15.1 In table D, for df 29 we find: |t| > 3.659 => p < 0.0005 (one sided) It’s a very significant difference, we reject H0. Lung capacity is significantly impaired in children of smoking parents.

Two sample t-confidence interval Because we have two independent samples we use the difference between both sample averages ( 1 − 2) to estimate (m1 − m2). Practical use of t: t* C is the area between −t* and t*. We find t* in the line of Table D for df = smallest (n1−1; n2−1) and the column for confidence level C. The margin of error MOE is: C t* −t* m m

EX 7.14: Can directed reading activities in the classroom help improve reading ability? A class of 21 third-graders participates in these activities for 8 weeks while a control classroom of 23 third-graders follows the same curriculum without the activities. After 8 weeks, all children take a reading test (scores in table 7.4, p. 452 (7.2, 4/9 in eBook)). 95% confidence interval for (µ1 − µ2), with df = 20 conservatively  t* = 2.086: With 95% confidence, (µ1 − µ2), falls within 9.96 ± 8.99 or 1.0 to 18.9.

Robustness “The two-sample t procedures are more robust than the one-sample t methods. When the sizes of the two samples are equal and the distributions of the two populations being compared have similar shapes, probability values from the t table are quite accurate for a broad range of distributions when the sample sizes are as small as n1 = n2 = 5”  When planning a two-sample study, choose equal sample sizes if you can. As a guideline, a combined sample size (n1 + n2) of 40 or more will allow you to work even with the most skewed distributions. For very small samples though, make sure the data is very close to normal – no outliers, no skewness…

Details of the two sample t procedures The true value of the degrees of freedom for a two-sample t-distribution is quite lengthy to calculate. That’s why we use an approximate value, df = smallest(n1 − 1, n2 − 1), which errs on the conservative side (often smaller than the exact). Computer software, though, gives the exact degrees of freedom—or the rounded value—for your sample data.

95% confidence interval for the reading ability study using the more precise degrees of freedom: Table D Excel t* Independent Samples Test 2.362 .132 2.267 42 .029 9.95445 4.39189 1.09125 18.81765 2.311 37.855 .026 4.30763 1.23302 18.67588 Equal variances assumed not assumed Reading Score F Sig. Levene's Test for Equality of Variances t df Sig. (2-tailed) Mean Difference Std. Error Lower Upper 95% Confidence Interval of the t-test for Equality of Means SPSS

Pooled two-sample procedures There are two versions of the two-sample t-test: one assuming equal variance (“pooled 2-sample test”) and one not assuming equal variance (“unequal” variance, as we have studied) for the two populations. They have slightly different formulas and degrees of freedom. The pooled (equal variance) two-sample t-test was often used before computers because it has exactly the t distribution for degrees of freedom n1 + n2 − 2. However, the assumption of equal variance is hard to check, and thus the unequal variance test is safer. Two normally distributed populations with unequal variances

A level C confidence interval for µ1 − µ2 is When both population have the same standard deviation, the pooled estimator of σ2 is: The sampling distribution for (xbar1 − xbar2) has exactly the t distribution with (n1 + n2 − 2) degrees of freedom. A level C confidence interval for µ1 − µ2 is (with area C between −t* and t*) To test the hypothesis H0: µ1 = µ2 against a one-sided or a two-sided alternative, compute the pooled two-sample t statistic for the t(n1 + n2 − 2) distribution.

Which type of test? One sample, paired samples, two samples? Comparing vitamin content of bread immediately after baking vs. 3 days later (the same loaves are used on day one and 3 days later). Comparing vitamin content of bread immediately after baking vs. 3 days later (tests made on independent loaves). Average fuel efficiency for 2005 vehicles is 21 miles per gallon. Is average fuel efficiency higher in the new generation “green vehicles”? Is blood pressure altered by use of an oral contraceptive? Comparing a group of women not using an oral contraceptive with a group taking it. Review insurance records for dollar amount paid after fire damage in houses equipped with a fire extinguisher vs. houses without one. Was there a difference in the average dollar amount paid? HW:Exs. 7.15-7.21 (Exercises, 7.1). HW: 7.54-7.57, 7.61-7.64, 7.69-7.71 & 7.81 (Software), 7.85