Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Lecture Slides
Elementary Statistics
Twelfth Edition
and the Triola Statistics Series
by Mario F. Triola
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Chapter 9
Inferences from Two Samples
9-1 Review and Preview
9-2 Two Proportions
9-3 Two Means: Independent Samples
9-4 Two Dependent Samples (Matched Pairs)
9-5 Two Variances or Standard Deviations
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Key Concept
In this section we present methods for (1) testing a claim
made about two population proportions and (2)
constructing a confidence interval estimate of the
difference between the two population proportions.
This section is based on proportions, but we can use the
same methods for dealing with probabilities or the decimal
equivalents of percentages.
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
(the sample proportion)
The corresponding notations apply to
which come from population 2.
Notation for Two Proportions
For population 1, we let:
= population proportion
= size of the sample
= number of successes in the sample
1
p
1
n
1
x
1
1
1
ˆ
x
p
n

1 1
ˆ ˆ
1
q p
 
2 2 2, 2 2
ˆ ˆ
, , ,
p n x p and q
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
 The pooled sample proportion is given by:
Pooled Sample Proportion
1 2
1 2
x x
p
n n



1
q p
 
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Requirements
1. We have proportions from two independent simple
random samples.
2. For each of the two samples, the number of successes
is at least 5 and the number of failures is at least 5.
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Test Statistic for Two Proportions
For
where (assumed in the null hypothesis)
0 1 2
:
H p p

1 2 1 2
1 2
ˆ ˆ
( ) ( )
p p p p
z
pq pq
n n
  


1 2 0
p p
 
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Testing Two Proportions
P-value: P-values are automatically provided by
technology. If technology is not available, use Table A-2.
Critical values: Use Table A-2. (Based on the significance
level α, find critical values by using the procedures
introduced in Section 8-2 in the text.)
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Confidence Interval
Estimate of p1 – p2
1 1 2 2
/2
1 2
ˆ ˆ ˆ ˆ
with margin of error
p q p q
E z
n n

 
1 2 1 2 1 2
ˆ ˆ ˆ ˆ
( ) ( ) ( )
p p E p p p p E
      
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Do people having different spending habits depending on
the type of money they have?
89 undergraduates were randomly assigned to two groups
and were given a choice of keeping the money or buying
gum or mints.
The claim is that “money in large denominations is less
likely to be spent relative to an equivalent amount in many
smaller denominations”.
Let’s test the claim at the 0.05 significance level.
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Below are the sample data and summary statistics:
Group 1 Group 2
Subjects Given
$1 Bill
Subjects Given 4
Quarters
Spent the money x1 = 12 x2 = 27
Subjects in group n1 = 46 n2 = 43
1 2
12 27
ˆ ˆ
46 43
12 27
0.438202
46 43
p p
p
 

 

Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Requirement Check:
1. The 89 subjects were randomly assigned to two
groups, so we consider these independent random
samples.
2. The subjects given the $1 bill include 12 who spent it
and 34 who did not. The subjects given the quarters
include 27 who spent it and 16 who did not. All counts
are above 5, so the requirements are all met.
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Step 1: The claim that “money in large denominations is
less likely to be spent” can be expressed as p1 < p2.
Step 2: If p1 < p2 is false, then p1 ≥ p2.
Step 3: The hypotheses can be written as:
0 1 2
1 1 2
:
:
H p p
H p p


Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Step 4: The significance level is α = 0.05.
Step 5: We will use the normal distribution to run the test
with:
1 2
12 27
ˆ ˆ
46 43
12 27
0.438202
46 43
1 1 0.438202 0.561798
p p
p
q p
 

 

    
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Step 6: Calculate the value of the test statistic:
     
1 2 1 2
1 2
ˆ ˆ
( ) ( )
12 27
0
46 43
0.438202 0.561798 0.438202 0.561798
46 43
3.49
p p p p
z
pq pq
n n
  


 
 
 
 


 
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Step 6: This is a left-tailed test, so the P-value is the area
to the left of the test statistic z = –3.49, or 0.0002. The
critical value is also shown below.
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Step 7: Because the P-value of 0.0002 is less than the
significance level of α = 0.05, reject the null hypothesis.
There is sufficient evidence to support the claim that
people with money in large denominations are less likely
to spend relative to people with money in smaller
denominations.
It should be noted that the subjects were all
undergraduates and care should be taken before
generalizing the results to the general population.
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
We can also construct a confidence interval to estimate
the difference between the population proportions.
Caution: The confidence interval uses standard
deviations based on estimated values of the population
proportions, and consequently, a conclusion based on a
confidence interval might be different from a conclusion
based on a hypothesis test.
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
Construct a 90% confidence interval estimate of the
difference between the two population proportions.
What does the result suggest about our claim about
people spending large denominations relative to spending
small denominations?
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
1 1 2 2
/2
1 2
ˆ ˆ ˆ ˆ
12 34 27 16
46 46 43 43
1.645
46 43
0.161387
p q p q
E z
n n

 
     
     
     
 

Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Example
1 2 1 2 1 2
1 2
1 2
ˆ ˆ ˆ ˆ
( ) ( ) ( )
0.367037 0.161387 ( ) 0.367037 0.161387
0.528 ( ) 0.206
p p E p p p p E
p p
p p
      
      
    
The confidence interval limits do not include 0, implying
that there is a significant difference between the two
proportions.
There does appear to be sufficient evidence to support the
claim that “money in large denominations is less likely to
be spent relative to an equivalent amount in many smaller
denominations.”
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Why Do the Procedures of This
Section Work?
The distribution of can be approximated by a normal distribution
with mean p1, and standard deviation:
The difference can be approximated by a normal distribution
with mean p1 – p2 and variance
The variance of the differences between two independent random
variables is the sum of their individual variances.
1
p̂
1 1 1
/
p q n
1 2
ˆ ˆ
p p

ˆ ˆ
( ) 1 2
1 2
2 2 2 1 1 2 2
ˆ ˆ
1 2
p p p p
p q p q
n n
  

   
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Why Do the Procedures of This
Section Work?
The preceding variance leads to
We now know that the distribution of is approximately normal,
with mean and standard deviation as shown above, so the z
test statistic has the form given earlier.
ˆ ˆ
( )
1 2
1 1 2 2
1 2
p p
p q p q
n n
 
 
1 2
ˆ ˆ
p p

1 2
p p

Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Why Do the Procedures of This
Section Work?
When constructing the confidence interval estimate of the difference
between two proportions, we don’t assume that the two proportions
are equal, and we estimate the standard deviation as
1 1 2 2
1 2
ˆ ˆ ˆ ˆ
p q p q
n n
  
Section 9.2-‹#›
Copyright © 2014, 2012, 2010 Pearson Education, Inc.
Why Do the Procedures of This
Section Work?
In the test statistic
use the positive and negative values of z (for two tails) and solve for
The results are the limits of the confidence interval given earlier.
1 2 1 2
1 1 2 2
1 2
ˆ ˆ
( ) ( )
ˆ ˆ ˆ ˆ
p p p p
z
p q p q
n n
  


1 2
p p


Chapter 9 Section 2.ppt

  • 1.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series by Mario F. Triola
  • 2.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Chapter 9 Inferences from Two Samples 9-1 Review and Preview 9-2 Two Proportions 9-3 Two Means: Independent Samples 9-4 Two Dependent Samples (Matched Pairs) 9-5 Two Variances or Standard Deviations
  • 3.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Key Concept In this section we present methods for (1) testing a claim made about two population proportions and (2) constructing a confidence interval estimate of the difference between the two population proportions. This section is based on proportions, but we can use the same methods for dealing with probabilities or the decimal equivalents of percentages.
  • 4.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. (the sample proportion) The corresponding notations apply to which come from population 2. Notation for Two Proportions For population 1, we let: = population proportion = size of the sample = number of successes in the sample 1 p 1 n 1 x 1 1 1 ˆ x p n  1 1 ˆ ˆ 1 q p   2 2 2, 2 2 ˆ ˆ , , , p n x p and q
  • 5.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc.  The pooled sample proportion is given by: Pooled Sample Proportion 1 2 1 2 x x p n n    1 q p  
  • 6.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Requirements 1. We have proportions from two independent simple random samples. 2. For each of the two samples, the number of successes is at least 5 and the number of failures is at least 5.
  • 7.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Test Statistic for Two Proportions For where (assumed in the null hypothesis) 0 1 2 : H p p  1 2 1 2 1 2 ˆ ˆ ( ) ( ) p p p p z pq pq n n      1 2 0 p p  
  • 8.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Testing Two Proportions P-value: P-values are automatically provided by technology. If technology is not available, use Table A-2. Critical values: Use Table A-2. (Based on the significance level α, find critical values by using the procedures introduced in Section 8-2 in the text.)
  • 9.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Confidence Interval Estimate of p1 – p2 1 1 2 2 /2 1 2 ˆ ˆ ˆ ˆ with margin of error p q p q E z n n    1 2 1 2 1 2 ˆ ˆ ˆ ˆ ( ) ( ) ( ) p p E p p p p E       
  • 10.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Do people having different spending habits depending on the type of money they have? 89 undergraduates were randomly assigned to two groups and were given a choice of keeping the money or buying gum or mints. The claim is that “money in large denominations is less likely to be spent relative to an equivalent amount in many smaller denominations”. Let’s test the claim at the 0.05 significance level.
  • 11.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Below are the sample data and summary statistics: Group 1 Group 2 Subjects Given $1 Bill Subjects Given 4 Quarters Spent the money x1 = 12 x2 = 27 Subjects in group n1 = 46 n2 = 43 1 2 12 27 ˆ ˆ 46 43 12 27 0.438202 46 43 p p p      
  • 12.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Requirement Check: 1. The 89 subjects were randomly assigned to two groups, so we consider these independent random samples. 2. The subjects given the $1 bill include 12 who spent it and 34 who did not. The subjects given the quarters include 27 who spent it and 16 who did not. All counts are above 5, so the requirements are all met.
  • 13.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Step 1: The claim that “money in large denominations is less likely to be spent” can be expressed as p1 < p2. Step 2: If p1 < p2 is false, then p1 ≥ p2. Step 3: The hypotheses can be written as: 0 1 2 1 1 2 : : H p p H p p  
  • 14.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Step 4: The significance level is α = 0.05. Step 5: We will use the normal distribution to run the test with: 1 2 12 27 ˆ ˆ 46 43 12 27 0.438202 46 43 1 1 0.438202 0.561798 p p p q p           
  • 15.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Step 6: Calculate the value of the test statistic:       1 2 1 2 1 2 ˆ ˆ ( ) ( ) 12 27 0 46 43 0.438202 0.561798 0.438202 0.561798 46 43 3.49 p p p p z pq pq n n                 
  • 16.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Step 6: This is a left-tailed test, so the P-value is the area to the left of the test statistic z = –3.49, or 0.0002. The critical value is also shown below.
  • 17.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Step 7: Because the P-value of 0.0002 is less than the significance level of α = 0.05, reject the null hypothesis. There is sufficient evidence to support the claim that people with money in large denominations are less likely to spend relative to people with money in smaller denominations. It should be noted that the subjects were all undergraduates and care should be taken before generalizing the results to the general population.
  • 18.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example We can also construct a confidence interval to estimate the difference between the population proportions. Caution: The confidence interval uses standard deviations based on estimated values of the population proportions, and consequently, a conclusion based on a confidence interval might be different from a conclusion based on a hypothesis test.
  • 19.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example Construct a 90% confidence interval estimate of the difference between the two population proportions. What does the result suggest about our claim about people spending large denominations relative to spending small denominations?
  • 20.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example 1 1 2 2 /2 1 2 ˆ ˆ ˆ ˆ 12 34 27 16 46 46 43 43 1.645 46 43 0.161387 p q p q E z n n                        
  • 21.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Example 1 2 1 2 1 2 1 2 1 2 ˆ ˆ ˆ ˆ ( ) ( ) ( ) 0.367037 0.161387 ( ) 0.367037 0.161387 0.528 ( ) 0.206 p p E p p p p E p p p p                    The confidence interval limits do not include 0, implying that there is a significant difference between the two proportions. There does appear to be sufficient evidence to support the claim that “money in large denominations is less likely to be spent relative to an equivalent amount in many smaller denominations.”
  • 22.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Why Do the Procedures of This Section Work? The distribution of can be approximated by a normal distribution with mean p1, and standard deviation: The difference can be approximated by a normal distribution with mean p1 – p2 and variance The variance of the differences between two independent random variables is the sum of their individual variances. 1 p̂ 1 1 1 / p q n 1 2 ˆ ˆ p p  ˆ ˆ ( ) 1 2 1 2 2 2 2 1 1 2 2 ˆ ˆ 1 2 p p p p p q p q n n        
  • 23.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Why Do the Procedures of This Section Work? The preceding variance leads to We now know that the distribution of is approximately normal, with mean and standard deviation as shown above, so the z test statistic has the form given earlier. ˆ ˆ ( ) 1 2 1 1 2 2 1 2 p p p q p q n n     1 2 ˆ ˆ p p  1 2 p p 
  • 24.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Why Do the Procedures of This Section Work? When constructing the confidence interval estimate of the difference between two proportions, we don’t assume that the two proportions are equal, and we estimate the standard deviation as 1 1 2 2 1 2 ˆ ˆ ˆ ˆ p q p q n n   
  • 25.
    Section 9.2-‹#› Copyright ©2014, 2012, 2010 Pearson Education, Inc. Why Do the Procedures of This Section Work? In the test statistic use the positive and negative values of z (for two tails) and solve for The results are the limits of the confidence interval given earlier. 1 2 1 2 1 1 2 2 1 2 ˆ ˆ ( ) ( ) ˆ ˆ ˆ ˆ p p p p z p q p q n n      1 2 p p 