Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 10: Comparing Two Groups Section 10.1: Categorical Response: How Can We Compare Two Proportions?

Similar presentations


Presentation on theme: "1 Chapter 10: Comparing Two Groups Section 10.1: Categorical Response: How Can We Compare Two Proportions?"— Presentation transcript:

1 1 Chapter 10: Comparing Two Groups Section 10.1: Categorical Response: How Can We Compare Two Proportions?

2 2 Learning Objectives 1. Bivariate Analyses 2. Independent Samples and Dependent Samples 3. Categorical Response Variable 4. Example 5. Standard Error for Comparing Two Proportions 6. Confidence Interval for the Difference Between Two Population Proportions 7. Interpreting a Confidence Interval for a Difference of Proportions

3 3 Learning Objectives 9. Significance Tests Comparing Population Proportions 10. Examples 11. Class Exercises

4 4 Learning Objective 1: Bivariate Analyses Methods for comparing two groups are special cases of bivariate statistical methods: there are two variables The outcome variable on which comparisons are made is the response variable The binary variable that specifies the groups is the explanatory variable Statistical methods analyze how the outcome on the response variable depends on or is explained by the value of the explanatory variable

5 5 Learning Objective 2: Independent Samples Most comparisons of groups use independent samples from the groups: The observations in one sample are independent of those in the other sample Example: Randomized experiments that randomly allocate subjects to two treatments Example: An observational study that separates subjects into groups according to their value for an explanatory variable

6 6 Learning Objective 2: Dependent Samples Dependent samples result when the data are matched pairs – each subject in one sample is matched with a subject in the other sample Example: set of married couples, the men being in one sample and the women in the other. Example: Each subject is observed at two times, so the two samples have the same subject

7 7 Learning Objective 3: Categorical Response Variable For a categorical response variable Inferences compare groups in terms of their population proportions in a particular category We can compare the groups by the difference in their population proportions: (p 1 – p 2 )

8 8 Experiment: Subjects were 22,071 male physicians Every other day for five years, study participants took either an aspirin or a placebo The physicians were randomly assigned to the aspirin or to the placebo group The study was double-blind: the physicians did not know which pill they were taking, nor did those who evaluated the results Learning Objective 4: Example: Aspirin, the Wonder Drug

9 9 Results displayed in a contingency table: Learning Objective 4: Example: Aspirin, the Wonder Drug

10 10 What is the response variable? The response variable is whether the subject had a heart attack, with categories ‘yes’ or ‘no’ What are the groups to compare? The groups to compare are: Group 1: Physicians who took a placebo Group 2: Physicians who took aspirin Learning Objective 4: Example: Aspirin, the Wonder Drug

11 11 Estimate the difference between the two population parameters of interest p 1 : the proportion of the population who would have a heart attack if they participated in this experiment and took the placebo p 2 : the proportion of the population who would have a heart attack if they participated in this experiment and took the aspirin Learning Objective 4: Example: Aspirin, the Wonder Drug

12 12 Sample Statistics: Learning Objective 4: Example: Aspirin, the Wonder Drug

13 13 To make an inference about the difference of population proportions, (p 1 – p 2 ), we need to learn about the variability of the sampling distribution of: Learning Objective 4: Example: Aspirin, the Wonder Drug

14 14 Learning Objective 5: Standard Error for Comparing Two Proportions The difference,, is obtained from sample data It will vary from sample to sample This variation is the standard error of the sampling distribution of :

15 15 Learning Objective 6: Confidence Interval for the Difference Between Two Population Proportions The z-score depends on the confidence level This method requires: Categorical response variable for two groups Independent random samples for the two groups Large enough sample sizes so that there are at least 10 “successes” and at least 10 “failures” in each group

16 16 Learning Objective 6: Confidence Interval Comparing Heart Attack Rates for Aspirin and Placebo 95% CI:

17 17 Learning Objective 6: Confidence Interval Comparing Heart Attack Rates for Aspirin and Placebo Since both endpoints of the confidence interval (0.005, 0.011) for (p 1 - p 2 ) are positive, we infer that (p 1 - p 2 ) is positive Conclusion: The population proportion of heart attacks is larger when subjects take the placebo than when they take aspirin

18 18 Learning Objective 6: Confidence Interval Comparing Heart Attack Rates for Aspirin and Placebo The population difference (0.005, 0.011) is small Even though it is a small difference, it may be important in public health terms For example, a decrease of 0.01 over a 5 year period in the proportion of people suffering heart attacks would mean 2 million fewer people having heart attacks

19 19 Learning Objective 6: Confidence Interval Comparing Heart Attack Rates for Aspirin and Placebo The study used male doctors in the U.S The inference applies to the U.S. population of male doctors Before concluding that aspirin benefits a larger population, we’d want to see results of studies with more diverse groups

20 20 Learning Objective 7: Interpreting a Confidence Interval for a Difference of Proportions Check whether 0 falls in the CI If so, it is plausible that the population proportions are equal If all values in the CI for (p 1 - p 2 ) are positive, you can infer that (p 1 - p 2 ) >0 If all values in the CI for (p 1 - p 2 ) are negative, you can infer that (p 1 - p 2 ) <0 Which group is labeled ‘1’ and which is labeled ‘2’ is arbitrary

21 21 Learning Objective 7: Interpreting a Confidence Interval for a Difference of Proportions The magnitude of values in the confidence interval tells you how large any true difference is If all values in the confidence interval are near 0, the true difference may be relatively small in practical terms

22 22 Learning Objective 8: Significance Tests Comparing Population Proportions 1. Assumptions: Categorical response variable for two groups Independent random samples

23 23 Assumptions (continued): Significance tests comparing proportions use the sample size guideline from confidence intervals: Each sample should have at least about 10 “successes” and 10 “failures” Two–sided tests are robust against violations of this condition At least 5 “successes” and 5 “failures” is adequate Learning Objective 8: Significance Tests Comparing Population Proportions

24 24 Learning Objective 8: Significance Tests Comparing Population Proportions 2. Hypotheses: The null hypothesis is the hypothesis of no difference or no effect: H 0 : p 1 =p 2 The alternative hypothesis is the hypothesis of interest to the investigator H a : p 1 ≠p 2 (two-sided test) H a : p 1 <p 2 (one-sided test) H a : p 1 >p 2 (one-sided test)

25 25 Learning Objective 8: Significance Tests Comparing Population Proportions Pooled Estimate  Under the presumption that p 1 = p 2, we estimate the common value of p 1 and p 2 by the proportion of the total sample in the category of interest This pooled estimate is calculated by combining the number of successes in the two groups and dividing by the combined sample size (n 1 +n 2 )

26 26 Learning Objective 8: Significance Tests Comparing Population Proportions 3. The test statistic is: where is the pooled estimate

27 27 Learning Objective 8: Significance Tests Comparing Population Proportions 4. P-value: Probability obtained from the standard normal table of values even more extreme than observed z test statistic 5. Conclusion: Smaller P-values give stronger evidence against H 0 and supporting H a

28 28 Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior? Various studies have examined a link between TV violence and aggressive behavior by those who watch a lot of TV A study sampled 707 families in two counties in New York state and made follow-up observations over 17 years The data shows levels of TV watching along with incidents of aggressive acts

29 29 Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?

30 30 Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior? Define Group 1 as those who watched less than 1 hour of TV per day, on the average, as teenagers Define Group 2 as those who averaged at least 1 hour of TV per day, as teenagers p 1 = population proportion committing aggressive acts for the lower level of TV watching p 2 = population proportion committing aggressive acts for the higher level of TV watching

31 31 Test the Hypotheses: H 0 : (p 1 - p 2 ) = 0 H a : (p 1 - p 2 ) ≠ 0 using a significance level of 0.05  Test statistic: Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?

32 32 Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?

33 33 Conclusion: Since the P-value is less than 0.05, we reject H 0 We conclude that the population proportions of aggressive acts differ for the two groups The sample values suggest that the population proportion is higher for the higher level of TV watching Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?

34 34 u A university financial aid office polled a simple random sample of undergraduate students to study their summer employment. u Not all students were employed the previous summer. Here are the results: u Is there evidence that the proportion of male students who had summer jobs differs from the proportion of female students who had summer jobs? Summer StatusMenWomen Employed718593 Not Employed79139 Total797732 Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example

35 35 u Null: The proportion of male students who had summer jobs is the same as the proportion of female students who had summer jobs. [H 0 : p 1 = p 2 ] u Alt: The proportion of male students who had summer jobs differs from the proportion of female students who had summer jobs. [H a : p 1 ≠ p 2 ] Hypotheses: Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example

36 36 u n 1 = 797 and n 2 = 732 (both large, so test statistic follows a Normal distribution) u Pooled sample proportion: uTest statistic: Test Statistic: Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example

37 37  Hypotheses:H 0 : p 1 = p 2 H a : p 1 ≠ p 2  Test Statistic: z = 5.07  P-value: P-value = 2P(Z > 5.07) = 0.000000396 (using a computer)  Conclusion: Since the P-value is quite small, there is very strong evidence that the proportion of male students who had summer jobs differs from that of female students. Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example

38 38 Learning Objective 9: Test of Significance: Two Proportions Drinking and unplanned sex In a study of binge drinking, the percent who said they had engaged in unplanned sex because of drinking was 19.2% out of 12708 in 1993 and 21.3% out of 8783 in 2001 Is this change statistically significant at the 0.05 significance level? The P-value is 0.0002 <.05. The results are statistically significant. But are they practically significant?

39 39 Learning Objective 10: Test of Significance: Two Proportions Class Exercise 1 A survey of one hundred male and one hundred female high school seniors showed that thirty-five percent of the males and twenty-nine percent of the females had used marijuana previously. Does this survey indicate a difference in proportions for the population of high school seniors? Test at α=5%,

40 40 Learning Objective 10: Test of Significance: Two Proportions Class Exercise 2 A random sample of 500 persons were questioned regarding political affiliation and attitude toward government sponsored mandatory testing of AIDS. The results were as follows: favorUndecidedOpposedTotal Dem1358065200 Rep956065220 Total230140130 Is there a difference in the proportions of Democrats and Republicans who are undecided regarding mandatory testing for AIDS? Test at α=5%

41 41 Chapter 10: Comparing Two Groups Section10.2: Quantitative Response: How Can We Compare Two Means?

42 42 Learning Objectives 1. Comparing Means 2. Standard Error for Comparing Two Means 3. Confidence Interval for the Difference between Two Population Means 4. Example: Nicotine – How Much More Addicted Are Smokers than Ex-Smokers? 5. How Can We Interpret a Confidence Interval for a Difference of Means? 6. Significance Tests Comparing Population Means

43 43 Learning Objective 1: Comparing Means We can compare two groups on a quantitative response variable by comparing their means

44 44 Learning Objective 1: Example: Teenagers Hooked on Nicotine A 30-month study: Evaluated the degree of addiction that teenagers form to nicotine 332 students who had used nicotine were evaluated The response variable was constructed using a questionnaire called the Hooked on Nicotine Checklist (HONC)

45 45 The HONC score is the total number of questions to which a student answered “yes” during the study The higher the score, the more hooked on nicotine a student is judged to be Learning Objective 1: Example: Teenagers Hooked on Nicotine

46 46 The study considered explanatory variables, such as gender, that might be associated with the HONC score Learning Objective 1: Example: Teenagers Hooked on Nicotine

47 47 How can we compare the sample HONC scores for females and males? We estimate (µ 1 - µ 2 ) by ( ): 2.8 – 1.6 = 1.2 On average, females answered “yes” to about one more question on the HONC scale than males did Learning Objective 1: Example: Teenagers Hooked on Nicotine

48 48 To make an inference about the difference between population means, (µ 1 – µ 2 ), we need to learn about the variability of the sampling distribution of: Learning Objective 1: Example: Teenagers Hooked on Nicotine

49 49 Learning Objective 2: Standard Error for Comparing Two Means The difference,, is obtained from sample data. It will vary from sample to sample. This variation is the standard error of the sampling distribution of :

50 50 Learning Objective 3: Confidence Interval for the Difference Between Two Population Means A confidence interval for  1 –  2 is: t.025 is the critical value for a 95% confidence level from the t distribution The degrees of freedom are calculated using software. If you are not using software, you can take df to be the smaller of (n 1 -1) and (n 2 -1) as a “safe” estimate

51 51 Learning Objective 3: Confidence Interval for the Difference between Two Population Means This method assumes: Independent random samples from the two groups An approximately normal population distribution for each group this is mainly important for small sample sizes, and even then the method is robust to violations of this assumption

52 52 Learning Objective 4: Example: Nicotine – How Much More Addicted Are Smokers than Ex-Smokers? Data as summarized by HONC scores for the two groups: Smokers: = 5.9, s 1 = 3.3, n 1 = 75 Ex-smokers: = 1.0, s 2 = 2.3, n 2 = 257

53 53 Were the sample data for the two groups approximately normal? Most likely not for Group 2 (based on the sample statistics: = 1.0, s 2 = 2.3) Since the sample sizes are large, this lack of normality is not a problem Learning Objective 4: Example: Nicotine – How Much More Addicted Are Smokers than Ex-Smokers?

54 54 95% CI for (µ 1 - µ 2 ): We can infer that the population mean for the smokers is between 4.1 higher and 5.7 higher than for the ex-smokers Learning Objective 4: Example: Nicotine – How Much More Addicted Are Smokers than Ex-Smokers?

55 55 Learning Objective 4: Example: Exercise and Pulse Rates A study is performed to compare the mean resting pulse rate of adult subjects who exercise regularly to the mean resting pulse rate of those who do not exercise regularly. This is an example of when to use the two-sample t procedures. nmeanstd. dev. Exercisers29668.6 Non-exercisers31759.0

56 56 Learning Objective 4: Example: Exercise and Pulse Rates Find a 95% confidence interval for the difference in population means (non-exercisers minus exercisers). Note: we use the “safe” estimate of 29-1=28 for our degrees of freedom in this calculation “We are 95% confident that the difference in mean resting pulse rates (non-exercisers minus exercisers) is between 4.35 and 13.65 beats per minute.”

57 57 Learning Objective 4: Class Exercise 1 Attitude toward mathematics was measured for two different groups. The attitude scores range from 0 to 80 with the higher scores indicating a more positive attitude. The first group consisted of Elementary education majors and the other group consisted of majors from several other areas. The results were as follows: NmeanSD Elementary Ed 7542.715.5 Non Elem. Ed110 49.317.0 Find a 95% confidence interval for µ 1 - µ 2

58 58 Learning Objective 4: Class Exercise 2 Are girls less inclined to enroll in science courses than boys? One recent study of fourth, fifth, and sixth graders asked how many science courses they intended to take. The resulting data were used to compute the following summary statistics: Calculate a 99% confidence interval for the difference between males and females in mean number of science courses planned nMeanSD Males2033.421.49 Females2242.421.35

59 59 Learning Objective 5: How Can We Interpret a Confidence Interval for a Difference of Means? Check whether 0 falls in the interval When it does, 0 is a plausible value for (µ 1 – µ 2 ), meaning that it is possible that µ 1 = µ 2 A confidence interval for (µ 1 – µ 2 ) that contains only positive numbers suggests that (µ 1 – µ 2 ) is positive We then infer that µ 1 is larger than µ 2

60 60 Learning Objective 5: How Can We Interpret a Confidence Interval for a Difference of Means? A confidence interval for (µ 1 – µ 2 ) that contains only negative numbers suggests that (µ 1 – µ 2 ) is negative We then infer that µ 1 is smaller than µ 2 Which group is labeled ‘1’ and which is labeled ‘2’ is arbitrary

61 61 Learning Objective 6: Significance Tests Comparing Population Means 1. Assumptions: Quantitative response variable for two groups Independent random samples

62 62 Learning Objective 6: Significance Tests Comparing Population Means Assumptions (continued): Approximately normal population distributions for each group This is mainly important for small sample sizes, and even then the two-sided t test is robust to violations of this assumption

63 63 Learning Objective 6: Significance Tests Comparing Population Means 2. Hypotheses: The null hypothesis is the hypothesis of no difference or no effect: H 0 : (µ 1 - µ 2 ) =0

64 64 Learning Objective 6: Significance Tests Comparing Population Proportions 2. Hypotheses (continued): The alternative hypothesis: H a : (µ 1 - µ 2 ) ≠ 0 (two-sided test) H a : (µ 1 - µ 2 ) < 0 (one-sided test) H a : (µ 1 - µ 2 ) > 0 (one-sided test)

65 65 Learning Objective 6: Significance Tests Comparing Population Means 3. The test statistic is: Note change from “z” to “t” in formula

66 66 Learning Objective 6: Significance Tests Comparing Population Means 4. P-value: Probability obtained from the standard normal table 5. Conclusion: Smaller P-values give stronger evidence against H 0 and supporting H a

67 67 Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times? Experiment: 64 college students 32 were randomly assigned to the cell phone group 32 to the control group

68 68 Experiment (continued): Students used a machine that simulated driving situations At irregular periods a target flashed red or green Participants were instructed to press a “brake button” as soon as possible when they detected a red light Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?

69 69 For each subject, the experiment analyzed their mean response time over all the trials Averaged over all trials and subjects, the mean response time for the cell-phone group was 585.2 milliseconds The mean response time for the control group was 533.7 milliseconds Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?

70 70 Boxplots of data: Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?

71 71 Test the hypotheses: H 0 : (µ 1 - µ 2 ) =0 vs. H a : (µ 1 - µ 2 ) ≠ 0 using a significance level of 0.05 Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?

72 72 Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times? P-Value

73 73 Conclusion: The P-value is less than 0.05, so we can reject H 0 There is enough evidence to conclude that the population mean response times differ between the cell phone and control groups The sample means suggest that the population mean is higher for the cell phone group Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?

74 74 What do the box plots tell us? There is an extreme outlier for the cell phone group It is a good idea to make sure the results of the analysis aren’t affected too strongly by that single observation Delete the extreme outlier and redo the analysis In this example, the t-statistic changes only slightly Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?

75 75 Insight: In practice, you should not delete outliers from a data set without sufficient cause (i.e., if it seems the observation was incorrectly recorded) It is however, a good idea to check for sensitivity of an analysis to an outlier If the results change much, it means that the inference including the outlier is on shaky ground Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?

76 76 Learning Objective 6: Example: Females or males more nicotine dependent Test the claim that there is a difference between males and females and their level of dependence on nicotine with a level of significance of 1% We would reject the claim at a 1% level of significance

77 77 Learning Objective 6: Class exercise 1 Many people take ginkgo supplements advertised to improve memory. Are these over the counter supplements effective? Based on the study results below, is there evidence that taking 40 mg of ginkgo 3 times a day is effective in increasing mean performance? Test the relevant hypothesis using α=5% nMeanS Ginkgo1045.60.6 Placebo1155.50.6

78 78 Learning Objective 6: Class Exercise 2 Attitude toward mathematics was measured for two different groups. The attitude scores range from 0 to 80 with the higher scores indicating a more positive attitude. One group consisted of Elementary education majors and the other group consisted of majors from several other areas. The results were as follows: NmeanSD Elementary Ed 7542.715.5 Non Elem. Ed110 49.317.0 Calculate the P-value, and give your conclusion for testing H 0 : µ 1 - µ 2 = 0, H a : µ 1 - µ 2 < 0 at a level of significance equal to 0.05.

79 79 Chapter 10: Comparing Two Groups Section 10.3: Other Ways of Comparing Means and Comparing Proportions

80 80 Learning Objectives 1. Alternative Method for Comparing Means: the Pooled Standard Deviation 2. Comparing Population Means, Assuming Equal Population Standard Deviations 3. Examples 4. The Ratio of Proportions: The Relative Risk

81 81 Learning Objective 1: Alternative Method for Comparing Means An alternative t- method can be used when, under the null hypothesis, it is reasonable to expect the variability as well as the mean to be the same This method requires the assumption that the population standard deviations be equal

82 82 Learning Objective 1: The Pooled Standard Deviation This alternative method estimates the common value σ of σ 1 and σ 1 by:

83 83 Learning Objective 2: Comparing Population Means, Assuming Equal Population Standard Deviations Using the pooled standard deviation estimate, a 95% CI for (µ 1 - µ 2 ) is: This method has df =n 1 + n 2 - 2

84 84 Learning Objective 2: Comparing Population Means, Assuming Equal Population Standard Deviations The test statistic for H 0 : µ 1 =µ 2 is: This method has df =n 1 + n 2 - 2

85 85 Learning Objective 2: Comparing Population Means, Assuming Equal Population Standard Deviations These methods assume: Independent random samples from the two groups An approximately normal population distribution for each group This is mainly important for small sample sizes, and even then, the CI and the two-sided test are usually robust to violations of this assumption σ 1 =σ 2

86 86 Learning Objective 3: Example: Is Arthroscopic Surgery better than Placebo? Calculate the P-Value and determine if there is a statistical difference between Arthroscopic surgery and Placebo at 5% level of significance. With a P-value of 0.63, we should not reject the null that there is no difference between placebo and Arthroscopic surgery

87 87 Learning Objective 3: Example: Is Arthroscopic Surgery better than Placebo? Calculate a 95% Confidence Interval We are 95% Confident that the difference between the placebo and surgery is in this range -10.6 to 6.4. Notice that 0 is within this range. Thus, we should not reject the null hypothesis at the 5% significance level that there is no difference between the two treatment groups

88 88 Learning Objective 3: Example: Are Vegetarians More Liberal? Respondents were rated on a scale of 1-7 with 1 being liberal and 7 being the most conservative. Is there a significant difference between Non-vegetarian and vegetarians? Assume equal variances. H 0 : μ (nveg) = μ (veg) vs. H a : μ (nveg) ≠ μ (veg)

89 89 Learning Objective 3: Example: Are Vegetarians More Liberal? Depending on your assumption on whether the variance of both groups are equal or not impacts the conclusion of statistical significance. Without assumption of equal variances:

90 90 Learning Objective 3: Example: Are Vegetarians More Liberal? Calculate a 95% confidence interval Assuming Equal Variances

91 91 Assuming unequal variances, what is the 95% Confidence Interval? Learning Objective 3: Example: Are Vegetarians More Liberal?

92 92 Learning Objective 4: The Ratio of Proportions: The Relative Risk The ratio of proportions for two groups is: In medical applications for which the proportion refers to a category that is an undesirable outcome, such as death or having a heart attack, this ratio is called the relative risk The ratio describes the sizes of the proportions relative to each other

93 93 Learning Objective 4: The Ratio of Proportions: The Relative Risk Recall Physician’s Health Study: The proportion of the placebo group who had a heart attack was 1.82 times the proportion of the aspirin group who had a heart attack.

94 94 Chapter 10: Comparing Two Groups Section 10.4: How Can We Analyze Dependent Samples?

95 95 Learning Objectives 1. Dependent Samples 2. Example: Matched Pairs Design for Cell Phones and Driving Study 3. To Compare Means with Matched Pairs, Use Paired Differences 4. Confidence Interval For Dependent Samples 5. Paired Difference Inferences

96 96 Learning Objectives 6. Comparing Proportions with Dependent Samples 7. Confidence Interval Comparing Proportions with Matched-Pairs Data 8. McNemar’s Test

97 97 Learning Objective 1: Dependent Samples Each observation in one sample has a matched observation in the other sample The observations are called matched pairs

98 98 Learning Objective 2: Example: Matched Pairs Design for Cell Phones and Driving Study The cell phone analysis presented earlier in this text used independent samples: One group used cell phones A separate control group did not use cell phones

99 99 An alternative design used the same subjects for both groups Reaction times are measured when subjects performed the driving task without using cell phones and then again while using cell phones Learning Objective 2: Example: Matched Pairs Design for Cell Phones and Driving Study

100 100 Data: Learning Objective 2: Example: Matched Pairs Design for Cell Phones and Driving Study

101 101 Benefits of using dependent samples (matched pairs): Many sources of potential bias are controlled so we can make a more accurate comparison Using matched pairs keeps many other factors fixed that could affect the analysis Often this results in the benefit of smaller standard errors Learning Objective 2: Example: Matched Pairs Design for Cell Phones and Driving Study

102 102 To Compare Means with Matched Pairs, Use Paired Differences: For each matched pair, construct a difference score d = (reaction time using cell phone) – (reaction time without cell phone) Calculate the sample mean of these differences: Learning Objective 3: To Compare Means with Matched Pairs, Use Paired Differences

103 103 Learning Objective 3: To Compare Means with Matched Pairs, Use Paired Differences The difference ( – ) between the means of the two samples equals the mean of the difference scores for the matched pairs The difference (µ 1 – µ 2 ) between the population means is identical to the parameter µ d that is the population mean of the difference scores

104 104 Learning Objective 4: Confidence Interval For Dependent Samples Let n denote the number of observations in each sample This equals the number of difference scores The 95 % CI for the population mean difference is:

105 105 Learning Objective 5: Paired Difference Inferences These paired-difference inferences are special cases of single-sample inferences about a population mean so they make the same assumptions

106 106 Learning Objective 5: Paired Difference Inferences To test the hypothesis H 0 : µ 1 = µ 2 of equal means, we can conduct the single-sample test of H 0 : µ d = 0 with the difference scores The test statistic is:

107 107 Learning Objective 5: Paired Difference Inferences Assumptions: The sample of difference scores is a random sample from a population of such difference scores The difference scores have a population distribution that is approximately normal This is mainly important for small samples (less than about 30) and for one-sided inferences

108 108 Learning Objective 5: Paired Difference Inferences Confidence intervals and two-sided tests are robust: They work quite well even if the normality assumption is violated One-sided tests do not work well when the sample size is small and the distribution of differences is highly skewed

109 109 Learning Objective 5: Example: Cell Phones and Driving Study The box plot shows skew to the right for the difference scores Two-sided inference is robust to violations of the assumption of normality The box plot does not show any severe outliers

110 110 Significance test: H 0 : µ d = 0 (and hence equal population means for the two conditions) H a : µ d ≠ 0 Test statistic: Learning Objective 5: Example: Cell Phones and Driving Study

111 111 Learning Objective 5: Example: Cell Phones and Driving Study

112 112 The P-value displayed in the output is approximately 0 There is extremely strong evidence that the population mean reaction times are different Learning Objective 5: Example: Cell Phones and Driving Study

113 113 95% CI for µ d =(µ 1 - µ 2 ): Learning Objective 5: Example: Cell Phones and Driving Study

114 114 We infer that the population mean when using cell phones is between about 32 and 70 milliseconds higher than when not using cell phones The confidence interval is more informative than the significance test, since it predicts possible values for the difference Learning Objective 5: Example: Cell Phones and Driving Study

115 115 Learning Objective 6: Comparing Proportions with Dependent Samples A recent GSS asked subjects whether they believed in Heaven and whether they believed in Hell: Belief in Hell Belief in HeavenYesNoTotal Yes833125958 No2160162 Total8352851120

116 116 Learning Objective 6: Comparing Proportions with Dependent Samples We can estimate p 1 - p 2 as: Note that the data consist of matched pairs. Recode the data so that for belief in heaven or hell, 1=yes and 0=no HeavenHellInterpretationDifference, dFrequency 11believe in Heaven and Hell1-1=0833 10believe in Heaven, not Hell1-0=1125 01believe in Hell, not Heaven0-1=-12 00do not believe in Heaven or Hell0-0=0160

117 117 Learning Objective 6: Comparing Proportions with Dependent Samples Sample mean of the 1120 difference scores is [0(833)+1(125)-1(2)+0(160)]/1120=0.11 Note that this equals the difference in proportions We have converted the two samples of binary observations into a single sample of 1120 difference scores. We can now use single- sample methods with the differences as we did for the matched-pairs analysis of means.

118 118 Learning Objective 7: Confidence Interval Comparing Proportions with Matched-Pairs Data Use the fact that the sample difference is the mean of difference scores of the re-coded data We can then find a confidence interval for the population mean of difference scores using single sample methods

119 119 Learning Objective 7: Confidence Interval Comparing Proportions with Matched-Pairs Data

120 120 Learning Objective 8: McNemar Test for Comparing Proportions with Matched-Pairs Data Hypotheses: H 0 : p 1 =p 2, H a can be one or two sided Test Statistic: For the two counts for the frequency of “yes” on one response and “no” on the other, the z test statistic equals their difference divided by the square root of their sum. P-value: The probability of observing a sample even more extreme than the observed sample

121 121 Learning Objective 8: McNemar Test for Comparing Proportions with Matched-Pairs Data Assumptions: The sum of the counts used in the test should be at least 30, but in practice, the two-sided test works well even if this is not true.

122 122 Learning Objective 8: Example: McNemar’s Test Recall GSS example about belief in Heaven and Hell: Belief in Hell Belief in HeavenYesNoTotal Yes833125958 No2160162 Total8352851120

123 123 Learning Objective 8: Example: McNemar’s Test McNemar’s Test: P-value is approximately 0. Note that this result agrees with the confidence interval for p 1 -p 2 calculated earlier

124 124 Chapter 10: Comparing Two Groups Section 10.5: How Can We Adjust for Effects of Other Variables?

125 125 Learning Objectives 1. A Practically Significant Difference 2. Control Variable 3. Can An Association Be Explained by a Third Variable?

126 126 Learning Objective 1: A Practically Significant Difference When we find a practically significant difference between two groups, can we identify a reason for the difference? Warning: An association may be due to a lurking variable not measured in the study

127 127 Learning Objective 2: Control Variable In a previous example, we saw that teenagers who watch more TV have a tendency later in life to commit more aggressive acts Could there be a lurking variable that influences this association?

128 128 Perhaps teenagers who watch more TV tend to attain lower educational levels and perhaps lower education tends to be associated with higher levels of aggression Learning Objective 2: Control Variable

129 129 We need to measure potential lurking variables and use them in the statistical analysis If we thought that education was a potential lurking variable we would want to measure it Including a potential lurking variable in the study changes it from a bivariate study to a multivariate study A variable that is held constant in a multivariate analysis is called a control variable Learning Objective 2: Control Variable

130 130 Learning Objective 2: Control Variable

131 131 This analysis uses three variables: Response variable: Whether the subject has committed aggressive acts Explanatory variable: Level of TV watching Control variable: Educational level Learning Objective 2: Control Variable

132 132 Learning Objective 3: Can An Association Be Explained by a Third Variable? Treat the third variable as a control variable Conduct the ordinary bivariate analysis while holding that control variable constant at fixed values (multivariate analysis) Whatever association occurs cannot be due to the effect of the control variable

133 133 At each educational level, the percentage committing an aggressive act is higher for those who watched more TV For this hypothetical data, the association observed between TV watching and aggressive acts was not because of education Learning Objective 3: Can An Association Be Explained by a Third Variable?


Download ppt "1 Chapter 10: Comparing Two Groups Section 10.1: Categorical Response: How Can We Compare Two Proportions?"

Similar presentations


Ads by Google