/
Topic  Composite Hypotheses November  Simple hypotheses limit us to a decision between Topic  Composite Hypotheses November  Simple hypotheses limit us to a decision between

Topic Composite Hypotheses November Simple hypotheses limit us to a decision between - PDF document

celsa-spraggs
celsa-spraggs . @celsa-spraggs
Follow
477 views
Uploaded On 2015-01-19

Topic Composite Hypotheses November Simple hypotheses limit us to a decision between - PPT Presentation

This limitation does not allow us under the procedures of hypothesis testing to address the basic question Does the length the reaction rate the fraction displaying a particular behavior or having a particular opinion the temperature the kinetic ene ID: 33182

This limitation does not

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Topic Composite Hypotheses November Si..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

IntroductiontoStatisticalMethodologyCompositeHypotheses Inreality,incorrectdecisionsaremade.Thus,for20,()istheprobabilityofmakingatypeIerror;i.e.,rejectingthenullhypothesiswhenitisindeedtrue,For21,1�()istheprobabilityofmakingatypeIIerror;i.e.,failingtorejectthenullhypothesiswhenitisfalse.Thegoalistomakethechanceforerrorsmall.ThetraditionalmethodisanalogoustothatemployedintheNeyman-Pearsonlemma.Fixa(signicance)level ,nowdenedtobethelargestvalueof()intheregion0denedbythenullhypothesis.Inotherwords,byfocusingonthevalueoftheparameterin0thatismostlikelytoresultinanerror,weinsurethattheprobabilityofatypeIerrorisnomorethat irrespectiveofthevaluefor20.Then,welookforacriticalregionthatmakesthepowerfunctionaslargeaspossibleforvaluesoftheparameter21Example1.LetX1;X2;:::;XnbeindependentN(;20)randomvariableswith20knownandunknown.Forthecompositehypothesisfortheone-sidedtestH0:0versusH1:�0:WeusetheteststatisticfromthelikelihoodratiotestandrejectH0ifXistoolarge.Thus,thecriticalregionC=fx;xk(0)g:Ifisthetruemean,thenthepowerfunction()=PfX2Cg=PfXk(0)g:Asweshallseesoon,thevalueofk(0)dependsonthelevelofthetest.Notethat()increaseswith.Astheactualmeanincreases,thentheprobabilitythatthesamplemeanXexceedsaparticularvaluek(0)alsoincreases.Toobtainlevel forthehypothesistest,weusethatfactthat()increaseswithtoconcludethatthemaximumvalueofontheset0=f;0gtakesplaceforthevalue0,i.e., =(0)=P0fXk(0)g:Wenowusethistondthevaluek(0).When0isthevalueofthemean,westandardizetogiveastandardnormalrandomvariableZ=X�0 0=p n:Choosez sothatPfZz g= .Inthiscase,(z )=1� whereisthedistributionfunctionforthestandardnormal,thusP0fZz g=P0fX0+0 p nz gandk(0)=0+(0=p n)z .Ifisthetruestateofnature,thenZ=X� 0=p nisastandardnormalrandomvariable.Weusethisfacttodeterminethepowerfunctionforthistest.()=PfX0 p nz +0g=PfX�0 p nz �(�0)g(1)=PX� 0=p nz ��0 0=p n=1�z ��0 0=p n(2)227 IntroductiontoStatisticalMethodologyCompositeHypotheses Nbethetotalpopulation.IfN0isthelevelthatawildlifebiologistsayisdangerouslylow,thenthenaturalhypothesisisone-sided.H0:NN0versusH1:NN0:Thedataarethehenumberinthesecondcapturethataretagged,r.ThelikelihoodfunctionforNisthehypergeo-metricdistribution.L(Njr)=�tr�N�tk�r �Nkandthemaximumlikelihoodestimateis^N=[tk=r]:Thus,highervaluesforrleadustolowerestimatesforN.LetRbethe(random)numberinthesecondcapturethataretagged,then,foran leveltest,welookfortheminimumvaluer sothatPNfRr g forallNN0:(3)AsNincreases,thenrecapturesbecomelesslikelyandtheprobabilityin(3)decreases.Thus,weshouldsetthevalueofr accordingtotheparametervalueN0,theminimumvalueunderthenullhypothesis.Let'sdeterminer forseveralvaluesof usingtheexamplefromthetopic,MaximumLikelihoodEstimation,andconsiderthecaseinwhichthecriticalpopulationisN0=2000.�N0&#x-200;�]TJ;&#x 0 -;.9;U T; [0;t&#x-200;&#x]TJ ;� -1;.95; Td;&#x [00;k&#x-400;&#x]TJ ;� -1;.95; Td;&#x [00;alpha()&#x-c0.;,0;&#x.02,;�.01;&#x]TJ ;� -1;.95; Td;&#x [00;ralpha()&#x-qhy;&#xper1;&#x-alp;&#xha,t;&#x,N0-;&#xt,k];&#xTJ 0;&#x -11;&#x.955;&#x Td ;&#x[000;data.frame(alpha,ralpha)alpharalpha10.054920.025130.0153Forexample,wemustcapturealleast49thatweretaggedinordertorejectH0atthe =0:05level.InthiscasetheestimateforNis^N=[kt=r ]=1632.Asanticipated,r increasesandthecriticalregionsshrinksasthevalueof decreases.Usingthelevelr determinedusingthevalueN0forN,weseethatthepowerfunction(N)=PNfRr g:RisahypergeometricrandomvariablewithmassfunctionfR(r)=PNfR=rg=�tr�N�tk�r �Nk:Theplotforthecase =0:05isgivenusingtheRcommands�N()&#x-c13;�:2;Ā];&#xTJ 0;&#x -11;&#x.955;&#x Td ;&#x[000;pi()&#x-1-p;&#xhype;&#xr49,;&#xt,N-;&#xt,k];&#xTJ 0;&#x -11;&#x.955;&#x Td ;&#x[000;plot(N,pi,type="l",ylim=c(0,1))Wecanincreasepowerbyincreasingthesizeofk,thenumberthevalueinthesecondcapture.Thisincreasesthevalueofr .For =0:05,wehavethetable.229 IntroductiontoStatisticalMethodologyCompositeHypotheses Figure3:Powerfunctionforthetwo-sidedtest.0=10,0=3.(left)n=16, =0:05(black),0.02(red),and0.01(blue).Noticethatlowersignicancelevel reducespower.(right) =0:05,n=15(black),40(red),and100(blue).Asbefore,decreasedsignicancelevelreducespowerandincreasedsamplesizenincreasespower.Weusethisfacttodeterminethepowerfunctionforthistest()=PfX2Cg=1�PfX=2Cg=1�P X�0 0=p n z =2=1�P�z =2X�0 0=p nz =2=1�P�z =2��0 0=p nX� 0=p nz =2��0 0=p n=1�z =2��0 0=p n+�z =2��0 0=p nIfwedonotknowifthemimicislargerorsmallerthatthemodel,thenweuseatwo-sidedtest.BelowistheRcommandsforthepowerfunctionwith =0:05andn=16observations.�zalpha=qnorm(.975)�mu0&#x-10];&#xTJ 0;&#x -11;&#x.955;&#x Td ;&#x[000;sigma0&#x-3]T;&#xJ 0 ;&#x-11.;ॕ ;&#xTd [;mu()&#x-600;&#x:140;�/10;�]TJ;&#x 0 -;.9;V T; [0;n&#x-16];&#xTJ 0;&#x -11;&#x.955;&#x Td ;&#x[000;pi(()(()))(()(()))&#x-1-p;&#xnorm;&#xzalp;&#xha-m;&#xu-mu;�/si;&#xgma0;&#x/sqr;&#xtn+p;&#xnorm;&#x-zal;&#xpha-;&#xmu-m;&#xu0/s;&#xigma;�/sq;&#xrtn];&#xTJ 0;&#x -11;&#x.955;&#x Td ;&#x[000;plot(mu,pi,type="l")Weshallseeinthethenexttopichowthesetestsfollowfromextensionsofthelikelihoodratiotestforsimplehypotheses.Thenextexampleisunlikelytooccurinanygenuinescienticsituation.Itisincludedbecauseitallowsustocomputethepowerfunctionexplicitlyfromthedistributionoftheteststatistic.Webeginwithanexercise.Exercise6.ForX1;X2;:::;XnindependentU(0;)randomvariables,2=(0;1).ThedensityfX(xj)=1 if0x;0otherwise:231 IntroductiontoStatisticalMethodologyCompositeHypotheses LetX(n)denotethemaximumofX1;X2;:::;Xn,thenX(n)hasdistributionfunctionFX(n)(x)=PfX(n)xg=x n:Example7.ForX1;X2;:::;XnindependentU(0;)randomvariables,takethenullhypothesisthatlandsinsomenormalrangeofvalues[L;R].Thealternativeisthatliesoutsidethenormalrange.H0:LRversusH1:Lor&#x-277;R:IfanyofourobservationsXiaregreaterthanR,thenwearecertain&#x-277;RandweshouldrejectH0.Ontheotherhand,alloftheobservationscouldbebelowLandthestateofnaturemightstilllandinthenormalrange.Consequently,wewilltrytobaseatestbasedonthestatisticX(n)=max1inXiandrejectH0ifX(n)&#x-277;RandtoomuchsmallerthanL,say~.Weshallsoonseethatthechoiceof~willdependonnthenumberofobservationsandon ,thesizeofthetest.Thepowerfunction()=PfX(n)~g+PfX(n)RgWecomputethepowerfunctioninthreecases.Thesecondcasehasthevaluesofunderthenullhypothesis.Therstandthethirdcaseshavethevaluesforunderthealternativehypothesis.AnexampleofthepowerfunctionisshowninFigure3. Figure4:PowerfunctionforthetestabovewithL=1;R=3;~=0:9,andn=10.Thesizeofthetestis(1)=0:3487.Case1.~.InthiscasealloftheobservationsXimustbelessthanwhichisinturnlessthan~.Thus,X(n)iscertainlylessthan~andPfX(n)~g=1andPfX(n)Rg=0andtherefore()=1.Case2.~R.232 IntroductiontoStatisticalMethodologyCompositeHypotheses PfX(n)~g= ~ !nandPfX(n)Rg=0andtherefore()=(~=)n.Case3.�R.RepeattheargumentinCase2toconcludethatPfX(n)~g= ~ !nandthatPfX(n)Rg=1�PfX(n)Rg=1�R nandtherefore()=(~=)n+1�(R=)n.Thesizeofthetestisthemaximumvalueofthepowerfunctionunderthenullhypothesis.Thisiscase2.Here,thepowerfunction()= ~ !ndecreasesasafunctionof.Thus,itsmaximumvaluetakesplaceatLand =(L)= ~L !nToachievethislevel,wesolveof~andtake~=Lnp :Notethat~increaseswith .Consequently,wemustreducethecriticalregioninordertoreducethesignicancelevel.Also,~increaseswithnandwecanreducethecriticalregionwhilemaintainingsignicanceifweincreasethesamplesize.2Thep-valueThereportofrejectthenullhypothesisdoesnotdescribethestrengthoftheevidencebecauseitfailstogiveusthesenseofwhetherornotasmallchangeinthevaluesinthedatacouldhaveresultedinadifferentdecision.Consequently,onecommonmethodisnottochoose,inadvance,asignicancelevel ofthetestandthenreport“reject”or“failtoreject”,butrathertoreportthevalueoftheteststatisticandtogiveallthevaluesfor thatwouldleadtotherejectionofH0.Thep-valueistheprobabilityofobtainingaresultatleastasextremeastheonethatwasactuallyobserved,assumingthatthenullhypothesisistrueandmeasuresthestrengthofevidenceagainstH0.Consequently,averylowp-valueindicatesstrongevidenceagainstthenullhypothesis.Ifthep-valueisbelowagivensignicancelevel ,thenwesaythattheresultisstatisticallysignicantatthelevel .Forexample,ifthetestisbasedonhavingateststatisticS(X)exceedalevelk,i.e.,wehavedecisionrejectH0ifandonlyifS(X)k:andifthevalueS(X)=k0isobserved,thenthep-valueequalstothelowestvalueofsignicancelevelthatwoldresultinrejectionofthenullhypothesis.maxf();20g=maxfPfS(X)k0g;20g:233 IntroductiontoStatisticalMethodologyCompositeHypotheses data:88outof112,nullprobability0.7X-squared=3.5208,df=1,p-value=0.0303alternativehypothesis:truepisgreaterthan0.795percentconfidenceinterval:0.71078071.0000000sampleestimates:p0.7857143Exercise9.Isthehypothesistestabovesignicantatthe5%level?the1%level?3AnswerstoSelectedExercises2.InthiscasethecriticalregionsisC=fx;xk(0)gforsomevaluek(0).Tondthisvalue,notethatP0fZ�z g=P0fX�0 p nz +0gandk(0)=�(0=p n)z +0.Thepowerfunction()=PfX�0 p nz +0g=PfX��0 p nz �(�0)g=PX� 0=p n�z ��0 0=p n=�z ��0 0=p n:5.ThetypeIIerrorrate is1�(1600)=P1600fRr g:ThisisthedistributionfunctionofahypergeometricrandomvariableandthustheseprobabilitiescanbecomputedusingthephypercommandForvaryingsignicance,wehavetheRcommands:&#x-278;t&#x-160;�]TJ;&#x 0 -;.9;U T; [0;k&#x-400;&#x]TJ ;� -1;.95; Td;&#x [00;alpha()&#x-c0.;,0;&#x.02,;�.01;&#x]TJ ;� -1;.95; Td;&#x [00;ralpha()&#x-c49;&#x,51,;S]T;&#xJ 0 ;&#x-11.;ॕ ;&#xTd [;beta()&#x-phy;&#xperr; lph; ,t,;&#xN-t,;&#xk]TJ;&#x 0 -;.9;U T; [0;data.frame(alpha,beta)alphabeta10.050.469559120.020.607165630.010.7316226NoticethatthetypeIIerrorprobabilityishighfor =0:05andincreasesas decreases.Forvaryingrecapturesize,wecontinuewiththeRcommands:&#x-phy;&#xperr; lph; ,t,;&#xN-t,;&#xk]TJ;&#x 0 -;.9;U T; [0;k()&#x-c40;�,60;�,80;�]TJ;&#x 0 -;.9;U T; [0;ralpha()&#x-c49;&#x,70,;‘]T;&#xJ 0 ;&#x-11.;ॖ ;&#xTd [;beta()&#x-phy;&#xperr; lph; ,t,;&#xN-t,;&#xk]TJ;&#x 0 -;.9;U T; [0;data.frame(k,beta)kbeta14000.4695591326000.2419490538000.09933596235