Chapter 10 - Lecture 5 Two Population Proportion

Outline Construction Confidence Intervals Hypothesis test procedure Type II error probabilities and sample sizes Exercises Chapter 10 - Lecture 5 Two...
Author: Jerome Flowers
9 downloads 2 Views 200KB Size
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: Z=r

I

pˆ1 − pˆ2 − (p1 − p2 ) p1 (1 − p1 ) p2 (1 − p2 ) + m n

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 pˆ1 (1 − pˆ1 ) pˆ2 (1 − pˆ2 ) pˆ1 − pˆ2 ± 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 : Z=r

I

pˆ1 − pˆ2 − (p1 − p2 ) pˆ1 (1 − pˆ1 ) pˆ2 (1 − pˆ2 ) + m n

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

Examples

Hypothesis test I I

I

Null Hypothesis: H0 : p1 = p2 pˆ1 − pˆ2 − 0 Test statistic: z = s   1 1 + pˆ(1 − pˆ) m n Rejection Regions: I I I

I I

z ≥ zα if HA : p1 > p2 z ≤ −zα if HA : p1 < p2 z ≤ −zα/2 and z ≥ zα/2 if HA : p1 6= p2

Conditions: This test is used only if mˆ p1 ≥ 10, m(1 − pˆ1 ) ≥ 10, nˆ p2 ≥ 10, n(1 − pˆ2 ) ≥ 10 Note that: X +Y m n = pˆ1 + pˆ2 pˆ = m+n m+n 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

Examples

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 Hypothesis test procedure Type II error probabilities and sample sizes Exercises

Examples

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 Confidence Intervals Hypothesis test procedure Type II error probabilities and sample sizes Exercises

Type II error Sample sizes Examples

Some notation issues

I

First of all note that: p¯ =

n m 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 Confidence Intervals Hypothesis test procedure Type II error probabilities and sample sizes Exercises

Type II error Sample sizes Examples

Type II error probability if HA : p1 − p2 > 0



s

zα   β(p1 , p2 ) = P  z < 

Andreas Artemiou

p¯q¯



1 1 + m n σ



 − (p1 − p2 )     

Chapter 10 - Lecture 5 Two Population Proportion

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

Type II error Sample sizes Examples

Type II error probability if HA : p1 − p2 < 0

 −zα   β(p1 , p2 ) = 1 − P  z < 

Andreas Artemiou

s



p¯q¯

1 1 + m n σ



 − (p1 − p2 )     

Chapter 10 - Lecture 5 Two Population Proportion

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

Type II error Sample sizes Examples

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

s

 zα/2   β(p1 , p2 ) = P  z <  

−zα/2   P z < 

Andreas Artemiou



p¯q¯

1 1 + m n σ

s



p¯q¯

1 1 + m n σ





− (p1 − p2 )   −   

 − (p1 − p2 )     

Chapter 10 - Lecture 5 Two Population Proportion

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

Type II error Sample sizes Examples

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: 2  q √ (p1 +p2 )(q1 +q2 ) + zβ p1 q1 + p2 q2 zα 2 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 Confidence Intervals Hypothesis test procedure Type II error probabilities and sample sizes Exercises

Type II error Sample sizes Examples

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 Confidence Intervals Hypothesis test procedure Type II error probabilities and sample sizes Exercises

Type II error Sample sizes Examples

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