34
M35 C.I. for proportions Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 1 Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

Embed Size (px)

Citation preview

Page 1: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 1 Department of ISM, University of Alabama, 1995-2003

Proportions

How do “polls” work and what do they tell you?

Page 2: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 2 Department of ISM, University of Alabama, 1995-2003

Objectives

Create confidence intervals for estimating a true population proportion.

Learn how to use a CI for the“difference of two proportions” to test for independence of twocategorical variables.

Page 3: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 3 Department of ISM, University of Alabama, 1995-2003

X = binary variable.

= proportion in the population having the trait.

Population

Sample

Statistical Inference for Proportions

p = proportion in sample having trait.

n = sample size.

^

Page 4: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 4 Department of ISM, University of Alabama, 1995-2003

X = a count of the number of successes in “n” trials.

= the proportion of successes.

= Xn = “batting average”

Binomial Distribution involved

“counts.”

Now change the “count” to

“proportion” of successes.

p

Page 5: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 5 Department of ISM, University of Alabama, 1995-2003

For the population of all possible sample proportions:

the standard deviation is

(1- )

np =

and the distribution is approximately Normal.

p =

the mean is

Page 6: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

0 2 4 6 8 10 12 14 16 18 20 22 X

X = count of successes in n trials.X ~ Bino( n = 100, = 0.10)

.00 .02 .04 .06 .08 .10 .12 .14 .16 .18 .20 .22 p

p = p = ?

p = ?

^

^

p = the proportion of successes in n trials.^

Example 1.

= Xn

Page 7: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 7 Department of ISM, University of Alabama, 1995-2003

Sampling Distribution of p̂

p ~ N p = , p = ^^ (1 – )

n^[ ]

if n > 5 and n(1–) > 5;this a refinement of the n 30 rule.

The Central Limit Theorem applies because p is a sample average of n Bernoulli values!

^

Page 8: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 8 Department of ISM, University of Alabama, 1995-2003

Z 2

p (1 – p)^^

n

( if n > 5 and n(1–) > 5 )

Margin of Error in using p to estimate at (1–)100% confidence:

m.o.e. =

^

Page 9: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 9 Department of ISM, University of Alabama, 1995-2003

if n > 5 and n(1–) > 5.

(1–)100% Confidence Interval for :

m.o.e.

+–p̂ Z 2

p (1 – p)^^

n

Page 10: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 10 Department of ISM, University of Alabama, 1995-2003

Page 11: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 11 Department of ISM, University of Alabama, 1995-2003

The governor will spend more on promotion of a new program he wants passed, if fewer than 50% of registered voters support it.

In telephone survey of 200 randomly selected registered voters, 82 say they support the proposed program.

Construct a 95% confidence interval for the true proportion of ALL voterswho support the proposed program.

Example 2:

Page 12: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 12 Department of ISM, University of Alabama, 1995-2003

95% confidence interval for p:

+– Z 2

p^ p (1 – p)^^

n

p̂ = sample proportion = 82 / 200 = .41

Example 2.

Page 13: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 13 Department of ISM, University of Alabama, 1995-2003

What can be concluded from this telephone survey?

The value of concern is 50%. Why?

The CI is .342 to .478.

.50 is NOT in this CI; therefore,

.50 is not a plausible value.

Less than 50% of the registered voters support the proposedprogram; therefore, spend more on promotion.

Example 2.

Page 14: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35 C.I. for proportions 14 Department of ISM, University of Alabama, 1995-2003

Page 15: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

Random exit poll results: Random exit poll results: Sue Ellen: Sue Ellen: 462 462 votes of 900. votes of 900.

Election night; Birmingham;Election night; Birmingham;two candidates for mayor.two candidates for mayor.Election night; Birmingham;Election night; Birmingham;two candidates for mayor.two candidates for mayor.

Can we declare Sue Ellen the winnerCan we declare Sue Ellen the winnerat the .05 level of significance?at the .05 level of significance?

Hypothesized value is p = .50; Hypothesized value is p = .50; no favoriteno favorite. .

m.o.e. = m.o.e. =

pp̂̂ = .5133= .5133

.5133 * .4867.5133 * .4867 900 900

= .03266= .032661.96 1.96

Example 3.

Page 16: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 16 Department of ISM, University of Alabama, 1995-2002

Construct 95% CI:Construct 95% CI:

p ± m.o.e. p ± m.o.e. ^̂

.51333 ± .03266.51333 ± .03266

The 95% CI is .48067 to .54599. The 95% CI is .48067 to .54599.

““I am 95% confident that the trueI am 95% confident that the trueproportion of votes cast for Sue Ellenproportion of votes cast for Sue Ellenin the Birmingham mayoral election in the Birmingham mayoral election falls between .4807 and .5460.falls between .4807 and .5460.

““I am 95% confident that the trueI am 95% confident that the trueproportion of votes cast for Sue Ellenproportion of votes cast for Sue Ellenin the Birmingham mayoral election in the Birmingham mayoral election falls between .4807 and .5460.falls between .4807 and .5460.

Statement in L.O.P:Statement in L.O.P:

Example 3.

Page 17: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 17 Department of ISM, University of Alabama, 1995-2002

Decision:

Does the “hypothesized value” Does the “hypothesized value” fall in the CI? fall in the CI?

Therefore, .50 Therefore, .50 a plausible value; a plausible value;

so the election is so the election is “too close to call”“too close to call”

at the .05 level of significance.at the .05 level of significance...

Example 3.

Page 18: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 18 Department of ISM, University of Alabama, 1995-2002

Page 19: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 19 Department of ISM, University of Alabama, 1995-2002

How many votes out of 900 did How many votes out of 900 did she need to be declared the winner?she need to be declared the winner?

Use Excel to see . . . .Use Excel to see . . . .

Example 3.

Page 20: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

95% Confidence Intervals for p:95% Confidence Intervals for p:95% Confidence Intervals for p:95% Confidence Intervals for p:

X p-hat m.o.e. lower upper

478 0.53111 0.03260 0.49851 0.56371

479 0.53222 0.03260 0.49962 0.56482

480 0.53333 0.03259 0.50074 0.56593

481 0.53444 0.03259 0.50186 0.56703

n = 900n = 900

53.33% is enough to be53.33% is enough to bedeclared the winner,declared the winner,at the .05 level of significance!at the .05 level of significance!

“What if” values of X

Page 21: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 21 Department of ISM, University of Alabama, 1995-2002

In a survey about banking services, In a survey about banking services, responses were categorized by responses were categorized by ageage and and “opinion of services.”“opinion of services.”

Of the 104 respondents that were 30 years Of the 104 respondents that were 30 years or less, 93 stated that the services were or less, 93 stated that the services were “excellent or good.” “excellent or good.”

Of the 46 that were over 30, 36 stated that Of the 46 that were over 30, 36 stated that the services were “excellent or good.” the services were “excellent or good.”

Is there a dependence between Is there a dependence between ageage and and “opinion of services”“opinion of services”??

Example 4.

Page 22: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 22 Department of ISM, University of Alabama, 1995-2002

9393 1111 104104

3636 1010 4646

129129 2121 150150

AgeAge

30 or less30 or less

Over 30Over 30

ServiceService

ExcellentExcellentor Goodor Good

Acceptable Acceptable or Pooror Poor

TotalTotal

TotalTotal

Example 4.

Page 23: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 23 Department of ISM, University of Alabama, 1995-2002

pp11 = P( “Excel or Good” | = P( “Excel or Good” | 30 or less30 or less))

= = .894.894 9393104104==

pp22 = P( “Excel or Good” | = P( “Excel or Good” | over 30over 30))

= = .783.783 3636 4646==

Are these conditional probabilitiesAre these conditional probabilities“far enough apart” to call the true “far enough apart” to call the true population proportions different?population proportions different?

Conditional probabilities:Conditional probabilities:

Page 24: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

Margin of Error for pMargin of Error for p11- p- p22::

pp11 (1 - p (1 - p11))

nn11

pp22 (1 - p (1 - p22))

nn22

++ZZ/2/2m.o.e.=m.o.e.=

For 95% confidence:For 95% confidence:

(.783)(.217)(.783)(.217)

4646

(.894)(.106)(.894)(.106)

104104++ 1.961.96m.o.e.=m.o.e.=

= 1.96 (.06786)= 1.96 (.06786) = = .1330.1330

Example 4.

Page 25: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 25 Department of ISM, University of Alabama, 1995-2002

95% Confidence Interval for the95% Confidence Interval for the difference of two proportions: difference of two proportions:

pp11- p- p22++ m.o.e.m.o.e.

(.894 - .783) (.894 - .783) + .1330+ .1330..111111 + .1330+ .1330

( -.0220, + .2440 )( -.0220, + .2440 )

Example 4.

Page 26: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 26 Department of ISM, University of Alabama, 1995-2002

Does “zero” fall inside Does “zero” fall inside this confidence interval?this confidence interval?

Then Then “zero” is“zero” is a a plausibleplausible value valuefor the difference of the twofor the difference of the twoproportions.proportions.

Therefore, the Therefore, the evidence is not strongevidence is not strongenough to say a dependence exists.enough to say a dependence exists.

( -.0220, + .2440 )( -.0220, + .2440 )

Example 4.

Page 27: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 27 Department of ISM, University of Alabama, 1995-2002

Conclusion:Conclusion:

““Age” and “opinion of service”Age” and “opinion of service”may bemay be independent, independent,

at the at the 95% confidence level95% confidence level, ,

or or

at the at the 5% level of significance5% level of significance..

Example 4.

Page 28: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 28 Department of ISM, University of Alabama, 1995-2002

The two The two SAMPLE proportionsSAMPLE proportions,,

P( “Excel or Good” | P( “Excel or Good” | 30 or less30 or less) = ) = .894.894P( “Excel or Good” | P( “Excel or Good” | over 30over 30) = ) = .783.783

are “too close” together to are “too close” together to conclude that the corresponding conclude that the corresponding POPULATION proportions POPULATION proportions are different.are different.

Example 4.

Page 29: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 29 Department of ISM, University of Alabama, 1995-2002

Sample Size for Estimating

Problem: What sample size is needed to have a margin or error less than E at (1–)100% confidence?

n m.o.e. = z / 2 < E

n > z / 2

E

2

Page 30: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 30 Department of ISM, University of Alabama, 1995-2002

What sample size is needed to estimate the mean “actual mpg” with an m.o.e. of 0.2 mpg with 90%confidence for Honda Accords if the pop. std. dev. is 0.88 mpg?

m.o.e. = Z n

2

0.2 = 1.645 0.88n

n =1.6452 0.882

0.22 = 52.39

Recall

Page 31: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 31 Department of ISM, University of Alabama, 1995-2002

What if What if is unknown? is unknown?

Use a conservative guess (high).

Use s from a pilot study.

Use a very rough guess of

such as H – L4

Page 32: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 32 Department of ISM, University of Alabama, 1995-2002

Sample Size for Estimating Proportions:

What sample size is needed to have a margin or error for estimating p less than “E” at (1–)100% confidence?

m.o.e. = E = Z 2

p (1 – p)^^

n

n =z/ 2

E

2 p (1 – p)^^

2

Page 33: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 33 Department of ISM, University of Alabama, 1995-2002

But we don’t know p before we But we don’t know p before we take the sample!take the sample!

Use a conservative guess(one that results in a larger n.)

= .5 is the most conservative.

Values close to .5 are more conservative than those near 0 or 1.

If you know that the true should bebetween .20 and .30, then use .30.

^

Page 34: M35 C.I. for proportions 1  Department of ISM, University of Alabama, 1995-2003 Proportions How do “polls” work and what do they tell you?

M35- C.I. for proportions 34 Department of ISM, University of Alabama, 1995-2002

Example 5: What is the smallest sample size necessary to estimate proportion of defective parts to within .02 with 95% confidence if is known to not exceed 4%?