Вы находитесь на странице: 1из 18

Outline

Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Chapter 10 - Lecture 5
Two Population Proportion

Andreas Artemiou

March 29th, 2010

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Construction

Confidence Intervals

Hypothesis test procedure


Examples

Type II error probabilities and sample sizes


Type II error
Sample sizes
Examples

Exercises

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Review

I Until now we have seen how we make inference on two sample


means
I In this lecture we will learn how to make inference on two
sample proportions.
I Assume X Bin(m, p1 ) and Y Bin(n, p2 ).
I We will see only the test that uses the normal approximation.

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Construction

I What is a natural estimator for p1 p2 ?

I What is the distribution of the estimator using the normal


approximation to binomial?

I Under which conditions, this approximation is valid?

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Construction

I The result on the previous slide suggest that we can use as


starting point for creating confidence intervals:

p1 p2 (p1 p2 )
Z=r
p1 (1 p1 ) p2 (1 p2 )
+
m n
I This is not true. Why?

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Construction

I Based on the discussion before that means the (1 )100%


Confidence Interval:
r
p1 (1 p1 ) p2 (1 p2 )
p1 p2 z/2 +
m n

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Construction

I The result on the previous slide suggest that we can use as


test statistic for testing H0 : p1 = p2 :

p1 p2 (p1 p2 )
Z=r
p1 (1 p1 ) p2 (1 p2 )
+
m n
I This is not true. Why?

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Examples
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Hypothesis test
I Null Hypothesis: H0 : p1 = p2
p1 p2 0
I Test statistic: z = s  
1 1
p(1 p) +
m n
I Rejection Regions:
I z z if HA : p1 > p2
I z z if HA : p1 < p2
I z z/2 and z z/2 if HA : p1 6= p2
I Conditions: This test is used only if
p1 10, m(1 p1 ) 10, n
m p2 10, n(1 p2 ) 10
I Note that:
X +Y m n
p = = p1 + p2
m+n m+n m+n
Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion
Outline
Construction
Confidence Intervals
Examples
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Example

I I want to see if there is a difference between the proportion of


male students and female students that have more than 19
credits this semester at PSU. I randomly select 400 male
students, and 42 say that they have more than 19 credits,
while from 320 female students 30 admitted in having more
than 19 credits this semester. Find a 99% Confidence Interval
for the difference between the two proportions.

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Examples
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Example

I In the previous example perform a hypothesis test to see if


there is any difference at significance level 0.02.

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Type II error
Confidence Intervals
Sample sizes
Hypothesis test procedure
Examples
Type II error probabilities and sample sizes
Exercises

Some notation issues

I First of all note that:


m n
p = p1 + p2
m+n m+n
q = 1 p
r
p1 (1 p1 ) p2 (1 p2 )
= +
m n

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Type II error
Confidence Intervals
Sample sizes
Hypothesis test procedure
Examples
Type II error probabilities and sample sizes
Exercises

Type II error probability if HA : p1 p2 > 0

s  
1 1
z pq + (p1 p2 )
m n


(p1 , p2 ) = P
z <


Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Type II error
Confidence Intervals
Sample sizes
Hypothesis test procedure
Examples
Type II error probabilities and sample sizes
Exercises

Type II error probability if HA : p1 p2 < 0

s  
1 1
z pq + (p1 p2 )
m n


(p1 , p2 ) = 1 P
z <


Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Type II error
Confidence Intervals
Sample sizes
Hypothesis test procedure
Examples
Type II error probabilities and sample sizes
Exercises

Type II error probability if HA : p1 p2 6= 0

s  
1 1
z/2 pq + (p1 p2 )
m n


(p1 , p2 ) = P
z <

s  
1 1
z/2 pq + (p1 p2 )
m n


P
z <


Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Type II error
Confidence Intervals
Sample sizes
Hypothesis test procedure
Examples
Type II error probabilities and sample sizes
Exercises

Sample Size

I If we want to achieve a certain Type II Error probability


(p1 , p2 ) for a test of size then for the one sided test:
 q 2
(p1 +p2 )(q1 +q2 )
z 2 + z p1 q1 + p2 q2
n=m=
(p1 p2 )2
I q1 = 1 p1 , q2 = 1 p2 .
I For the two sided tests we replace with /2

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Type II error
Confidence Intervals
Sample sizes
Hypothesis test procedure
Examples
Type II error probabilities and sample sizes
Exercises

Example

I I want to see if there is a difference between the proportion of


male students and female students that have more than 19
credits this semester at PSU. I randomly select 400 male
students, and 42 say that they have more than 19 credits,
while from 320 female students 30 admitted in having more
than 19 credits this semester. Find the Type II error if I know
that the true proportion for males is 10% and the true
proportion for females is 9% for the test with size 0.02.

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Type II error
Confidence Intervals
Sample sizes
Hypothesis test procedure
Examples
Type II error probabilities and sample sizes
Exercises

Example

I In the previous example find the sample size that we need to


have if the we want to reduce the probability of Type II error
to 0.3.

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion


Outline
Construction
Confidence Intervals
Hypothesis test procedure
Type II error probabilities and sample sizes
Exercises

Exercises

I Section 10.4 page 513


I Exercises 48, 49, 50, 51, 52, 53, 56, 57, 58, 59.

Andreas Artemiou Chapter 10 - Lecture 5 Two Population Proportion

Вам также может понравиться