Ch9-2

advertisement
Section 9.2
Inferences About Two Proportions
Objective
Compare the proportions of two populations
using two samples from each population.
Hypothesis Tests and Confidence Intervals
of two proportions use the z-distribution
1
Notation
First Population
p1
First population proportion
n1
First sample size
x1
Number of successes in first sample
p1
First sample proportion
2
Notation
Second Population
p2
Second population proportion
n2
Second sample size
x2
Number of successes in second sample
p2
Second sample proportion
3
Definition
The pooled sample proportion p
x1 + x2
p= n +n
1
2
q =1–p
4
Requirements
(1) Have two independent random samples
(2) For each sample:
The number of successes is at least 5
The number of failures is at least 5
Both requirements must be satisfied to make a
Hypothesis Test or to find a Confidence Interval
5
Tests for Two Proportions
The goal is to compare the two proportions
H0 : p1 = p2
H1 : p1  p2
Two tailed
H0 : p 1 = p 2
H0 : p1 = p2
H1 : p 1 < p 2
H1 : p1 > p2
Left tailed
Right tailed
Note: We only test the relation between p1 and p2
(not the actual numerical values)
6
Finding the Test Statistic
z=
^ )–(p –p )
( p^1 – p
2
1
2
Note: p1 –
pq
pq
n 1 + n2
p2 =0 according to H0
This equation is an altered form of the test
statistic for a single proportion (see Ch. 8-3)
7
Test Statistic
Note: Hypothesis Tests are done in same way as
in Ch.8 (but with different test statistics)
8
Steps for Performing a Hypothesis
Test on Two Proportions
•
Write what we know
•
State H0 and H1
•
Draw a diagram
•
Calculate the sample and pooled proportions
•
Find the Test Statistic
•
Find the Critical Value(s)
•
State the Initial Conclusion and Final Conclusion
Note: Same process as in Chapter 8
9
Example 1
The table below lists results from a simple random sample
of front-seat occupants involved in car crashes.
Use a 0.05 significance level to test the claim that the
fatality rate of occupants is lower for those in cars
equipped with airbags.
p1 : Proportion of fatalities with airbags
p2 : Proportion of fatalities with no airbags
What we know:
x1 = 41
n1 = 11541
x2 = 52
n2 = 9853
Claim
p1 < p2
α = 0.05
Claim: p1 < p2
Note: Each sample has more than 5 successes and failures, thus fulfilling the requirements 10
Given:
Example 1
x2 = 52
n2 = 9853
α = 0.05
Claim: p1 < p2
Diagram
H0 : p1 = p2
H1 : p1 < p2
x1 = 41
n1 = 11541
Left-Tailed
H1 = Claim
Sample Proportions
z = –1.9116
z-dist.
–zα = –1.645
Pooled Proportion
Test Statistic
Critical Value
(Using StatCrunch)
Initial Conclusion: Since z is in the critical region, reject H0
Final Conclusion: We Accept the claim the fatality rate of occupants is
lower for those who wear seatbelts
11
Example 1
Given:
α = 0.05
Claim: p1 < p2
x2 = 52
n2 = 9853
Diagram
H0 : p1 = p2
H1 : p1 < p2
x1 = 41
n1 = 11541
Left-Tailed
H1 = Claim
z = –1.9116
z-dist.
–zα = –1.645
Using StatCrunch
Stat → Proportions → Two sample → With summary
Sample 1: Number of successes: . 41
● Hypothesis Test
Number of observations: 11541
Null: prop. diff.=
Sample 2: Number of successes: . 52
Alternative
Number of observations: 9853
0
<
P-value = 0.028
Initial Conclusion: Since P-value is less than α (with α = 0.05), reject H0
Final Conclusion: We Accept the claim the fatality rate of occupants is
lower for those who wear seatbelts
12
Confidence Interval Estimate
We can observe how the two proportions relate by
looking at the Confidence Interval Estimate of p1–p2
CI = ( (p1–p2) – E, (p1–p2) + E )
Where
13
Example 2
Use the same sample data in Example 1 to construct a
90% Confidence Interval Estimate of the difference
between the two population proportions (p1–p2)
x1 = 41
n1 = 11541
x2 = 52
n2 = 9853
p1 = 0.003553
p2 = 0.005278
CI = (-0.003232, -0.000218 )
Note: CI negative implies p1–p2 is negative. This implies p1<p2
14
Example 2
Use the same sample data in Example 1 to construct a
90% Confidence Interval Estimate of the difference
between the two population proportions (p1–p2)
x1 = 41
n1 = 11541
x2 = 52
n2 = 9853
p1 = 0.003553
p2 = 0.005278
CI = (-0.003232, -0.000218 )
Note: CI negative implies p1–p2 is negative. This implies p1<p2
15
Example 2
Use the same sample data in Example 1 to construct a
90% Confidence Interval Estimate of the difference
between the two population proportions (p1–p2)
x1 = 41
n1 = 11541
x2 = 52
n2 = 9853
Using StatCrunch
Stat → Proportions → Two sample → With summary
Sample 1: Number of successes: . 41
● Confidence Interval
Number of observations: 11541
Level 0.9
Sample 2: Number of successes: . 52
Number of observations: 9853
CI = (-0.003232, -0.000218 )
Note: CI negative implies p1–p2 is negative. This implies p1<p2
16
Interpreting Confidence Intervals
If a confidence interval limits does not contain 0, it
implies there is a significant difference between
the two proportions (i.e. p1 ≠ p2).
Thus, we can interpret a relation between the two
proportions from the confidence interval.
In general:
• If p1 = p2 then the CI should contain 0
• If p1 > p2 then the CI should be mostly positive
• If p1 > p2 then the CI should be mostly negative
17
Example 3
Drug Clinical Trial
Chantix is a drug used as an aid to stop smoking. The number of
subjects experiencing insomnia for each of two treatment groups in
a clinical trial of the drug Chantix are given below:
Chantix Treatment
Placebo
Number in group
129
805
Number experiencing insomnia
19
13
(a) Use a 0.01 significance level to test the claim proportions of
subjects experiencing insomnia is the same for both groups.
(b) Find the 99% confidence level estimate of the difference of the
two proportions. Does it support the result of the test?
What we know:
x1 = 41
n1 = 129
x2 = 52
n2 = 9853
α = 0.01
Claim: p1= p2
Note: Each sample has more than 5 successes and failures, thus fulfilling the requirements 18
Example 3a
Given: x1 = 19
n1 = 129
Diagram
H0 : p1 = p2
H1 : p1 ≠ p2
x2 = 13
n2 = 805
Two-Tailed
H0 = Claim
Sample Proportions
-zα/2 = -2.576
α = 0.01
Claim: p1= p2
z-dist.
z = 7.602
zα/2 = 2.576
Pooled Proportion
Test Statistic
Critical Value
(Using StatCrunch)
Initial Conclusion: Since z is in the critical region, reject H0
Final Conclusion: We Reject the claim the proportions of the subjects
experiencing insomnia is the same in both groups.
19
Example 3a
Given: x1 = 19
n1 = 129
Diagram
H0 : p1 = p2
H1 : p1 ≠ p2
α = 0.01
Claim: p1= p2
x2 = 13
n2 = 805
z-dist.
Two-Tailed
H0 = Claim
Using StatCrunch
Stat → Proportions → Two sample → With summary
Sample 1: Number of successes: . 19
Number of observations: 129
Sample 2: Number of successes: . 13
Number of observations: 805
● Hypothesis Test
Null: prop. diff.=
Alternative
0
≠
P-value < 0.0001
i.e. the P-value
is very small
Initial Conclusion: Since the P-value is less than α (0.01), reject H0
Final Conclusion: We Reject the claim the proportions of the subjects
experiencing insomnia is the same in both groups.
20
Example 3b
Use the same sample data in Example 3 to construct a
99% Confidence Interval Estimate of the difference
between the two population proportions (p1–p2)
x1 = 19
n1 = 129
x2 = 13
n2 = 805
p1 = 0.14729
p2 = 0.01615
CI = (0.0500, 0.2123 )
Note: CI does not contain 0 implies p1 and p2 have significant difference. 21
Example 3b
Use the same sample data in Example 3 to construct a
99% Confidence Interval Estimate of the difference
between the two population proportions (p1–p2)
x1 = 19
n1 = 129
x2 = 13
n2 = 805
Using StatCrunch
Stat → Proportions → Two sample → With summary
Sample 1: Number of successes: . 19
Number of observations: 129
Sample 2: Number of successes: . 13
Number of observations: 805
● Confidence Interval
Level
0.9
CI = (0.0500, 0.2123 )
Note: CI does not contain 0 implies p1 and p2 have significant difference. 22
Download