Sie sind auf Seite 1von 28

Stat250GundersonLectureNotes

5:LearningaboutaPopulationProportion

Part1:DistributionforaSampleProportion

Tobeastatisticianisgreat!!Youneverhavetobe"absolutelysure"ofsomething.
Being"reasonablycertain"isenough!
PavelE.Guarisma,NorthCarolinaStateUniversity

Recall:Parameters,Statistics,andStatisticalInference

Somedistinctionstokeepinmind:
PopulationversusSample
ParameterversusStatistic
Populationproportion p versussampleproportion p

Populationmean versussamplemean X

Sincewehardlyeverknowthetruepopulationparametervalue,wetakeasampleandusethe
samplestatistictoestimatetheparameter.Whenwedothis,thesamplestatisticmaynotbe
equaltothepopulationparameter,infact,itcouldchangeeverytimewetakeanewsample.
Willtheobservedsamplestatisticvaluebeareasonableestimate?IfoursampleisaRANDOM
SAMPLE,thenwewillbeabletosaysomethingabouttheaccuracyoftheestimationprocess.

StatisticalInference:theuseofsampledatatomakejudgmentsordecisionsaboutpopulations.

Thetwomostcommonstatisticalinferenceproceduresareconfidenceintervalestimationand
hypothesistesting.
Confidence Interval Estimation: A confidence interval is a range of values that the
researcher is fairly confident will cover the true, unknown value of the population
parameter. In other words, we use a confidence interval to estimate the value of a
populationparameter.Wehavealreadyencounteredtheideaofamarginoferrorand
usingittoformaconfidenceintervalforapopulationproportion.
HypothesisTesting:Hypothesistestingusessampledatatoattempttorejectahypothesis
aboutthepopulation.Usuallyresearcherswanttorejectthenotionthatchancealone
canexplainthesampleresults.Hypothesistestingisappliedtopopulationparametersby
specifying a null value for the parametera value that would indicate that nothing of
interestishappening.Hypothesistestingproceedsbyobtainingasample,computinga
sample statistic, and assessing how unlikely the sample statistic would be if the null
parametervaluewerecorrect.Inmostcases,theresearchersaretryingtoshowthatthe
nullvalueisnotcorrect.Achievingstatisticalsignificanceisequivalenttorejectingthe
ideathattheobservedresultsareplausibleifthenullvalueiscorrect.

65

AnOverviewofSamplingDistributions
The value of a statistic from a random sample will vary from sample to sample. So
a statistic is a random variable and it will have a probability distribution. This probability
distributioniscalledthesamplingdistributionofthestatistic.

Definition:
Thedistributionofallpossiblevaluesofastatisticforrepeatedsamplesofthesamesizefroma
populationiscalledthesamplingdistributionofthestatistic.

We will study the sampling distribution of various statistics, many of which will have
approximately normal distributions. The general structure of the sampling distribution is the
sameforeachofthefivescenarios.Thesamplingdistributionresults,alongwiththeideasof
probability and random sample, play a vital role in the inference methods that we continue
studyingthroughouttheremainderofthecourse.

SamplingDistributionsforOneSampleProportion
Many responses of interest produce counts rather than measurements sex (male, female),
politicalpreference(republican,democrat),approveofnewproposal(yes,no).Wewanttolearn
aboutapopulationproportionandwewilldosousingtheinformationprovidedfromasample
fromthepopulation.

Example:Doyouworkmorethan40hoursperweek?
ApollwasconductedbyTheHeldrichCenterforWorkforceDevelopment(atRutgersUniversity).
Aprobabilitysampleof1000workersresultedin460(for46%)statingtheyworkmorethan40
hoursperweek.

Population=allfulltimeworkersintheU.S.

Parameter=p=proportioninthepopulationthatwork>40hoursperweek(unknown)

Sample=the1000workerspolled(andtheirresponses)

Statistic=phat=proportioninthesamplethatwork>40hoursperweek=0.46
(knownoncethesampleisselected)

Can anyone say how close this observed sample proportion p is to the true population
proportion p ?No

Ifweweretotakeanotherrandomsampleofthesamesize n 1000 ,wouldwegetthesame


valueforthesampleproportion p ?ProbablyNOT

Sowhatarethepossiblevaluesforthesampleproportion p ifwetookmanyrandomsamples
ofthesamesizefromthispopulation?Whatwouldthedistributionofthepossible p valueslook
like?Whatisthesamplingdistributionof p ?

66

Aside:CanyouVisualizeIt?
Considertakingyouronerandomsampleofsizenandcomputingyourone p value.(Asinthe
previousexample,ourone p =460/1000=0.46.)Supposewedidtakeanotherrandomsample
ofthesamesize,wewouldgetanothervalueof p ,say__420/1000=0.42_.Nowrepeatthat
processoverandover;takingonerandomsampleafteranother;resultinginone p valueafter
another.

Examplepictureshowingthepossiblevalueswhenn=__1000_____

0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1 p values

Observations:Thevaluesdovary,followingapproximatelyabellshapedmodel.

Howwouldthingschangeifthesamplesizenwereevenlarger,sayn=_2000_?Supposeour
firstsampleproportionturnedouttobe p =_900/2000=0.45_.Nowimagineagainrepeating
that process over and over; taking one random sample after another; resulting in many p
possiblevalues.

Examplepictureshowingthepossiblevalueswhenn=_2000__

0
0.1
0.2
0.3
0.4
0.5

0.6

0.7

0.8

0.9

1 p values

Observations:Thevaluesagaindovary,followingapproximatelyabellshapedmodel,but
thespread(orvariation)isless(sincewetookalargersamplesize,ourestimatesvaryless).

67

Letstakeacloserlookatthesampleproportion p .Thesampleproportionisfoundbytaking
thenumberofsuccessesinthesampleanddividingbythesamplesize.Sothecountvariable
Xofthenumberofsuccessesisdirectlyrelatedtotheproportionofsuccessesas p Xn .

Earlier we studied the distribution of our first statistic, the count statistic X (the number of
successesinnindependenttrialswhentheprobabilityofasuccesswasp).Welearnedaboutits
exactdistributioncalledtheBinomialDistribution.Wealsolearnedwhenthesamplesizenwas
large,thedistributionofXcouldbeapproximatedwithanormaldistribution.

NormalApproximationtotheBinomialDistribution

IfXisabinomialrandomvariablebasedonntrialswithsuccessprobabilityp,andnislarge,then
therandomvariableXisalsoapproximately N np , np (1 p ) .

Conditions:Theapproximationworkswellwhenbothnpandn(1p)areatleast10.

So any probability question about a sample proportion could be converted to a probability


questionaboutasamplecount,andviceversa.

If n is small, we would need to convert the question to a count and use the binomial
distributiontoworkitout.

Ifnislarge,wecouldconvertthequestiontoacountandusethenormalapproximationfor
acount,ORusearelatednormalapproximationforasampleproportion(forlargen).

TheStat250formulacardsummarizesthisrelatednormalapproximationasfollows:

LetsputthisresulttoworkinournextTryIt!Problem.

68

TryIt!DoAmericansreallyvotewhentheysaytheydo?
Toanswerthisquestion,atelephonepollwastakentwodaysanelection.Fromthe800adults
polled,56%reportedthattheyhadvoted.However,itwaslaterreportedinthepressthat,in
fact,only39%ofAmericanadultshadvoted.Supposethe39%ratereportedbythepressis
thecorrectpopulationproportion.Alsoassumetheresponsesofthe800adultspolledcanbe
viewedasarandomsample.Notethatinthiscasewedohappentoknowthatp=0.39.

a. Sketchthesamplingdistributionof p forarandomsampleofsizen=800adults.

p isapproximately

(youcandrawitheretoo)

0.39(1 0.39)
N 0.39,0.017 .
N 0.39,

800

b.Whatistheapproximateprobabilitythatasampleproportionwhovotedwouldbe56%or
largerforarandomsampleof800adults?

Use the picture in (a) to sketch and shade what you are trying to find
here.

0.56 0.39

P p 0.56 P Z
P Z 10 0
0.017

c. Doesitseemthatthepollresultof56%simplyreflectsasamplethat,bychance,votedwith
greaterfrequencythanthegeneralpopulation?

No,itappearsthatrespondentswerentalltellingthetruth.

MoreontheStandardDeviationof p

p (1 p )
Thestandarddeviationof p isgivenby:s.d.( p )=

n
Thisquantitywouldgiveusanideaabouthowfarapartasampleproportion p andthetrue
populationproportionparelikelytobe.

Wecaninterpretthisstandarddeviationasapproximatelytheaveragedistanceofthepossible
p values(forrepeatedsamplesofthesamesizen)fromthetruepopulationproportionp.

Inpracticewhenwetakearandomsamplefromalargepopulation,weonlyknowthesample
proportion.Wegenerallywouldnotknowthetruepopulationproportionp.Sowecouldnot
computethestandarddeviationof p .

69

Howeverwecanusethesampleproportionintheformulatohaveanestimateofthestandard
deviation,whichiscalledthestandarderrorof p .

p (1 p )
Thestandarderrorof p isgivenby:s.e.( p )=

n
Thisquantityisanestimateofthestandarddeviationof p .

Sowecaninterpretthisstandarderrorasestimating,approximately,theaveragedistanceof
the possible p values (for repeated samples of the same size n) from the true population
proportionp.

Moreover,wecanusethisstandarderrortocreatearangeofvaluesthatweareveryconfident
willcontainthetrueproportionp,namely, p (afew)s.e.( p ).

Thisisthebasisforconfidenceintervalforthetrueproportionp,discussednext

TryIt!Loveatfirstsight?
Inarandomsampleofn=500adults,300statedtheybelieveinloveatfirstsight.
a. Estimatethepopulationproportionofadultsthatbelieveinloveatfirstsight.

p = 300/500 = 0.6 or 60%

b. Findthecorrespondingstandarderroroffortheestimateinpartaandusethisstandarderror
toprovideanintervalestimateforthepopulationproportionp,with95%confidence.

p (1 p )
0.6(1 0.6)

0.022
s.e.( p )=
n
500

For95%wewouldgoout2stddevs,soletsgoout2s.e.eachway

From(0.62*0.022=)0.556to(0.6+2*0.022=)0.644;or55.6%to64.4%.

Evidenceofamajority?

70

Stat250GundersonLectureNotes
5:LearningaboutaPopulationProportion

Part2:EstimatingProportionswithConfidence

BigIdeaofConfidenceIntervals:Usesampledatatoestimateapopulationparameter.

Recallsomeofthelanguageandnotationassociatedwiththeestimationprocess.

PopulationandPopulationParameter
SampleandSampleStatistic(sampleestimateorpointestimate)

Thesampleestimateprovidesourbestguessastowhatisthevalueofthepopulationparameter,
butitisnot100%accurate.

Thevalueofthesampleestimatewillvaryfromonesampletothenext.Thevaluesoftenvary
around the population parameterand the standard deviation give an idea about how far the
sampleestimatestendtobefromthetruepopulationproportiononaverage.

Thestandarderrorofthesampleestimateprovidesanideaofhowfarawayitwouldtendto
varyfromtheparametervalue(onaverage).

Thegeneralformatforaconfidenceintervalestimateisgivenby:
Sampleestimate(afew)standarderrors

The few or number of standard errors we go out each way from the sample estimate will
dependonhowconfidentwewanttobe.

Thehowconfidentwewanttobeisreferredtoastheconfidencelevel.Thislevelreflectshow
confidentweareintheprocedure.Mostoftheintervalsthataremadewillcontainthetruth
aboutthepopulation,butoccasionallyanintervalwillbeproducedthatdoesnotcontainthetrue
parameter value. Each interval either contains the population parameter or it doesnt. The
confidencelevelisthepercentageofthetimeweexpecttheproceduretoproduceaninterval
thatdoescontainthepopulationparameter.

ConfidenceIntervalforaPopulationProportionp
Goal:wewanttolearnaboutapopulationproportion p .How?Wetakearandomsamplefrom
thepopulationandestimatepwiththeresultingsampleproportion p .Letsfirstrecallhow
those many possible values for the sample proportion would vary, that is, the sampling
distributionofthestatistic p .

71

SamplingDistributionof p :Ifthesamplesizenislargeand np 10 and n(1 p ) 10 ,

then p isapproximately N p,

p(1 p )
.
n

N(
N p,

Density

p,(1 p)

95%

1. Considerthefollowingintervalorrangeofvaluesandshowitonthepicture.
p 1 p
p 1 p
p 1 p

p2
p2
,p2
n

2. Whatistheprobabilitythata(yettobecomputed)sampleproportion p willbeinthis
interval(within2standarddeviationsfromthetrueproportionp)?95%

3. Takeapossiblesampleproportion p andconsidertheinterval
p 1 p
p 1 p
p 1 p

p 2
, p 2
n
n
n

p 2

Showthisrangeonthenormaldistributionpictureabove.

4. Didyourfirstintervalaroundyourfirst p containthetrueproportionp?
Wasitagoodinterval?___ YES____

5. Repeatsteps3and4forotherpossiblevaluesof p .Howoftenwouldyouexpecttogetan
intervalthatdoescontainthepopulationproportionp?

72

BigIdea:

Considerallpossiblerandomsamplesofthesamelargesizen.
Eachpossiblerandomsampleprovidesapossiblesampleproportionvalue.
Ifwemadeahistogramofallofthesepossible p valuesitwouldlooklikethenormal
distributiononthepreviouspage.
About95%ofthepossiblesampleproportion p valueswillbeintheinterval
p1 p ;andforeachoneofthesesampleproportion p
values,theinterval
n
p1 p willcontainthepopulationproportionp.
p2
n
Thusabout95%oftheintervals p 2 p1 p willcontainthepopulationproportionp.
n
p2

Thus,aninitial95%confidenceintervalforthetrueproportionpisgivenby:

p 2

p1 p

TheDilemma: Whenwetakeouronerandomsample,wecancomputethesample
proportion p ,butwecantconstructtheinterval p 2

p1 p

becausewedontknowthevalueofp.

TheSolution: Replacethevalueofpinthestandarddeviationwiththeestimate p ,

thatisuse

p 1 p
calledthestandarderrorofphat
n

Anapproximate95%confidenceinterval(CI)forthepopulationproportionpis:

p 2

p (1 p )
n

Note:Thepartoftheinterval 2

p (1 p )
iscalledthe95%marginoferror.
n

Note: Theapproximateisduetothemultiplierof2beingused.
Wewilllearnaboutothermultipliers,includingtheexact95%multipliervaluelater.

73

TryIt!GettingAlongwithParents
InaGallupYouthSurveyn=501randomlyselectedAmericanteenagerswereaskedabouthow
welltheygetalongwiththeirparents.Onesurveyresultwasthat54%ofthesamplesaidthey
getalongVERYWELLwiththeirparents.

a. The sample proportion was found to be 0.54. Give the standard error for the sample
proportionanduseittocompletethesentencethatinterpretsthestandarderrorintermsof
anaveragedistance.

SE(phat)=

p 1 p
0.541 0.54

0.0004958 =0.022
n
501

Wewouldestimatetheaveragedistancebetweenthepossiblephat values

(fromrepeatedsamples)andtruepopulationproportionp tobeabout0.022.

b. Computea95%confidenceintervalforthepopulationproportionofteenagersthatgetalong
verywellwiththeirparents.

p 1 p
0.54 2(0.022) 0.54 0.044
n
(0.496,0.584)
p 2

c. Fillintheblanksforthetypicalinterpretationoftheconfidenceintervalinpartb:

Basedonthissample,with95%confidence,wewouldestimatethat

somewherebetween_49.6%_and_58.4%_ofallAmericanteenagersthinktheyget

alongverywellwiththeirparents.

d. Canwesaytheprobabilitythattheabove(alreadyobserved)interval
(__49.6%__,__58.4%__)containsthepopulationproportionpis0.95?

Thatis,canwesay

P(_ 0.496 _ p _ 0.584 _) 0.95 ?

e. Canwesaythat95%ofthetimethepopulationproportionpwillbeintheintervalcomputed
inpartb?NO,eitherpisintheparticularintervaloritisnot!

74

Justwhatdoesthe95%confidencelevelmean?Interpretation
The phrase confidence level is used to describe the likeliness or chance that a yettobe
constructed interval will actually contain the true population value However, we have to be
carefulabouthowtointerpretthislevelofconfidenceifwehavealreadycompletedourinterval.

Thepopulationproportionpisnotarandomquantity,itdoesnotvaryoncewehavelooked
(computed) the actual interval, we cannot talk about probability or chance for this particular
interval anymore. The 95% confidence level applies to the procedure, not to an individual
interval;itappliesbeforeyoulookandnotafteryoulookatyourdataandcomputeyour
interval.

TryIt!GettingAlongwithParents
InthepreviousTryIt!youcomputeda95%confidenceintervalforthepopulationproportionof
teenagersthatgetalongverywellwiththeirparentsinpart(b).Thiswasbasedonarandom
sampleofn=501Americanteenagers.Youinterpretedtheintervalinpart(c).Writeasentence
ortwothatinterpretstheconfidencelevel.

Theintervalwefoundwascomputedwithamethodwhichifrepeatedoverandover...

Repeating=takinganotherr.s.of
thesamesizen=501andgetting
theCIforthatsample

wouldgeneratemanypossibleconfidenceintervalsforp.Wewouldexpectabout
95%oftheseintervalstocontainthetruepopulationproportionofteenagersthat
getalongverywellwithparents.

TryIt!CompletingaGraduateDegree
A researcher has taken a random sample of n = 100 recent college graduates and recorded
whetherornotthestudentcompletedtheirdegreein5yearsorless.Basedonthesedata,a
95%confidenceintervalforthepopulationproportionofallcollegestudentsthatcompletetheir
degreein5yearsorlessiscomputedtobe(0.62,0.80).
a. Howmanyofthe100sampledcollegegraduatescompletedtheirdegreein5yearsorless?
Thesampleproportionisthemidpointof0.71,so71%of100is71.

b. Whichofthefollowingstatementsgivesavalidinterpretationofthis95%confidencelevel?
Circleallthatarevalid.

i. Thereisabouta95%chancethatthe populationproportionofstudentswhohavecompleted
theirdegreein5yearsorlessisbetween0.62and0.80.

ii. Ifthesamplingprocedurewererepeatedmanytimes,thenapproximately95%oftheresulting
confidenceintervalswouldcontainthepopulationproportionofstudentswhohavecompleted
theirdegreein5yearsorless.

iii. Theprobabilitythatthepopulationproportionpfallsbetween0.62and0.80is0.95forrepeated
samplesofthesamesizefromthesamepopulation.

75

WhataboutthatMultiplierof2?
Theexactmultiplierofthestandarderrorfora95%confidencelevel
wouldbe1.96,whichwasroundedtothevalueof2.Wheredoes
the 1.96 come from? Use the standard normal distribution, the
N(0,1)distributionattherightandTableA.1.

Lookup0.025or
0.975inthemiddle
ofTableA.1and
the(closest)
zvalueis1.96

Researchers may not always want to use a 95% confidence level.


Othercommonlevelsare90%,98%and99%.

Using the same idea for confirming the value of 1.96, find the c
orrectmultiplieriftheconfidencelevelwere90%.

Lookup0.05or0.95in
themiddleofTableA.1
andthe(closest)zis1.645

Thegenericexpressionforthismultiplierwhenyouareworkingwith
astandardnormaldistributionisgivenbyz*.

Hereareafewothermultipliersforapopulationproportionconfidenceinterval.
ConfidenceLevel
Multiplierz*

90%
1.645

95%
1.96(orabout2)

98%
2.326

99%
2.576

Now,theeasiestwaytofindmultipliersistoactuallylookaheadabitandmakeuseofTableA.2.
LookatthedfrowmarkedInfinitedegreesoffreedomandyouwillfindthez*valuesformany
commonconfidencelevels.Checkitout!

From Utts, Jessica M. and Robert F. Heckard. Mind on Statistics, Fourth Edition. 2012. Used with permission.

Whentheconfidencelevelincreases,thevalueofthemultiplierincreases.Sothewidthofthe
confidence interval also increases. In order to be more confident in the procedure (have a
procedure with a higher probability of producing an interval that will contain the population
value,wehavetosacrificeandhaveawiderinterval.Theformulaforaconfidenceintervalfor
apopulationproportionpissummarizednext.

76

*
ConfidenceIntervalforaPopulationProportionp: p z s.e.( p )

where p isthesampleproportionand z * istheappropriatemultiplier

p 1 p
isthestandarderrorofthesampleproportion.
n

ands.e.( p )=

Conditions:
1. Thesampleisarandomlyselectedsamplefromthepopulation.However,availabledata
canbeusedtomakeinferencesaboutamuchlargergroupifthedatacanbeconsideredto
berepresentativewithregardtothequestion(s)ofinterest.
2. Thesamplesizenislargeenoughsothatthenormalcurveapproximationholds
np 10 and n(1 p ) 10

TryIt!A90%CIforp
Arandomsampleofn=501Americanteenagersresultedin54%statingtheygetalongverywell
with their parents. The standard error for this estimate was found to be 2.2%. The 95%
confidenceintervalforthepopulationproportionofteenagersthatgetalongverywellwiththeir
parentswentfrom49.6%to58.4%.Thecorresponding90%confidenceintervalwouldgofrom
50.4%to57.6%,whichisindeednarrower(butstillcenteredaroundtheestimateof54%).

TheConservativeApproach
Fromthegeneralformoftheconfidenceinterval,themarginoferrorisgivenas:
Marginoferror=z*s.e.( p )=z* p 1 p
n

Foranyfixedsamplesizen,thismarginoferrorwillbethelargestwhen p ==0.5.Thinkabout
thefunction p (1 p ) .Sousingfor p intheabovemarginoferrorexpressionwehave:
z

p (1 p )
n

1 (1 1 )
2
2
n

z*

2 n

By using this margin of error for computing a confidence interval, weare being conservative.
Theresultingintervalmaybealittlewiderthanneeded,butitwillnoterronbeingtoonarrow.
Thisleadstoacorrespondingconservativeconfidenceintervalforapopulationproportion.

ConservativeConfidenceIntervalforaPopulationProportionp

z*

2 n

where p isthesampleproportionand z * istheappropriatemultiplier.


Earlierwesawthemarginoferrorforaproportionwasgivenas 1

.Thisisactuallya95%
n
conservative margin of error. What happens to the conservative margin of error in the box
above when you use z * = 2 for 95% confidence? Conservative (approx) 95% margin of error:
z*
2 n

2
2 n

1
n

77

ChoosingaSampleSizeforaSurvey
Thechoiceofasamplesizeisimportantinplanningasurvey.Oftenasamplesizeisselected
(usingtheconservativeapproach)thatsuchthatitwillproduceadesiredmarginoferrorfora
givenlevelofconfidence.Letstakealookattheconservativemarginoferrormoreclosely.

z*
(Conservative)MarginofError=

2 n
2

z*


n
n

Solvingthisexpressionforthesamplesize wehave:
m
2

Ifthisdoesisnotawholenumber,wewouldrounduptothenextlargestinteger.

TryIt!CokeversusPepsi
ApollwasconductedinCanadatoestimatep,theproportionofCanadiancollegestudentswho
preferCokeoverPepsi.Basedonthesampledresults,a95%conservativeconfidenceintervalfor
pwasfoundtobe(0.62,0.70).
a. Whatisthemarginoferrorforthisinterval?Halfwidthis(0.700.62)/2=0.04or4%
Notethemidpointisphat=0.66or66%.

b. Whatsamplesizewouldbenecessaryinordertogetaconservative95%confidenceinterval
forpwithamarginoferrorof0.03(thatis,anintervalwithawidthof0.06)?
2

z * 1.96
32.67 2 1067.1 Needatleast1068students
n

2m 2(0.03)

c. SupposethatthesamepollwasrepeatedintheUnitedStates(whosepopulationis10times
largerthanCanada),butfourtimesthenumberofpeoplewereinterviewed.Theresulting
95%conservativeconfidenceintervalforpwillbe:
twiceaswideastheCanadianinterval
1/2aswideastheCanadianinterval
1/4aswideastheCanadianinterval
1/10aswideastheCanadianinterval
thesamewidthastheCanadianinterval

UsingConfidenceIntervalstoGuideDecisions
Thinkaboutit:Avaluethatisnotinaconfidenceintervalcanberejectedasalikelyvalueofthe
populationproportion.Avaluethatisinaconfidenceintervalisanacceptablepossibilityfor
thevalueofapopulationproportion.

TryIt!CokeversusPepsi
RecallthepollconductedinCanadatoestimatep,theproportionofCanadiancollegestudents
who prefer Coke over Pepsi. Based on the sampled results, a 95% conservative confidence
interval for p was found to be (0.62, 0.70). Do you think it is reasonable to conclude that a
majorityofCanadiancollegestudentspreferCokeoverPepsi?Explain.
Yes,sinceentireintervalisabove0.50,reasonabletoclaimamajorityinthepopulationprefercoke.

78

AdditionalNotes
Aplacetojotdownquestionsyoumayhaveandask
duringofficehours,takeafewextranotes,writeoutan
extraproblemorsummarycompletedinlecture,create
yourownsummaryabouttheseconcepts.

79

80

Stat250GundersonLectureNotes
5:LearningaboutaPopulationProportion

Part3:TestingaboutaPopulationProportion

Wemakedecisionsinthedarkofdata.StuHunter

OverviewofTestingTheories
Wehaveexaminedstatisticalmethodsforestimatingthepopulationproportionbasedonthe
sample proportion using a confidence interval estimate. Now we turn to methods for testing
theories about the population proportion. The hypothesis testing method uses data from a
sampletojudgewhetherornotastatementaboutapopulationisreasonableornot.Wewant
totesttheoriesaboutapopulationproportionandwewilldosousingtheinformationprovided
fromasamplefromthepopulation.

BasicStepsinAnyHypothesisTest
Step1: Determinethenullandalternativehypotheses.
Step2: Verifynecessarydataconditions,andifmet,summarizethedataintoanappropriate
teststatistic.
Step3: Assumingthenullhypothesisistrue,findthepvalue.
Step4: Decidewhetherornottheresultisstatisticallysignificantbasedonthepvalue.
Step5: Reporttheconclusioninthecontextofthesituation.

FormulatingHypothesisStatements
Manyquestionsinresearchcanbeexpressedaswhichoftwostatementsmightbecorrectfora
population.Thesetwostatementsarecalledthenullandthealternativehypotheses.

The null hypothesis is often denoted by H0, and is a statement that there is no effect, no
difference, that nothing has change or nothing is happening. The null hypothesis is usually
referredtoasthestatusquo.

ThealternativehypothesisisoftendenotedbyHa,andisastatementthatthereisarelationship,
thereisadifference,thatsomethinghaschangedorsomethingishappening.

Usuallytheresearcherhopesthedatawillbestrongenoughtorejectthenullhypothesisand
supportthenewtheoryinthealternativehypothsis.

Itisimportanttorememberthatthenulland alternativehypothesesarestatementsabouta
population parameter (not about the results in the sample). Finally, there will often be a
directionofextremethatisindicatedbythealternativehypothesis.Toseetheseideas,let's
trywritingoutsomehypothesestobeputtothetest.

81

TryIt!StatingtheHypothesesanddefiningtheparameterofinterest

1. About10% ofthehumanpopulationislefthanded.Supposethataresearcherspeculates
thatartistsaremorelikelytobelefthandedthanareotherpeopleinthegeneralpopulation.

H0: p0.10(notmorelikely)let_p_=popul propn of all artists that are left-handed


Ha:p>0.10

parameter=writtendescription
Direction:onesidedtotheright

2. Suppose that a pharmaceutical company wants to be able to claim that for its newest
medicationtheproportionofpatientswhoexperiencesideeffectsislessthan20%.

let_p_=popul propn of all subjects taking new medic


that experience side effects
Ha:p<0.20

parameter=writtendescription
Direction:onesidedtotheleft
H0:p0.20

3. TheUSCensusreportsthat48%ofhouseholdshavenochildren.Arandomsampleof500
householdswillbetakentoassessifthepopulationproportionhaschangedfromtheCensus
valueof0.48.

H0:p=0.48

Ha:p0.48

Direction:twosided

let_p_=popul propn of all households today


that have no children
parameter=writtendescription

Notes:
1. Whenthealternativehypothesisspecifiesasingledirection,thetestiscalledaonesidedor
onetailedhypothesistest.Inpractice,mosthypothesistestsareonesidedtestsbecause
investigatorsusuallyhaveaparticulardirectioninmindwhentheyconsideraquestion.

2. Whenthealternativehypothesisincludesvaluesinbothdirectionfromaspecificstandard,
thetestiscalledatwosidedortwotailedhypothesistest.

3. AgenericnullhypothesiscouldbeexpressedasH0:populationparameter=nullvalue,where
thenullvalueisthespecificnumbertheparameterequalsifthenullhypothesisistrue.Inall
oftheexamplesabove,thepopulationparameterisp,thepopulationproportion.Example1
abovehasthenullvalueof10%or0.10.

82

TheLogicofHypothesisTesting:WhatiftheNullisTrue?
Thinkaboutajurytrial
H0:Thedefendantis____ innocent_____ Ha:Thedefendantis____guilty_____
We assume that the null hypothesis is true until the sample data conclusively demonstrate
otherwise.Weassesswhetherornottheobserveddataareconsistentwiththenullhypothesis
(allowingreasonablevariability).Ifthedataareunlikelywhenthenullhypothesisistrue,we
wouldrejectthenullhypothesisandsupportthealternativetheory.

The Big Question we ask: If the null hypothesis is true about the population, what is the
probabilityofobservingsampledatalikethatobserved(ormoreextreme)?

ReachingConclusionsabouttheTwoHypotheses
Wewillbedecidingbetweenthetwohypothesesusingdata.Thedataisassumedtobearandom
samplefromthepopulationunderstudy.

Thedatawillbesummarizedviaa teststatistic(e.g.Z,T,F,X2). Inmanycasesthetest


statisticisastandardizedstatisticthatmeasuresthedistancebetweenthesamplestatisticand
thenullvalueinstandarderrorunits.

TestStatistic=SampleStatisticNullValue

(Null)StandardError

Infact,ourfirstteststatisticwillbeazscoreandwearealreadyfamiliarwithwhatmakesaz
valueunusualorlarge.

With the test statistic computed, we quantify the compatibility of the result with the null
hypothesiswithaprobabilityvaluecalledthepvalue.

The pvalue is computed by assuming the null hypothesis is true and then determining the
probabilityofaresultasextreme(ormoreextreme)astheobservedteststatisticinthedirection
ofthealternativehypothesis.

Notes:

(1) Thepvalueisaprobability,soitmustbebetween0and1.Itisreallyaconditionalprobability
theprobabilityofseeingateststatisticasextremeormoreextremethanobservedgiven
(orconditionalon)thenullhypothesisistrue.
(2) Thepvalueisnottheprobabilitythatthenullhypothesisistrue.

The___smaller____thepvalue,
thestrongertheevidenceisAGAINSTH0(andinfavorofHa).

CommonConvention:RejectH0ifthepvalueis__somecutoffvalue___.

Thisborderlinevalueiscalledthe___ levelofsignificance ___anddenotedby____.

Whenthepvalueiswesaytheresultis___statisticallysignificance ___.

Commonlevelsofsignificanceare:____0.01,0.05,0.10______

TwoPossibleResults:

83

Thepvalueis sowerejectH0
andsaytheresultsarestatisticallysignificantatthelevel
WewouldthenwritearealworldconclusiontoexplainwhatrejectingH0translatesto
inthecontextoftheproblemathand.

Thepvalueis>, sowefailtorejectH0
andsaytheresultsarenotstatisticallysignificantatthelevel.
WewouldthenwritearealworldconclusiontoexplainwhatfailingtorejectH0
translatestointhecontextoftheproblemathand.

Becareful:wesayfailtorejectH0andnotacceptH0becausethedatadonotprovethenull
hypothesis is true, rather the data were not convincing enough to support the alternative
hypothesis.

TestingHypothesesAboutaPopulationProportion
Inthecontextoftestingaboutthevalueofapopulationproportionp,thepossiblehypotheses
statementsare:
1.
H0: p=p0
versusHa: pp0
twosided

2.
H0: pp0
versusHa: p<p0
onesidedtotheleft

versusHa: p>p0
onesidedtotheright

3.
H0: pp0

Wheredoesp0comefrom?SometimesthenullhypothesisiswrittenasH0:p=p0aswecompute
thepvalueassumingthenullhypothesisistrue,thatis,wetakethepopulationproportiontobe
thenullvaluep0.

Thesampledatawillprovideuswithanestimateofthepopulationproportionp,namelythe
sampleproportion p .Foralargesamplesize,thedistributionforthesampleproportionwillbe:

p (1 p )

underH0=>replacepwithp0.
N
p
,
approximately

Ifwehaveanormaldistributionforavariable,thenwecanstandardizethatvariabletocompute
probabilities,aslongasyouhavethemeanandstandarddeviationforthatstatistic.Intesting,
we assume that the null hypothesis is true, that the population proportion p = p0. So the
standardizedzstatisticforasampleproportionintestingis:
p p0

z=
nneedstobelargeenough!
p0 (1 p0 )
n

Ifthenullhypothesisistrue,thiszteststatisticwillhaveapproximatelyaN(0,1)distribution_.
Thestandardnormaldistributionwillbeusedtocomputethepvalueforthetest.
WehaveagoodframeofreferenceabouttheN(0,1)distribution,
thatisaboutwhatkindsofvaluesofzarecommonversusunusual.

84

TryIt!LefthandedArtists
About10%ofthehumanpopulationislefthanded.Supposethataresearcherspeculatesthat
artistsaremorelikelytobelefthandedthanareotherpeopleinthegeneralpopulation.The
researchersurveysarandomsampleof150artistsandfindsthat18ofthemarelefthanded.
Performthetestusinga5%significancelevel.

Step1:

Determinethenullandalternativehypotheses.

H0:__ p=0.10

__

Ha:___p>0.10

____

wheretheparameter__p__represents__thepopulationproportion

ofallartiststhatarelefthanded______________________

Note:Thedirectionofextremeisonesidedtotheright.

Step2:

Verify necessary data conditions, and if met, summarize the data into an
appropriateteststatistic.
Thedataareassumedtobearandomsample.
Check if np0 10 and n(1 p0) 10. 150(0.10)=15,150(0.90)=135

Observed test statistic: z

p p 0
p 0 (1 p 0 )
n

0.12 0.10
0.02

0.82
0.10(1 0.10) 0.0245
150

Step3: Assumingthenullhypothesisistrue,findthepvalue.
The pvalue is the probability of getting a teststatistic asextreme ormore extreme than the
observedteststatisticvalue,assumingthenullhypothesisistrue.Sincewehaveaonesidedtest
totheright,towardthelargervalues

pvalue

=probabilityofgettingazteststatisticaslargeorlargerthanobserved,
assumingthenullhypothesisistrue. true (i.e.ZisN(0,1)).

=P(Z0.82)=10.7939=0.2061

Note:ifusedtheexactbinomialdistrib,pvalue=P(X18)=0.242

Decideiftheresultisstatisticallysignificantbasedonthepvalue.
Sincethepvalueisgreaterthan0.05,wecannotrejectH0.
TheresultsareNOTstatisticallysignificantatthe5%level.

Step4:

Step5: Reporttheconclusioninthecontextofthesituation.
ThereisNOTsufficientevidencetosaythatartistsaremorelikelytobelefthanded
thanpeopleinthegeneralpopulation.

85

Aside: Theresearcherchoosesthelevelofsignificancebeforethestudyisconducted.Inour
LeftHandedArtistsexamplewehadH0:p=0.10versusHa:p>0.10.
Ifonly12LHartistsinoursample,
wewouldhave p =0.08,wewouldcertainlynotrejectH0
Withour18LHartistsinoursample,
our p =0.12,z=0.82,pvalue=0.206andourdecisionwastofailtorejectH0
Whatifwehad20LHartistsinoursample,
our p =0.133,ourz=1.36,pvalue=0.0868andourdecisionwouldbe_failtorejectH0_
Whatifwehad22LHartistsinoursample,
our p =0.147,ourz=1.91,pvalue=0.0284andourdecisionwouldbe_rejectH0
Whatifwehad24LHartistsinoursample,
our p =0.16,ourz=2.45,pvalue=0.007,andourdecisionwouldbe_rejectH0

Selectingthelevelofsignificanceislikedrawingalineinthesandseparatingwhenyouwill
rejectH0andwhentheretheevidencewouldbestrongenoughtorejectH0.

Thisfirsttestwasaonesidedtesttotheright.Howisthepvaluefoundfortheotherdirections
ofextreme?Thetablebelowprovidesanicesummary.

From Utts, Jessica M. and Robert F. Heckard. Mind on Statistics, Fourth Edition. 2012. Used with permission.

86

TryIt!HouseholdswithoutChildren
The US Census reports that 48% of households have no children. A random sample of 500
householdswastakentoassessifthepopulationproportionhaschangedfromtheCensusvalue
of0.48.Ofthe500households,220hadnochildren.Usea10%significancelevel.

Step1: Determinethenullandalternativehypotheses.

H0:p=0.48

Ha:p0.48

wheretheparameterprepresentsthepopulationproportionofallhouseholds
todaythathavenochildren.
Oursampleproportion
Note:Thedirectionofextremeistwosided.
(of0.44)wasabout

1.8standarddeviations

Step2:

Verifynecessarydataconditions,andifmet,
belowthehypothesized
summarizethedataintoanappropriateteststatistic.
proportion(of0.48).
Thedataareassumedtobearandomsample.
Checkifnp010andn(1p0)10.500(0.48)=240,500(0.52)=260
p p0
0.44 0.48

1.79
Observedteststatistic:Z=
0.48(1 0.48)
p0 (1 p0 )
n

500

Step3: Assumingthenullhypothesisistrue,findthepvalue.

The pvalue is the probability of getting a teststatistic asextreme ormore extreme than the
observedteststatisticvalue,assumingthenullhypothesisistrue.Sincewehaveatwosided
test,bothlargeandsmallvaluesareextreme.
Sketchtheareathatcorrespondstothepvalue:

Computethepvalue:
pvalue=2xP(Z1.79)=2(0.0367)=0.0734

Step4:

Decideiftheresultisstatisticallysignificantbasedonthepvalue.
Sincethepvalueislessthan0.10,wecanrejectH0.
TheresultsAREstatisticallysignificantatthe10%level.

Step5:

Reporttheconclusioninthecontextofthesituation.
The survey results do support the statement that the population proportion of
householdswithnochildrenhaschangedfromthecensusvalueof0.48.
Aside:Whatif=0.05?

87

Whatifnissmall?

Goal:westillwanttolearnaboutapopulationproportionp.Wetakearandomsampleofsize
nwherenissmall(i.e.np0<10orn(1p0)<10).Ifthesamplesizeissmall,wehavetogoback
totheexactdistributionforacountX,calledthebinomialdistribution.

If X hasthebinomialdistributionBin(n,p),then
n
n
n!
P ( X k ) p k (1 p ) n k for k 0,1,2,..., n where

k
k k! (n k )!
andthemeanof X np

andthestandarddeviationof X np (1 p)

Wewillusethebinomialprobabilityformulaforcomputingtheexactpvalue.

TestingHypothesesaboutaPopulationProportionpwhennissmall
Withasmallsamplesize,wewilldoaBinomialtest.

SmallSampleBinomialTestforthepopulationproportionp

TotestthehypothesisH0:p=p0wecomputethecountteststatistic

X=thenumberofsuccessesinthesampleofsizen

whichhastheBin(n,p0)distributionwhenH0istrue.

ThisBin(n,p0),distributionisusedtocomputethepvalueforthetest.

TryIt!NewTreatment
Agroupof10subjectswithadiseasearetreatedwithanewtreatment.Ofthe10subjects,9
showedimprovement.Testtheclaimthatamajorityofpeopleusingthistreatmentimproved
usinga5%significancelevel.Letpbethetruepopulationproportionofpeoplewhoimprovewith
thistreatment.n=10andX=9improved;=0.05

Statethehypotheses:H0:_ p=0.50____

Ha:____p>0.50___

Theobservedteststatisticvalueisjust___________________

pvalue=P(X9)=P(X=9)+P(X=10)

10
10
(0.50)9(0.50)1+ (0.50)10(0.50)0
9
10

=10(0.50)10+1(0.50)10=11(0.50)10=0.0107

Atthe5%significancelevel,wewouldrejectH0
andconclude:
thereissufficientevidencetosayamajorityofsubjectsusingthistreatmentwillimprove.
Design:nocontrolgroup/nocomparisongroup.PossibleResponseBias=PlaceboEffect.

88

Letsrevisittheflowchartforworkingonproblemsthatdealwithapopulationproportion.
Whenthesamplesizeislargewecanusethe
How to deal with questions
large sample normal approximation for
about proportions
computing probabilities about a sample
Proportions
proportion, for testing hypotheses about a
Response Variable is Categorical
populationproportion(basedontheresulting
with 2 outcomes: S, F
sample proportion), and for computing a
confidenceintervalestimateforthevalueofa
populationproportion(againusingthesample
proportionasthepointestimate).

When the sample size is small we use the


binomialdistributiontocomputeprobabilities
about a sample proportion or to test
hypotheses about a population proportion
(based on the resulting sample count of
successes). We did not discuss the small
sample confidence interval for a population
proportionusingthebinomialdistribution.

n is small

Convert to count.
Use X ~ Bin(n,p)

n is large
np 10 and
n(1-p) 10

or

Use p-hat
p-hat ~ N(p,p(1-p)/n)

Convert to count
Use X ~ N(np,np(1-p))

SampleSize,StatisticalSignificance,andPracticalImportance
Thesizeofthesampleaffectsourabilitytomakefirmconclusionsbasedonthatsample.Witha
smallsample,wemaynotbeabletoconcludeanything.Withlargesamples,wearemorelikely
tofindstatisticallysignificantresultseventhoughtheactualsizeoftheeffectisverysmalland
perhapsunimportant.Thephrasestatisticallysignificantonlymeansthatthedataarestrong
enoughtorejectthenullhypothesis.Thepvaluetellsusaboutthestatisticalsignificanceofthe
effect,butitdoesnottellusaboutthesizeoftheeffect.

ConsidertestingH0:p=0.5versusHa:p>0.5at=0.05.
Case1:52successesinasampleofsizen=100 p =0.52
TestStatistic:z=(0.520.50)/[0.5(10.5)/100]=0.4
pvalue=P(Z0.4)=0.34.SowewouldfailtorejectH0.
Anincreaseofonly0.02beyond0.50seemsinconsequential(notsignificant).
Case2:520successesinasampleofsizen=1000 p =0.52
TestStatistic:z=(0.520.50)/[0.5(10.5)/1000]=1.26
pvalue=P(Z1.26)=0.104.SowewouldagainfailtorejectH0.
Hereanincreaseof0.02beyond0.50isapproachingsignificance.
Case3:5200successesinasampleofsizen=10,000 p =0.52
TestStatistic:z=(0.520.50)/[0.5(10.5)/10,000]=4.0
pvalue=P(Z4)=0.00003.SowewouldcertainlyrejectH0.
Hereanincreaseof0.02beyond0.50isverysignificant!
Smallsamplesmakeitverydifficulttodemonstratemuchofanything.Hugesamplesizescan
makeapracticallyunimportantdifferencestatisticallysignificant.Key:determineappropriate
samplesizessofindingsthatarepracticallyimportantbecomestatisticallysignificant.

89

WhatCanGoWrong:TwoTypesofErrors
Wehavebeendiscussingastatisticaltechniqueformakingadecisionbetweentwocompeting
theoriesaboutapopulation.Webasethedecisionontheresultsofarandomsamplefromthat
population.Thereisthepossibilityofmakingamistake.Infacttherearetwotypesoferrorthat
wecouldmakeinhypothesistesting.
Type1error=rejectingH0whenH0istrue
Type2error=failingtorejectH0whenHaistrue
Instatisticswehavenotationtorepresenttheprobabilitiesthatatestingprocedurewillmake
thesetwotypesoferrors.

P(Type1error)=

P(Type2error)=

Thereisanotherprobabilitythatisofinteresttoresearchersiftherereallyissomethinggoing
on(ifthealternativetheoryisreallytrue),whatistheprobabilitythatwewillbeabletodetect
it(beabletorejectH0)?Thisprobabilityiscalledthepowerofthetestandisrelatedtothe
probabilityofmakingaType2error.

Power=P(rejectingH0whenHaistrue)
=1P(failingtorejectH0whenHaistrue)
=1P(Type2error)
=1.
So we can think of power as the probability of advocating the new theory given the new
theory is true. Researchers are generally interested in having a test with high power. One
dilemmaisthatthebestwaytoincreasepoweristoincreasesamplesizen(seecommentsbelow)
andthatcanbeexpensive.

Comments:
1. Inpracticewewanttoprotectthestatusquosowearemostconcernedwithlevel
2. Mosttestswedescribehavethe...smallestforgiven
3. Generally,forafixedsamplesizen,...tradeoffbetweenand
(canreducebothbyincreasingsamplesize)
4. Ideallywewanttheprobabilitiesofmakingamistaketobesmall,wewantthepowerofthe
testtobelarge.However,theseprobabilitiesarepropertiesoftheprocedure(theproportion
of times the mistake would occur if the procedure were repeated many times) and not
applicabletothedecisiononceitismade.

5. Somefactorsthatinfluencethepowerofthetest
Samplesize:largersamplesizeleadstohigherpower.
Significancelevel:largerleadstohigherpower.
Actualparametervalue:atruevaluethatfallsfurtherfromthenullvalue
(inthedirectionofthealternativehypothesis)leadstohigherpower(howeverthisis
notsomethingthattheresearchercancontrolorchange).

90

SimpleExample

H0:Baskethas9Redand1White
__?__ RED
Ha:Baskethas4Redand6White
__?__ WHITE

Data:1ballselectedatrandomfromthebasket.

Rejectthenullhypothesisiftheballis___ WHITE___

Withthisrule,whatarethechancesofmakingamistake?

P(Type1error)=P(rejectH0whenH0istrue)==0.10

P(Type2error)=P(donotrejectH0whenHaistrue)=0.40

Whatisthepowerofthetest?10.40=0.60or60%

Supposeaballisnowselectedfromthebasketanditisobserved
andfoundtobeWHITE.Whatisthedecision?RejectH0

Youjustmadeadecision,couldamistakehavebeenmade?
Ifso,whichtype?Yes,TypeIerror

Whatistheprobabilitythatthistypeofmistakewasmade?0or1(not0.10)

Note: The Decision Rule stated in the simple example resembles the rejection region approach to
hypothesistesting.Wewillfocusprimarilyonthepvalueapproachthatisusedinreportingresultsin
journals.

91

AdditionalNotes
Aplacetojotdownquestionsyoumayhaveandask
duringofficehours,takeafewextranotes,writeoutan
extraproblemorsummarycompletedinlecture,create
yourownsummaryabouttheseconcepts.

92

Das könnte Ihnen auch gefallen