Transcript Section 8.2
Chapter 10: Comparing Two Groups
Section 10.1: Categorical Response: How Can We Compare Two Proportions?
1
Learning Objectives
1.
2.
3.
4.
5.
6.
7.
Bivariate Analyses Independent Samples and Dependent Samples Categorical Response Variable Example Standard Error for Comparing Two Proportions Confidence Interval for the Difference B etween Two Population Proportions Interpreting a Confidence Interval for a Difference of Proportions 2
Learning Objectives
9.
Significance Tests Comparing Population Proportions
10.
Examples
11.
Class Exercises
3
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 4
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: randomly allocate subjects to two treatments Randomized experiments that
Example: An observational study that separates subjects into groups according to their value for an explanatory variable
5
Learning Objective 2 : Dependent Samples
Dependent samples result when the data are matched pairs sample is matched with a subject in the other sample – each subject in one
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
6
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 )
7
Learning Objective 4: Example: Aspirin, the Wonder Drug
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
8
Learning Objective 4: Example: Aspirin, the Wonder Drug
Results displayed in a contingency table:
9
Learning Objective 4: Example: Aspirin, the Wonder Drug
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
10
Learning Objective 4: Example: Aspirin, the Wonder Drug
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
11
Learning Objective 4: Example: Aspirin, the Wonder Drug
Sample Statistics:
(
1
189 / 11034
0 .
017
2 1
104
2
) / 11037
0 .
017
0 .
009
0 .
009
0 .
008
12
Learning Objective 4: Example: Aspirin, the Wonder Drug
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:
(
p
ˆ 1 ˆ
p
2 ) 13
Learning Objective 5: Standard Error for Comparing Two Proportions ( ˆ
p
1
p
ˆ 2 )
data
It will vary from sample to sample
This variation is the standard error of the sampling distribution of :
1 2 )
se
ˆ 1 ( 1 ˆ 1 )
n
1 ˆ 2 ( 1 ˆ 2 )
n
2 14
Learning Objective 6: Confidence Interval for the Difference Between Two Population Proportions ( ˆ 1 ˆ 2 )
z
ˆ 1 ( 1
n
1 ˆ 1 ) ˆ 2 ( 1 ˆ 2 )
n
2
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
15
Learning Objective 6: Confidence Interval Comparing Heart Attack Rates for Aspirin and Placebo
95% CI
: (.
017 .
009 ) 1 .
96 .
017 ( 1 .
017 11034 0 .
008 0 .
003 , or (0.005, 0.011) ) .
009 ( 1 .
009 ) 11037 16
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
17
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
18
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
19
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
20
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
21
Learning Objective 8: Significance Tests Comparing Population Proportions
1. Assumptions:
Categorical response variable for two groups
Independent random samples
22
Learning Objective 8: Significance Tests Comparing Population Proportions
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
23
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)
24
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 the proportion of the total sample in the by 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 )
25
Learning Objective 8: Significance Tests Comparing Population Proportions
3. The test statistic is:
z
( ˆ 1 ˆ (1 ˆ 2 ) ˆ ) 1
n
1 0 1
n
2 26
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 supporting H a 0 and
27
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
28
Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?
29
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 30
Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?
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: ˆ 5 154 88 619 0.225
se
0 ˆ 1 1
n
1 1
n
2
z
ˆ 1
se
0 ˆ 2 0.225(0.775) 1 88 1 619 0.057
0.249
0.0476
0.192
0.0476
4.04
0.0476
31
Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?
32
Learning Objective 9: Example: Is TV Watching Associated with Aggressive Behavior?
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
33
Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example A university financial aid office polled a simple random sample of undergraduate students to study their summer employment.
Not all students were employed the previous summer. Here are the results:
Summer Status
Employed Not Employed
Total Men
718 79 797
Women
593 139 732 Is there evidence that the proportion of male students who had summer jobs differs from the proportion of female students who had summer jobs ?
34
Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example
Hypotheses:
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 ] 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 ] 35
Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example
Test Statistic :
n
1 = 797 and
n
2 = 732 (both large, so test statistic follows a Normal distribution ) Pooled sample proportion: Test statistic: 36
Learning Objective 9: Test of Significance: Two Proportions Summer Jobs Example
Hypotheses:
H 0 :
p
1 H a :
p
1 =
p
2 ≠
p
2
Test Statistic:
z = 5.07
P-value:
P
-value = 2
P
(
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.
37
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?
38
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%, 39
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: Dem Rep favor 135 95 Undecided 80 60 Total 230 140 Opposed 65 65 130 Total 200 220 Is there a difference in the proportions of Democrats and Republicans who are undecided regarding mandatory testing for AIDS? Test at α=5% 40
Chapter 10: Comparing Two Groups
Section10.2: Quantitative Response: How Can We Compare Two Means?
41
Learning Objectives
1.
2.
3.
4.
5.
6.
Comparing Means Standard Error for Comparing Two Means Confidence Interval for the Difference between Two Population Means Example: Nicotine – How Much More Addicted Are Smokers than Ex-Smokers?
How Can We Interpret a Confidence Interval for a Difference of Means?
Significance Tests Comparing Population Means 42
Learning Objective 1 : Comparing Means
We can compare two groups on a
quantitative response variable
comparing their means by
43
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)
44
Learning Objective 1: Example: Teenagers Hooked on Nicotine
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
45
Learning Objective 1: Example: Teenagers Hooked on Nicotine
The study considered explanatory variables, such as gender, that might be associated with the HONC score
46
Learning Objective 1: Example: Teenagers Hooked on Nicotine
How can we compare the sample HONC scores for females and males?
We estimate (µ 1 µ 2
x
1
x
2
2.8 – 1.6 = 1.2
about one more question on the HONC scale than males did
47
Learning Objective 1: Example: Teenagers Hooked on Nicotine
To make an inference about the difference between population means, (µ 1 – µ 2 ), we need to learn about the variability of the sampling distribution of:
(
x
1
x
2 ) 48
Learning Objective 2 : Standard Error for Comparing Two Means ( x 1 x 2 )
data. It will vary from sample to sample.
This variation is the standard error of the
( x 1 x 2 )
se
s
1 2
n
1
s
2 2
n
2 49
Learning Objective 3: Confidence Interval for the Difference Between Two Population Means A
confidence interval for
m
1
x
1
x
2
t
.025
s
1 2
n
1
s
2 2
n
2
–
m
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 50
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
51
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
52
Learning Objective 4: Example: Nicotine – How Much More Addicted Are Smokers than Ex-Smokers?
Were the sample data for the two groups approximately normal?
Most likely not for Group 2 (based on the
x
2
2 = 2.3) Since the sample sizes are large, this lack of normality is not a problem
53
Learning Objective 4: Example: Nicotine – How Much More Addicted Are Smokers than Ex-Smokers?
95% CI for (µ 1 µ 2 ):
( 5 .
9
1 )
1 .
985 3 .
3 75 4 .
9
0 .
8 ,
or
( 4 .
1 , 5 .
7 )
2
2 .
3
2
257
We can infer that the population mean for the smokers is between 4.1 higher and 5.7 higher than for the ex-smokers
54
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.
Exercisers Non-exercisers
n
29 31 mean 66 75 std. dev.
8.6
9.0
This is an example of when to use the two-sample t procedures.
55
Learning Objective 4: Example: Exercise and Pulse Rates Find a 95% confidence interval for the difference in population means (non-exercisers minus exercisers).
x
1
x
2
t
s
2 1
n
1
s
2 2
n
2 75 9 66 4.65
2.048
(9.0)2 31 (8.6)2 29 4.35 to 13.65
Note: we use the “safe” estimate of 29-1=28 for our degrees of rates (non-exercisers minus exercisers) is between 4.35 and 13.65 beats per minute.” 56
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: N mean SD Elementary Ed Non Elem. Ed 75 42.7
110 49.3
15.5
17.0
Find a 95% confidence interval for µ 1 µ 2 57
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: Males Females
n
203 224
Mean
3.42
2.42
SD
1.49
1.35
Calculate a 99% confidence interval for the difference between males and females in mean number of science courses planned 58
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
59
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
60
Learning Objective 6: Significance Tests Comparing Population Means
1. Assumptions:
Quantitative response variable for two groups
Independent random samples
61
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
62
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
63
Learning Objective 6: Significance Tests Comparing Population Proportions
2. Hypotheses (continued): The alternative hypothesis: H a : (µ 1 H a : (µ 1 H a : (µ 1 µ 2 ) ≠ 0 (two-sided test) µ 2 ) < 0 (one-sided test) µ 2 ) > 0 (one-sided test)
64
Learning Objective 6: Significance Tests Comparing Population Means
3. The test statistic is:
t
(
x
1
s
1 2
n
1
x
2 ) 0
s n
2 2 2 Note change from “z” to “t” in formula 65
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 supporting H a and
66
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
67
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
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
68
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
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
69
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
Boxplots of data:
70
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
Test the hypotheses: H 0 : (µ 1 µ 2 ) =0 vs.
H a : (µ 1 µ 2 ) ≠ 0
using a significance level of 0.05
71
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
P-Value 72
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
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
73
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
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
74
Learning Objective 6: Example: Does Cell Phone Use While Driving Impair Reaction Times?
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
75
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% Female Male Mean 2.8
1.6
S 3.6
2.9
N 150 182 We would reject the claim at a 1% level of significance 76
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%
n Mean S
Ginkgo 104 5.6
0.6
Placebo 115 5.5
0.6
77
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: N mean SD Elementary Ed 75 42.7
15.5
Non Elem. Ed 110 49.3
17.0
Calculate the P-value, and give your conclusion for testing H 0 : µ 1 0.05. µ 2 = 0, H a : µ 1 µ 2 < 0 at a level of significance equal to 78
Chapter 10: Comparing Two Groups
Section 10.3: Other Ways of Comparing Means and Comparing Proportions 79
Learning Objectives 1.
2.
3.
4.
Alternative Method for Comparing Means : the Pooled Standard Deviation Comparing Population Means, Assuming Equal Population Standard Deviations Examples The Ratio of Proportions: The Relative Risk 80
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
81
Learning Objective 1: The Pooled Standard Deviation
This alternative method estimates the common value σ of σ 1 and σ 1 by:
s
(
n
1
1 )
s
1 2
n
1
n
2
(
n
2
2
1 )
s
2 2 82
Learning Objective 2: Comparing Population Means, Assuming Equal Population Standard Deviations
Using the pooled standard deviation estimate, a 95% CI for (µ 1 µ 2 ) is:
(
x
1
x
2
)
t
.
025
s
1
n
1
1
n
2
This method has df =n 1 + n 2 - 2
83
Learning Objective 2: Comparing Population Means, Assuming Equal Population Standard Deviations
The test statistic for H 0 : µ 1 =µ 2
t
(
x
1 1
x
2
s
is:
n
1 ) 1
n
2
This method has df =n 1 + n 2 - 2
84
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
85
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 86
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 87
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) Nonvegetarian Vegetarian Mean 3.18
2.22
S 1.72
0.67
N 51 9 88
Learning Objective 3: Example: Are Vegetarians More Liberal?
Without assumption of equal variances: Depending on your assumption on whether the variance of both groups are equal or not impacts the conclusion of statistical significance. 89
Learning Objective 3: Example: Are Vegetarians More Liberal?
Calculate a 95% confidence interval Assuming Equal Variances 90
Learning Objective 3: Example: Are Vegetarians More Liberal?
Assuming unequal variances, what is the 95% Confidence Interval?
91
Learning Objective 4: The Ratio of Proportions: The Relative Risk
The
ratio of proportions
ˆ
p
1 ˆ
p
2
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
92
Learning Objective 4: The Ratio of Proportions: The Relative Risk Recall Physician’s Health Study: ˆ 1 ˆ 2 189 /11034 104 /11037 0.0171
0.0094
sample relative risk = ˆ 1 ˆ 2 0.0171 0.0094
1.82
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.
93
Chapter 10: Comparing Two Groups
Section 10.4: How Can We Analyze Dependent Samples?
94
Learning Objectives
1.
2.
3.
4.
5.
Dependent Samples Example: Matched Pairs Design for Cell Phones and Driving Study To Compare Means with Matched Pairs, Use Paired Differences Confidence Interval For Dependent Samples Paired Difference Inferences 95
Learning Objectives
6.
7.
8.
Comparing Proportions with Dependent Samples Confidence Interval Comparing Proportions with Matched-Pairs Data McNemar’s Test 96
Learning Objective 1: Dependent Samples
Each observation in one sample has a matched observation in the other sample
The observations are called
matched pairs
97
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
98
Learning Objective 2: Example: Matched Pairs Design for Cell Phones and Driving Study
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
99
Learning Objective 2: Example: Matched Pairs Design for Cell Phones and Driving Study
Data:
100
Learning Objective 2: Example: Matched Pairs Design for Cell Phones and Driving Study
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
101
Learning Objective 3: To Compare Means with Matched Pairs, Use Paired Differences
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:
x d
102
Learning Objective 3: To Compare Means with Matched Pairs , Use Paired Differences
The difference (
x
1
–
x
2
) between the means
x d
the difference scores for the matched pairs
parameter µ d 1 – µ 2 ) between the of the difference scores
that is the population mean
103
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:
x d
t
.
025
s d n x d
is the sample mean of the difference s s
d
is their standard deviation
104
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
105
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:
t
x d s d
0 with
df n
n
1 106
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
107
Learning Objective 5 : Paired Differ ence 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
108
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
109
Learning Objective 5: Example: Cell Phones and Driving Study
Significance test:
H 0 : µ d = 0 (and hence equal population means for the two conditions)
H a : µ d ≠ 0
Test statistic:
t
50 52 .
5 .
6 32 5 .
46 110
Learning Objective 5: Example: Cell Phones and Driving Study 111
Learning Objective 5: Example: Cell Phones and Driving Study
The P-value displayed in the output is approximately 0
There is extremely strong evidence that the population mean reaction times are different
112
Learning Objective 5: Example: Cell Phones and Driving Study
95% CI for µ d =(µ 1 µ 2 ):
50 .
6
2 .
040 ( 52 .
5 ) 32
50.6
18.9
or (31.7, 69.5)
113
Learning Objective 5: Example: Cell Phones and Driving Study
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
114
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 Heaven
Yes No
Total
Yes 833 2
835
No 125 160
285 Total 958 162 1120
115
Learning Objective 6: Comparing Proportions with Dependent Samples We can estimate
p
1 ˆ 2
p
1 -
p
2 as: 958 1120 835 1120 0.11
Note that the data consist of matched pairs. Recode the data so that for belief in heaven or hell, 1=yes and 0=no
Heaven
1 1 0 0
Hell
1 0 1 0
Interpretation
believe in Heaven and Hell believe in Heaven, not Hell believe in Hell, not Heaven do not believe in Heaven or Hell
Difference, d
1-1=0 1-0=1 0-1=-1 0-0=0
Frequency
833 125 2 160 116
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
p
1 ˆ 2 observations into a single sample of 1120 difference scores. We can now use single sample methods with the differences as we 117
Learning Objective 7: Confidence Interval Comparing Proportions with Matched-Pairs Data the mean of difference scores of the re-coded data population mean of difference scores using single sample methods 118
Learning Objective 7: Confidence Interval Comparing Proportions with Matched-Pairs Data
n
1120
x d
0.1098
s d
0.3185
95% CI = 0.1098
0.1098
0.0187
(0.091, 0.128) 119
Learning Objective 8: McNemar Test for Comparing Proportions with Matched-Pairs Data Hypotheses: H 0 :
p
1 =
p
2 , H a sided can be one or two 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 120
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.
121
Learning Objective 8: Example: McNemar’s Test Recall GSS example about belief in Heaven and Hell:
Belief in Heaven
Yes No
Total Belief in Hell
Yes No
Total
833 2
835
125 160
285 958 162 1120
122
Learning Objective 8: Example: McNemar’s Test McNemar’s Test:
z
125 2 125 2 10.9
P-value is approximately 0.
confidence interval for
p
1 -
p
2 calculated earlier 123
Chapter 10: Comparing Two Groups
Section 10.5: How Can We Adjust for Effects of Other Variables?
124
Learning Objectives
1.
2.
3.
A Practically Significant Difference Control Variable Can An Association Be Explained by a Third Variable?
125
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
126
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?
127
Learning Objective 2: Control Variable
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
128
Learning Objective 2: Control Variable
We need to measure
potential lurking variables
and use them in the statistical analysis
Including a potential lurking variable in the study changes it from a bivariate study to a multivariate study
If we thought that education was a
potential
lurking variable we would want to measure it A variable that is held constant in a multivariate analysis is called a control
variable
129
Learning Objective 2: Control Variable 130
Learning Objective 2: Control Variable
This analysis uses three variables:
Response variable: Whether the subject has committed aggressive acts
Explanatory variable: Level of TV watching
Control variable
: Educational level
131
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
132
Learning Objective 3: Can An Association Be Explained by a Third Variable?
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
133