Presentation is loading. Please wait.

Presentation is loading. Please wait.

1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 1 Chapter 24 Comparing Means.

Similar presentations


Presentation on theme: "1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 1 Chapter 24 Comparing Means."— Presentation transcript:

1 1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 1 Chapter 24 Comparing Means

2 1-2 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 2 Chapter 24 Introduction Should you buy name brand or store brand? If you’re stuck on the name brand, do Energizer batteries last longer than Duracell or is there no discernable difference between the two? Nike running shoes or New Balance???? What do you estimate the difference in their average life- spans are????? That is the real question. Inference with two means will help us answer these life questions.

3 1-3 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 3 Question With this material, we will have two sets of data and we will be comparing them. What is a really good way to compare two sets of data quickly?

4 1-4 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 4 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: This will be utilized while checking conditions.

5 1-5 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 5 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. As a matter of fact, by combining your knowledge of comparing two proportions and inference with means, you already know how to do it. This time the parameter of interest is the difference between the two means, μ 1 – μ 2.

6 1-6 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 6 Let’s see if that’s correct… What can you tell me about the following aspects of this form of inference? The standard error of the distribution. The distribution we will use. The conditions. The skeleton of the confidence interval. What the hypotheses will look like. What the model will look like for each form.

7 1-7 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 7 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

8 1-8 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 8 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. The d.f. is more difficult to calculate here, so we will just let the calculator do it.

9 1-9 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 9 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

10 1-10 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 10 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: Same ol’ same ol’.

11 1-11 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 11 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…) We should be able to figure this out: what do you think we do if they’re not independent???

12 1-12 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 12 Degrees of Freedom The special formula for the degrees of freedom for our t critical value is a beast: Because of this, we will let technology calculate degrees of freedom for us!

13 1-13 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 13 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, μ 1 – μ 2. The confidence interval is where the standard error of the difference of the means is The critical value t* df 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.

14 1-14 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 14 WHAT TOO RIGHT ID Groups. Verify the four conditions. State then that you can use a t-model with a mean of Ybar1 – Ybar2, a SE of, and d.f. of __ to create a 2-Sample t- interval. Write = ( #, # ), using the “2-SampTInt” function in the calculator to construct the actual confidence interval. State the conclusion in context of the problem, emphasizing the estimate of the difference in the true means.

15 1-15 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 15 Teaching Tip Hopefully two things are obvious: The previous formula is not meant to be done by hand, ever! It is time to let the calculator do its thing. Students need to run these procedures on a calculator. Yes, that means there will a t* that they will never be able to fill in when they write down the interval formula. But that’s OK!

16 1-16 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 16 Testing the Difference Between Two Means The hypothesis test we use is the two-sample t- test for 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.

17 1-17 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 17 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.

18 1-18 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 18 What to Write ID Groups. Give hypotheses. Verify the four conditions. State that you can use the t-Model with a mean of 0 and a standard error of to perform a 2-Sample t-test. Draw a t-model with a mean of 0, a statistic of Ybar1 – Ybar2, and the shaded region. Use the calculator to perform the testing and give the t-score of the statistic and its P-value. State the conclusion exactly as the 1-Sample t-test, emphasizing the difference in the true means.

19 1-19 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 19 Example A man who moves to a new city sees that there are two routes he could take to work. An old man who has lived there a while says Route A will average 5 minutes longer than Route B. Dubious, the man does an experiment. He flips a coin each day to decide which route he will take, and then drives each route 20 times, recording the results. He finds Route A to take an average of 40 minutes with a s.d. of 3 minutes while Route B takes an average of 43 minutes with a s.d. of 2 minutes. He examines the histograms of each set of data, determining each to be somewhat symmetric with no outliers. (a) Find a 95% confidence interval for the difference in commute times. (b) Should the man believe the old man’s statement??? (c) Perform hypothesis testing to determine if there is enough evidence to suggest that Route A is indeed longer than Route B.

20 1-20 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 20 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.

21 1-21 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 21 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…

22 1-22 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 22 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).

23 1-23 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 23 *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.

24 1-24 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 24 *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 additional 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

25 1-25 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 25 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.

26 1-26 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 26 Teaching Tip As you just read, it is never wrong to not pool. So you may very well decide to skip the slides about pooling (and the next two slides) and simply focus on what student’s will actually do. The pooled assumption is important for ANOVA, which is a post-AP topic.

27 1-27 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 27 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.

28 1-28 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 28 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.

29 1-29 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 29 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. Look at the plots. Check for outliers and non-normal distributions by making and examining boxplots.

30 1-30 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 30 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. Once again, we’ve see new can add variances. The reasoning of statistical inference remains the same; only the mechanics change.

31 1-31 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 31 AP Tips You guessed it! Check your conditions! This includes Drawing TWO graphs (for small samples) Independent groups Random sample(s) As you may not be writing the full formulas, you should be writing the NAME of the procedure. 2-sample t-test/interval If you write the formula, watch your symbols carefully!


Download ppt "1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 1 Chapter 24 Comparing Means."

Similar presentations


Ads by Google