Copyright © 2009 Pearson Education, Inc. Chapter 24 Comparing Means.

Slides:



Advertisements
Similar presentations
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 21, Slide 1 Chapter 21 Comparing Two Proportions.
Advertisements

One sample T Interval Example: speeding 90% confidence interval n=23 Check conditions Model: t n-1 Confidence interval: 31.0±1.52 = (29.48, 32.52) STAT.
Chapter 14 Comparing two groups Dr Richard Bußmann.
Confidence Interval and Hypothesis Testing for:
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Copyright © 2010 Pearson Education, Inc. Chapter 25 Paired Samples and Blocks.
Copyright © 2010 Pearson Education, Inc. Chapter 24 Comparing Means.
Objective: To test claims about inferences for two sample means, under specific conditions.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 8 Tests of Hypotheses Based on a Single Sample.
Chapter 24: Comparing Means.
Copyright © 2010 Pearson Education, Inc. Chapter 22 Comparing Two Proportions.
Copyright © 2010 Pearson Education, Inc. Slide
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 1 Chapter 23 Comparing Means.
Comparing Two Proportions
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 24 Comparing Means.
Copyright © 2009 Pearson Education, Inc. Chapter 23 Inferences About Means.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 24, Slide 1 Chapter 24 Paired Samples and Blocks.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 24 Comparing Means.
Chapter 22: Comparing Two Proportions
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Hypotheses tests for means
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 20 Testing Hypotheses About Proportions.
Copyright © 2010 Pearson Education, Inc. Slide Beware: Lots of hidden slides!
Copyright © 2010 Pearson Education, Inc. Chapter 22 Comparing Two Proportions.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 22 Comparing Two Proportions.
Lesson Comparing Two Means. Knowledge Objectives Describe the three conditions necessary for doing inference involving two population means. Clarify.
STA 2023 Module 11 Inferences for Two Population Means.
Copyright © 2010 Pearson Education, Inc. Slide
AP Statistics Chapter 24 Comparing Means.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 24 Comparing Means.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 24, Slide 1 Chapter 25 Paired Samples and Blocks.
Comparing Means Chapter 24. Plot the Data The natural display for comparing two groups is boxplots of the data for the two groups, placed side-by-side.
Chapter 22 Comparing Two Proportions.  Comparisons between two percentages are much more common than questions about isolated percentages.  We often.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide Next Time: Make sure to cover only pooling in TI-84 and note.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 1 Chapter 24 Comparing Means.
AP STATISTICS COMPARING TWO PROPORTIONS Chapter 22.
Statistics 24 Comparing Means. Plot the Data The natural display for comparing two groups is boxplots of the data for the two groups, placed side-by-side.
Copyright © 2009 Pearson Education, Inc. Chapter 22 Comparing Two Proportions.
Statistics 22 Comparing Two Proportions. Comparisons between two percentages are much more common than questions about isolated percentages. And they.
AP Statistics Chapter 24 Comparing Means. Objectives: Two-sample t methods Two-Sample t Interval for the Difference Between Means Two-Sample t Test for.
Copyright © 2009 Pearson Education, Inc. Chapter 25 Paired Samples and Blocks.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Chapters 22, 24, 25 Inference for Two-Samples. Confidence Intervals for 2 Proportions.
The Practice of Statistics, 5 th Edition1 Check your pulse! Count your pulse for 15 seconds. Multiply by 4 to get your pulse rate for a minute. Write that.
Chapter 24 Comparing Means Copyright © 2009 Pearson Education, Inc.
Confidence Intervals for Proportions
Comparing Two Proportions
Chapter 24 Comparing Means.
AP Statistics Chapter 24 Comparing Means.
Chapter 23 Comparing Means.
Chapter 23 Comparing Means.
Testing Hypotheses about Proportions
Paired Samples and Blocks
Testing Hypotheses About Proportions
Confidence Intervals for Proportions
Comparing Two Proportions
Hypothesis tests for the difference between two means: Independent samples Section 11.1.
Testing Hypotheses about Proportions
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Chapter 23 Comparing Means.
STATISTICS INFORMED DECISIONS USING DATA
Lesson Comparing Two Means.
Comparing Two Proportions
Confidence intervals for the difference between two means: Independent samples Section 10.1.
Testing Hypotheses About Proportions
Paired Samples and Blocks
Chapter 24 Comparing Means Copyright © 2009 Pearson Education, Inc.
Presentation transcript:

Copyright © 2009 Pearson Education, Inc. Chapter 24 Comparing Means

Copyright © 2009 Pearson Education, Inc. Slide 1- 3Slide NOTE on slides / What we can and cannot do The following notice accompanies these slides, which have been downloaded from the publisher’s Web site: “This work is protected by United States copyright laws and is provided solely for the use of instructors in teaching their courses and assessing student learning. Dissemination or sale of any part of this work (including on the World Wide Web) will destroy the integrity of the work and is not permitted. The work and materials from this site should never be made available to students except by instructors using the accompanying text in their classes. All recipients of this work are expected to abide by these restrictions and to honor the intended pedagogical purposes and the needs of other instructors who rely on these materials.” We can use these slides because we are using the text for this course. I cannot give you the actual slides, but I can you the handout. Please help us stay legal. Do not distribute even the handouts on these slides any further. The original slides are done in orange / brown and black. My additions are in red and blue.

Copyright © 2009 Pearson Education, Inc. Slide 1- 4Slide Main topics of this chapter In this chapter, we study the sampling difference for the difference between two means. Two-sample t-test Two-sample t-interval Assumptions and conditions Equality of variances

Copyright © 2009 Pearson Education, Inc. Division of Mathematics, HCC Course Objectives for Chapter 24 After studying this chapter, the student will be able to: 64. Perform a two-sample t-test for two population means, to include:  writing appropriate hypotheses,  checking the necessary assumptions and conditions,  drawing an appropriate diagram,  computing the P-value,  making a decision, and  Interpreting the results in the context of the problem. 65. Find a t-based confidence interval for the difference between two population means, to include: Finding the t that corresponds to the percent Computing the interval Interpreting the interval in context.

Copyright © 2009 Pearson Education, Inc. Slide 1- 6Slide Let’s start with an example A student was curious about whether generic or brand-named batteries performed better in a CD player. He randomly selected six of each type of battery. NOTE: He went to different stores since batteries that are shipped together have more of a tendency to fail together. He tested them on the same CD player to see how long they would run with continuous play.

Copyright © 2009 Pearson Education, Inc. Let’s start with an example The six generic batteries ran for an average of 206 minutes with a standard deviation of 10.3 minutes. The six name-brand batteries ran for an average of minutes and a standard deviation of 14.6 minutes. Note: Data are included in the 3 rd edition, but not the first two. Brand NameGeneric Slide 1- 7

Copyright © 2009 Pearson Education, Inc. Slide 1- 8

Copyright © 2009 Pearson Education, Inc. Slide 1- 9Slide The W’s Who: Name brand and generic batteries What: Difference in Battery Life Why: To estimate the true mean difference in the battery life of generic and name-brand batteries When: Recently (doesn’t say) Where: Doesn’t say How: Purchased in stores around town.

Copyright © 2009 Pearson Education, Inc. Slide Plot the Data The natural display for comparing two groups is boxplots of the data for the two groups, placed side- by-side. For example: Recall: We did this in Chapter 5.

Copyright © 2009 Pearson Education, Inc. Recall – Comparing two boxplots Slide 1- 11

Copyright © 2009 Pearson Education, Inc. Slide 1- 12

Copyright © 2009 Pearson Education, Inc. Slide 1- 13

Copyright © 2009 Pearson Education, Inc. Slide Comparing Two Means Once we have examined the side-by-side boxplots, we can turn to the comparison of two means. Comparing two means is not very different from comparing two proportions. This time the parameter of interest is the difference between the two means,  1 –  2.

Copyright © 2009 Pearson Education, Inc. Slide Comparing Two Means (cont.) Remember that, for independent random quantities, variances add. So, the standard deviation of the difference between two sample means is We still don’t know the true standard deviations of the two groups, so we need to estimate and use the standard error

Copyright © 2009 Pearson Education, Inc. Slide Comparing Two Means (cont.) Because we are working with means and estimating the standard error of their difference using the data, we shouldn’t be surprised that the sampling model is a Student’s t. The confidence interval we build is called a two-sample t-interval (for the difference in means). The corresponding hypothesis test is called a two-sample t-test.

Copyright © 2009 Pearson Education, Inc. Slide Sampling Distribution for the Difference Between Two Means When the conditions are met, the standardized sample difference between the means of two independent groups can be modeled by a Student’s t-model with a number of degrees of freedom found with a special formula. We estimate the standard error with

Copyright © 2009 Pearson Education, Inc. Slide Assumptions and Conditions Independence Assumption (Each condition needs to be checked for both groups.): Randomization Condition: Were the data collected with suitable randomization (representative random samples or a randomized experiment)? 10% Condition: We don’t usually check this condition for differences of means. We will check it for means only if we have a very small population or an extremely large sample. However, my view is that this condition should be checked. Otherwise, what do we mean by a “small population” or a “large sample”? I think that the authors are saying that this condition is either obviously satisfied or obviously not satisfied!

Copyright © 2009 Pearson Education, Inc. Slide Assumptions and Conditions (cont.) Normal Population Assumption: Nearly Normal Condition: This must be checked for both groups. A violation by either one violates the condition. Independent Groups Assumption: The two groups we are comparing must be independent of each other. (See Chapter 25 if the groups are not independent of one another…)

Copyright © 2009 Pearson Education, Inc. Slide 1- 20Slide For the battery example Randomization: Batteries were selected randomly. Hopefully the student sampled from different cartons – preferably even at different stores. We’ll assume that this is so. Independent Groups: The batteries were made by two different companies. Nearly Normal Condition: Hard to tell because of small samples. We’ll give it to them for now. 10% condition: Obvious.

Copyright © 2009 Pearson Education, Inc. Slide Two-Sample t-Interval When the conditions are met, we are ready to find the confidence interval for the difference between means of two independent groups. The confidence interval is where the standard error of the difference of the means is The critical value depends on the particular confidence level, C, that you specify and on the number of degrees of freedom, which we get from the sample sizes and a special formula.

Copyright © 2009 Pearson Education, Inc. Slide Degrees of Freedom The special formula for the degrees of freedom for our t critical value is a bear: Because of this, we will let technology calculate degrees of freedom for us!

Copyright © 2009 Pearson Education, Inc. Slide 1- 23

Copyright © 2009 Pearson Education, Inc. Slide 1- 24Slide Just for the record --- The “bear” is actually called the Satterwaithe approximation to the degrees of freedom. The “Satterwaithe approximation”, rather than the “bear”, is the accepted statistical terminology But “bear” is easier to spell than Satterwaithe!

Copyright © 2009 Pearson Education, Inc. Slide 1- 25Slide WOW!!! The problem is that the variances are not the same. We have to make some assumption about what the combined variances will look like. There are two ways out of this. One way is to assume that the variances are the same (and sometimes we can.) The other is to “pool” variances. Or we can “hug the bear”! We’ll come back to this. But let’s pursue our example and hug the bear for now.

Copyright © 2009 Pearson Education, Inc. Slide 1- 26Slide For our battery example You can plug the numbers into the formulas on the last slides - including the bear! But there is a lot of room for miscalculation – Forgetting to square the variances in the SE Forgetting to take the square root in the SE Doing a number of things in the “bear” And who knows what else! Take my word for it! Let technology do the work on this one!

Copyright © 2009 Pearson Education, Inc. Slight problem with StatCrunch We cannot do the exercise using the worksheet that the publisher provided. I retyped the data as shown in the next slide. Slide 1- 27

Copyright © 2009 Pearson Education, Inc. Slide 1- 28

Copyright © 2009 Pearson Education, Inc. Slide Testing the Difference Between Two Means The hypothesis test we use is the two-sample t- test for the difference between means. The conditions for the two-sample t-test for the difference between the means of two independent groups are the same as for the two- sample t-interval.

Copyright © 2009 Pearson Education, Inc. Slide A Test for the Difference Between Two Means We test the hypothesis H 0 :  1 –  2 =  0, where the hypothesized difference,  0, is almost always 0, using the statistic The standard error is When the conditions are met and the null hypothesis is true, this statistic can be closely modeled by a Student’s t-model with a number of degrees of freedom given by a special formula. We use that model to obtain a P-value.

Copyright © 2009 Pearson Education, Inc. Slide 1- 31Slide For our battery example – StatCrunch Select Stat, then, then t-statistics, then 2- sample, then “with data”. We have the data. However, if you have summary statistics, enter them as requested – don’t mix anything up! Select Confidence Interval (95%) or Hypothesis Test, 0 and ≠ Then Calculate.

Copyright © 2009 Pearson Education, Inc. Slide 1- 32

Copyright © 2009 Pearson Education, Inc. Intermediate steps (without pooling) Slide 1- 33

Copyright © 2009 Pearson Education, Inc. Confidence IntervalHypothesis Test Slide 1- 34

Copyright © 2009 Pearson Education, Inc. Slide Difference Sample Mean Std. Err.DFL. LimitU. Limit μ 1 - μ % confidence interval results: μ 1 : mean of Brand Name μ 2 : mean of Generic μ 1 - μ 2 : mean difference (without pooled variances)

Copyright © 2009 Pearson Education, Inc. Slide Difference Sample Mean Std. Err.DFT-StatP-value μ 1 - μ Hypothesis test results: μ 1 : mean of Brand Name μ 2 : mean of Generic μ 1 - μ 2 : mean difference H 0 : μ 1 - μ 2 = 0 H A : μ 1 - μ 2 ≠ 0 (without pooled variances)

Copyright © 2009 Pearson Education, Inc. Slide 1- 37Slide For our battery example - TI There is minor disagreement in the answer with StatCrunch Press STAT, tab to Tests, then (on the 84) go to (0) – 2SampTInt Select Stats. Then enter the summary statistics as requested – again, don’t mix anything up (it’s not that hard to mix stuff up!)

Copyright © 2009 Pearson Education, Inc. Select C-level.95, and say NO to Pool. The TI gives (2.0958, ). StatCrunch gave (2.069, ). Very slight difference, most likely rounding and slight difference in df (again, rounding). Both used the bear! Slide For our battery example - TI The Bear: TI: SC:

Copyright © 2009 Pearson Education, Inc. Slide 1- 39Slide Battery example – with the TI (84+) Start over: Select STAT, tab to Tests, then select “2SampTtest”. Input data as before (it may already be there from your prior calculation) Pooled – NO; Alternative: Unequal, then Calculate

Copyright © 2009 Pearson Education, Inc. Results of pooling. Degrees of freedom are different (10, or the sum of the sample sizes minus two). Confidence Interval is (6.83, 25.1) Hypothesis test: p –value = See next two slides. Slide 1- 40

Copyright © 2009 Pearson Education, Inc. Slide Difference Sample Mean Std. Err.DFL. LimitU. Limit μ 1 - μ % confidence interval results: μ 1 : mean of Times μ 2 : mean of Brand Name μ 1 - μ 2 : mean difference (with pooled variances)

Copyright © 2009 Pearson Education, Inc. Slide Difference Sample Mean Std. Err.DFT-StatP-value μ 1 - μ Hypothesis test results: μ 1 : mean of Brand Name μ 2 : mean of Generic μ 1 - μ 2 : mean difference H 0 : μ 1 - μ 2 = 0 H A : μ 1 - μ 2 ≠ 0 (without pooled variances)

Copyright © 2009 Pearson Education, Inc. Slide Difference Sample Mean Std. Err.DFT-StatP-value μ 1 - μ Hypothesis test results: μ 1 : mean of Brand Name μ 2 : mean of Generic μ 1 - μ 2 : mean difference H 0 : μ 1 - μ 2 = 0 H A : μ 1 - μ 2 ≠ 0 (with pooled variances)

Copyright © 2009 Pearson Education, Inc. Slide 1- 44

Copyright © 2009 Pearson Education, Inc. Slide 1- 45Slide Battery example – with the TI (84+) Start over: Select STAT, tab to Tests, then select “2SampTtest”. Input data as before (it may already be there from your prior calculation) Pooled – NO; Alternative: Unequal, then Calculate

Copyright © 2009 Pearson Education, Inc. Slide 1- 46Slide Conclusions in context Important to note: The confidence interval does not include 0. This leads one to conclude (no pooling) “We can say with 95% confidence that, based on our sample of six batteries of each type, the interval for the difference in mean life batteries is from 2.1 to 35.1.“ “If the batteries had the same life, we would have a result this extreme or more 3.1% (p = 0.031) of the time. At α = 0.05, there is sufficient evidence to reject the hypothesis of no difference in battery life.”

Copyright © 2009 Pearson Education, Inc. **2 sample t-test with EXCEL One way : T.TEST(array1,array2,tails,pool) Pool = 2 if pooling Pool = 3 if no pooling (recommended) See next slide Another way: Use the Data Analysis toolpak Select 2-sample t (unequal variances) See 2 nd through 4 th slides after this one EXCEL does not do the confidence interval. Slide 1- 47

Copyright © 2009 Pearson Education, Inc. Slide 1- 48

Copyright © 2009 Pearson Education, Inc. Slide 1- 49

Copyright © 2009 Pearson Education, Inc. Slide 1- 50

Copyright © 2009 Pearson Education, Inc. Slide 1- 51

Copyright © 2009 Pearson Education, Inc. Slide Back Into the Pool Remember that when we know a proportion, we know its standard deviation. Thus, when testing the null hypothesis that two proportions were equal, we could assume their variances were equal as well. This led us to pool our data for the hypothesis test.

Copyright © 2009 Pearson Education, Inc. Slide Back Into the Pool (cont.) For means, there is also a pooled t-test. Like the two-proportions z-test, this test assumes that the variances in the two groups are equal. But, be careful, there is no link between a mean and its standard deviation…

Copyright © 2009 Pearson Education, Inc. Slide Back Into the Pool (cont.) If we are willing to assume that the variances of two means are equal, we can pool the data from two groups to estimate the common variance and make the degrees of freedom formula much simpler. We are still estimating the pooled standard deviation from the data, so we use Student’s t-model, and the test is called a pooled t-test (for the difference between means).

Copyright © 2009 Pearson Education, Inc. Slide *The Pooled t-Test If we assume that the variances are equal, we can estimate the common variance from the numbers we already have: Substituting into our standard error formula, we get: Our degrees of freedom are now df = n 1 + n 2 – 2.

Copyright © 2009 Pearson Education, Inc. Slide *The Pooled t-Test and Confidence Interval for Means The conditions for the pooled t-test and corresponding confidence interval are the same as for our earlier two- sample t procedures, with the assumption that the variances of the two groups are the same. For the hypothesis test, our test statistic is which has df = n 1 + n 2 – 2. Our confidence interval is

Copyright © 2009 Pearson Education, Inc. Slide Is the Pool All Wet? So, when should you use pooled-t methods rather than two-sample t methods? Never. (Well, hardly ever.) Because the advantages of pooling are small, and you are allowed to pool only rarely (when the equal variance assumption is met), don’t. It’s never wrong not to pool.

Copyright © 2009 Pearson Education, Inc. Slide Why Not Test the Assumption That the Variances Are Equal? There is a hypothesis test that would do this. But, it is very sensitive to failures of the assumptions and works poorly for small sample sizes—just the situation in which we might care about a difference in the methods. So, the test does not work when we would need it to. I’ll tell you what it is, though.

Copyright © 2009 Pearson Education, Inc. Slide 1- 59Slide *Testing for equal variances Suppose you have two samples with summary statistics (n 1, 1,s 1 ) and (n 2, 2, s 2 ). She 1 subscript is supposed to be the larger variance, but the technology will rearrange. Both the TI and StatCrunch use the F-Test. (We use another at FDA; “Levene’s Test”). Compute the ratio of (s 1 2 /n 1 ) to (s 2 2 /n 2 ). (Here the n’s are the same.) We get p = with both the TI and StatCrunch; p = with MINITAB; they use a correction (Bonferroni) The variances are the same!

Copyright © 2009 Pearson Education, Inc. *Testing for equal variances (TI) [STATS],Tests,(E) - 2SampFTest Enter data as shown – group variances and sample size. See result P = Variances are the same. Slide 1- 60

Copyright © 2009 Pearson Education, Inc. Slide Is There Ever a Time When Assuming Equal Variances Makes Sense? Yes. In a randomized comparative experiment, we start by assigning our experimental units to treatments at random. Each treatment group therefore begins with the same population variance. In this case assuming the variances are equal is still an assumption, and there are conditions that need to be checked, but at least it’s a plausible assumption.

Copyright © 2009 Pearson Education, Inc. Slide What Can Go Wrong? Watch out for paired data. The Independent Groups Assumption deserves special attention. If the samples are not independent, you can’t use two-sample methods. This is why we need Chapter 25! Look at the plots. Check for outliers and non-normal distributions by making and examining boxplots.

Copyright © 2009 Pearson Education, Inc. Slide What have we learned? We’ve learned to use statistical inference to compare the means of two independent groups. We use t-models for the methods in this chapter. It is still important to check conditions to see if our assumptions are reasonable. The standard error for the difference in sample means depends on believing that our data come from independent groups, but pooling is not the best choice here. The reasoning of statistical inference remains the same; only the mechanics change.

Copyright © 2009 Pearson Education, Inc. Slide Slide Main topics of this chapter In this chapter, we study the sampling difference for the difference between two means. Two-sample t-test Two-sample t-interval Assumptions and conditions Equality of Variances (thrown in!)

Copyright © 2009 Pearson Education, Inc. Division of Mathematics, HCC Course Objectives for Chapter 24 After studying this chapter, the student will be able to: 64. Perform a two-sample t-test for two population means, to include:  writing appropriate hypotheses,  checking the necessary assumptions and conditions,  drawing an appropriate diagram,  computing the P-value,  making a decision, and  Interpreting the results in the context of the problem. 65. Find a t-based confidence interval for the difference between two population means, to include: Finding the t that corresponds to the percent Computing the interval Interpreting the interval in context.