Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Copyright © 2009 Pearson Education, Inc. Chapter 25 Paired Samples and Blocks."— Presentation transcript:

1

2 Copyright © 2009 Pearson Education, Inc. Chapter 25 Paired Samples and Blocks

3 Copyright © 2009 Pearson Education, Inc. Slide 1- 3Slide 24- 3 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 e-mail 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.

4 Copyright © 2009 Pearson Education, Inc. Topics in this chapter Paired data Paired t-test Paired Confidence Interval Comparison with independent t-test Slide 1- 4

5 Copyright © 2009 Pearson Education, Inc. Division of Mathematics, HCC Course Objectives for Chapter 25 After studying this chapter, the student will be able to: 66. Find a paired confidence interval, to include: Finding the t that corresponds to the percent Computing the interval Interpreting the interval in context. 67. Perform a paired t-test, 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. Also, be sensitive to data entry errors and the consequences of doing the incorrect analysis!

6 Copyright © 2009 Pearson Education, Inc. Did I deserve that ticket? The Royal Canadian Mounted Police have set up radar along a stretch of the Trans-Canada highway with a speed limit of 100 km/hr. They have awarded many speeding citations. Several of the cited motorists drive straight to the local RCMP detachment to protest their citations. “My speedometer said 115 km/hr, but the constable said I was doing 133.” “I wasn’t even speeding. I was driving at exactly 100 and I was cited for 116.” Slide 1- 6

7 Copyright © 2009 Pearson Education, Inc. What happens next? The beleaguered Superintendent checks the records for the radar unit that had been checked out for that location. There was no record that it had been calibrated. The Superintendent agrees to perform a statistical analysis to see if the calibrated radar would have given a lesser speed. If the difference is statistically significant at the 0.05 alpha level, all speeding citations awarded that day at that location will be voided. If not, the citations will stand as written. Slide 1- 7

8 Copyright © 2009 Pearson Education, Inc. How the super takes the samples This detachment has 75 patrol cars assigned to it. The Superintendent randomly selects six of these cars. The particular radar unit is called in. A constable drives each of the six cars along an RCMP training course at varying speeds and is checked by the uncalibrated radar. She is not given the results. Then the radar is calibrated and the same constable repeats the process with the same patrol cars at exactly the same speeds as given by the car’s speedometer. The data are tabulated. Slide 1- 8

9 Copyright © 2009 Pearson Education, Inc. The Data (Patrol Cars 1 through 6) Speed (km/hr) uncalibrated Speed (km/hr) calibrated 130114 124116 115108 109104 10299 9697 Slide 1- 9

10 Copyright © 2009 Pearson Education, Inc. Two sample t-test? Are the groups independent? They cannot be – the same six patrol cars are used. The two-sample t-test cannot be used. But remember – the Superintendent is interested in the difference of the readings. Slide 1- 10

11 Copyright © 2009 Pearson Education, Inc. The Data Speed (km/hr) uncalibrated Speed (km/hr) calibrated Difference 13011416 1241168 1151087 1091045 102993 9697 Slide 1- 11 Is there a test we can do on the differences of the readings?

12 Copyright © 2009 Pearson Education, Inc. The Real Data Speed (km/hr) uncalibrated Speed (km/hr) calibrated Difference These data16 are no longer8 of interest.7 5 3 Slide 1- 12 Is there a test we can do on the differences of the readings?

13 Copyright © 2009 Pearson Education, Inc. What are we testing? We want to see if the difference is greater than 0? We are paring “Before” with “After”. D = Before calibration – After Calibration Ho: μ D = 0 Ha: μ D > 0 We have removed the variability that is no longer of interest to us. Slide 1- 13

14 Copyright © 2009 Pearson Education, Inc. The one-sample t-test to the rescue? Check conditions on the differences. Randomization? Yes – the Superintendent took a random sample. 10% condition: 6 is less than 10% of the 75 patrol card assigned to the detachment. Nearly Normal? Here is a normal probability plot: The test is a go. Slide 1- 14

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

16 Copyright © 2009 Pearson Education, Inc. Conclusion in context p = 0.021. If there were no difference in the speeds, we have a result this extreme or more 0.021 of the time. Reject the null hypothesis of no difference. A harried and embarrassed Superintendent voids all citations awarded that day based on that particular radar unit. Slide 1- 16

17 Copyright © 2009 Pearson Education, Inc. **Paired t-test using EXCEL One way: TTEST(array1,array2,tails,1) where the 1 indicates a paired test See results nest slide. Other-way: Data Analysis Tool-pak Select Paired t-test See results 2 nd – 4 th slides Slide 1- 17

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

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

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

21 Copyright © 2009 Pearson Education, Inc. Paired Data – Another Example Slide 1- 21 In Olympic speed skating, skaters are paired off. They start on either the outside or the inside lane. Halfway through the distance, they cross over. Therefore, each skater skates the same distance outside and inside. Is this fair? In the 2006 Olympics, some fans thought that in the 1500 meter women’s ice skating event, starting on the outside provided an advantage. Can we find out?

22 Copyright © 2009 Pearson Education, Inc. Paired Data – Speed Skating The data are not likely to be independent for several reasons. They involve nature of opponent, time of day, icy conditions, etc. We therefore cannot use the two-sample techniques from Chapter 24. However, race-to-race variation is of no concern to us. It might even obscure what we are trying to answer. Slide 1- 22

23 Copyright © 2009 Pearson Education, Inc. What to test In this case, the outer lane advantage means completing the race in a shorter time. Therefore, let D = Inner – Outer Ho: μ D = 0 Ha: μ D > 0 Slide 1- 23

24 Copyright © 2009 Pearson Education, Inc. Change in the text’s example There will be a change in the first example in the text. That one has to do with a Olympic speed skating race. But they got the data incorrect – pages 650 and 652 do not agree. I was never able to find the correct 2006 data set. We will use the dataset in StatCrunch, which corresponds to the one on page 650. Slide 1- 24

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

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

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

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

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

30 Copyright © 2009 Pearson Education, Inc. Conclusion in context p = 0.0424. If the Outer Lane does not provide an advantage, we have a result this extreme or more 0.0424 (4.24%) of the time. At the 0.05 alpha level, we reject the null hypothesis. Slide 1- 30

31 Copyright © 2009 Pearson Education, Inc. Post script In 2010, the rules changed. Instead of changing lanes halfway through the race, they changed at the same point on every lap. Note: If we have the differences, we could do a one-sample t-test. Slide 1- 31

32 Copyright © 2009 Pearson Education, Inc. Slide 1- 32 Difference Sample Diff. Std. Err.DFT-StatP-value I time - O time 1.22470590.6664111161.83776330.0424 Hypothesis test results: μ 1 - μ 2 : mean of the paired difference between I time and O time H 0 : μ 1 - μ 2 = 0 H A : μ 1 - μ 2 > 0 Variable Sample Mean Std. Err.DFT-StatP-value Differences1.22470590.6664111161.83776330.0424 Hypothesis test results: μ : mean of Variable H 0 : μ = 0 H A : μ > 0 One sample t-test on The differences.

33 Copyright © 2009 Pearson Education, Inc. How I found the error The authors supplied a MINITAB dataset that reflected page 650. I did the computations and got summary statistics for the time differences that disagreed with page 656. Something was amiss! The tables on page 650 and 652 do not match. We can see this plainly! The video (which was done before this 3 rd edition) agreed with page 652. The 2006 Olympic site was inconclusive – it did not say who raced who! Slide 1- 33

34 Copyright © 2009 Pearson Education, Inc. Paired Data – Assumptions & Conditions (on the differences; not the data) Independence: Even though the times of the skaters may not be independent, the time differences from one race are not likely to affect the time differences of another. Randomization: Skaters were assigned to start in the outer and inner lanes randomly. Had the best qualifiers all been assigned to the outer (or inner) lane, this would have been a confounding variable. Normal: We can look at a histogram or a normal probability plot if we have the raw data (we will on the next slide). If we have only the summary statistics (N, mean, stdev), this is virtually impossible to do. We can already do the one-sample t-test. But let’s look in general at what we did. Slide 1- 34

35 Copyright © 2009 Pearson Education, Inc. Slide 1- 35 Paired Data Data are paired when the observations are collected in pairs or the observations in one group are naturally related to observations in the other group. Paired data arise in a number of ways. Perhaps the most common is to compare subjects with themselves before and after a treatment. When pairs arise from an experiment, the pairing is a type of blocking. When they arise from an observational study, it is a form of matching.

36 Copyright © 2009 Pearson Education, Inc. Slide 1- 36 Paired Data (cont.) If you know the data are paired, you can (and must!) take advantage of it. To decide if the data are paired, consider how they were collected and what they mean (check the W’s). There is no test to determine whether the data are paired. Once we know the data are paired, we can examine the pairwise differences. Because it is the differences we care about, we treat them as if they were the data and ignore the original two sets of data.

37 Copyright © 2009 Pearson Education, Inc. Slide 1- 37 Paired Data (cont.) Now that we have only one set of data to consider, we can return to the simple one-sample t-test. Mechanically, a paired t-test is just a one-sample t-test for the mean of the pairwise differences. The sample size is the number of pairs.

38 Copyright © 2009 Pearson Education, Inc. Slide 1- 38 Assumptions and Conditions Paired Data Assumption: Paired data Assumption: The data must be paired. Normal Population Assumption: We need to assume that the population of differences follows a Normal model. Nearly Normal Condition: Check this with a histogram or Normal probability plot of the differences.

39 Copyright © 2009 Pearson Education, Inc. Slide 1- 39 Assumptions and Conditions Independence Assumption: Independence Assumption: The differences must be independent of each other. Randomization Condition: Randomness can arise in many ways. What we want to know usually focuses our attention on where the randomness should be. 10% Condition: When a sample is obviously small, we may not explicitly check this condition. (Same comment as Chapter 24 – Check it anyway!)

40 Copyright © 2009 Pearson Education, Inc. Slide 1- 40 A Paired t-Test When the conditions are met, we are ready to test whether the paired differences differ significantly from zero. We test the hypothesis H 0 :  d =  0, where the d’s are the pairwise differences and  0 is almost always 0. The paired t-test

41 Copyright © 2009 Pearson Education, Inc. Slide 1- 41 We use the statistic where is the mean of the pairwise differences and n is the number of pairs. is the ordinary standard error for the mean applied to the differences. When the conditions are met and the null hypothesis is true, this statistic follows a Student’s t-model with n – 1 degrees of freedom, so we can use that model to obtain a P-value. A Paired t-Test (cont.) The paired t-test

42 Copyright © 2009 Pearson Education, Inc. Slide 1- 42 When the conditions are met, we are ready to find the confidence interval for the mean of the paired differences. The confidence interval is where the standard error of the mean difference is The critical value t* depends on the particular confidence level, C, that you specify and on the degrees of freedom, n – 1, which is based on the number of pairs, n. Confidence Intervals for Matched Pairs Paired t-interval

43 Copyright © 2009 Pearson Education, Inc. Confidence Intervals for Matched Pairs Speeding citations – using Technology With the TI, [STAT], Tests, T-interval. The data should be there from the test done earlier. Slide 1- 43

44 Copyright © 2009 Pearson Education, Inc. Confidence Intervals for Matched Pairs The confidence interval from either technology is 0.335,12.331). We are 95% confident that the true mean difference between sped as clocked by uncalibrated and calibrated radar is between 0.335 and 12.331 km / hr. Note that the interval does not contain 0. This is consistent with the test. Slide 1- 44

45 Copyright © 2009 Pearson Education, Inc. Slide 1- 45 Blocking Consider estimating the mean difference in age between husbands and wives. The following display is worthless. It does no good to compare all the wives as a group with all the husbands—we care about the paired differences.

46 Copyright © 2009 Pearson Education, Inc. Slide 1- 46 Blocking (cont.) In this case, we have paired data—each husband is paired with his respective wife. The display we are interested in is the difference in ages:

47 Copyright © 2009 Pearson Education, Inc. Slide 1- 47 Blocking (cont.) Pairing removes the extra variation that we saw in the side-by-side boxplots and allows us to concentrate on the variation associated with the difference in age for each pair. A paired design is an example of blocking.

48 Copyright © 2009 Pearson Education, Inc. An Example – Physical Fitness Resting Pulse Rate Ten men test an exercise device. Their resting pulse rates are measured before and after using the device. Is there a difference between the before and the after? Source: Intro Stats Instructor’s Guide SubjectBeforeAfter Alan73 Bill8379 Chuck8581 Dave8786 Ed9187 Fred9991 George8784 Hiram8583 Isaac8384 Jim7976 Slide 1- 48

49 Copyright © 2009 Pearson Education, Inc. Let’s Make a Mistake We’ll use the independent two- sample t-test from the TI (oops!) With a p-value of 0.324, there is insufficient evidence to reject the null hypothesis of no difference. Slide 1- 49

50 Copyright © 2009 Pearson Education, Inc. Let’s Discover our Mistake We reread the problem and notice the same people. Our bad - it should have been paired. Let’s redo it. (Take L1 – L2, store in L3.) A very different conclusion! We almost missed it. Slide 1- 50

51 Copyright © 2009 Pearson Education, Inc. Let’s Compare! Wrong way Right way Slide 1- 51

52 Copyright © 2009 Pearson Education, Inc. An Example – Summer School A geometry class of six students has the final exam scores recorded in June. Coincidentally, another class of six have the scores recorded in August. The instructional leader decided to compare the grades. JuneAugust 5450 4965 6874 6677 6268 6272 Slide 1- 52 Data were modified from Exercise 18, Chapter 24 – one number was changed to illustrate a concept.

53 Copyright © 2009 Pearson Education, Inc. Let’s Make a Mistake Without reading the explanation, the IL interpreted the data as paired – possibly repeat students. We see a difference in test scores. Slide 1- 53

54 Copyright © 2009 Pearson Education, Inc. Let’s Discover our Mistake We just read the instructions and discovered the IL’s “OOPS”. Let’s do it for independent data. There is no difference in performance. (p = 0.162). Different conclusion! Slide 1- 54

55 Copyright © 2009 Pearson Education, Inc. Let’s Compare! Wrong way Right way Slide 1- 55

56 Copyright © 2009 Pearson Education, Inc. Slide 1- 56 What Can Go Wrong? Don’t use a two-sample t-test for paired data. (Exercise machine data) Don’t use a paired-t method when the samples aren’t paired.(Summer school data) Don’t forget outliers—the outliers we care about now are in the differences. Don’t look for the difference between means of paired groups with side-by-side boxplots.

57 Copyright © 2009 Pearson Education, Inc. Slide 1- 57 What have we learned? Pairing can be a very effective strategy. Because pairing can help control variability between individual subjects, paired methods are usually more powerful than methods that compare independent groups. Analyzing data from matched pairs requires different inference procedures. Paired t-methods look at pairwise differences. We test hypotheses and generate confidence intervals based on these differences. We learned to Think about the design of the study that collected the data before we proceed with inference.

58 Copyright © 2009 Pearson Education, Inc. Slide 1- 58 Topics in this chapter Paired data Paired t-test Paired Confidence Interval Comparison with independent t-test Consequences of an incorrect analysis. Consequences of using the wrong data  !! Slide 1- 58

59 Copyright © 2009 Pearson Education, Inc. Division of Mathematics, HCC Course Objectives for Chapter 25 After studying this chapter, the student will be able to: 66. Find a paired confidence interval, to include: Finding the t that corresponds to the percent Computing the interval Interpreting the interval in context. 67. Perform a paired t-test, 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. Also, be sensitive to data entry errors and the consequences of doing the incorrect analysis!


Download ppt "Copyright © 2009 Pearson Education, Inc. Chapter 25 Paired Samples and Blocks."

Similar presentations


Ads by Google