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
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.
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,weinsurethattheprobabilityofatypeIerrorisnomorethatirrespectiveofthevaluefor20.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.Toobtainlevelforthehypothesistest,weusethatfactthat()increaseswithtoconcludethatthemaximumvalueofontheset0=f;0gtakesplaceforthevalue0,i.e.,=(0)=P0fXk(0)g:Wenowusethistondthevaluek(0).When0isthevalueofthemean,westandardizetogiveastandardnormalrandomvariableZ=X0 0=p n:ChoosezsothatPfZzg=.Inthiscase,(z)=1whereisthedistributionfunctionforthestandardnormal,thusP0fZzg=P0fX0+0 p nzgandk(0)=0+(0=p n)z.Ifisthetruestateofnature,thenZ=X 0=p nisastandardnormalrandomvariable.Weusethisfacttodeterminethepowerfunctionforthistest.()=PfX0 p nz+0g=PfX0 p nz(0)g(1)=PX 0=p nz0 0=p n=1z0 0=p n(2)227 IntroductiontoStatisticalMethodologyCompositeHypotheses Nbethetotalpopulation.IfN0isthelevelthatawildlifebiologistsayisdangerouslylow,thenthenaturalhypothesisisone-sided.H0:NN0versusH1:NN0:Thedataarethehenumberinthesecondcapturethataretagged,r.ThelikelihoodfunctionforNisthehypergeo-metricdistribution.L(Njr)=trNtkr Nkandthemaximumlikelihoodestimateis^N=[tk=r]:Thus,highervaluesforrleadustolowerestimatesforN.LetRbethe(random)numberinthesecondcapturethataretagged,then,foranleveltest,welookfortheminimumvaluersothatPNfRrgforallNN0:(3)AsNincreases,thenrecapturesbecomelesslikelyandtheprobabilityin(3)decreases.Thus,weshouldsetthevalueofraccordingtotheparametervalueN0,theminimumvalueunderthenullhypothesis.Let'sdeterminerforseveralvaluesofusingtheexamplefromthetopic,MaximumLikelihoodEstimation,andconsiderthecaseinwhichthecriticalpopulationisN0=2000.N0-200;]TJ; 0 -;.9;U T; [0;t-200;]TJ ; -1;.95; Td; [00;k-400;]TJ ; -1;.95; Td; [00;alpha()-c0.;,0;.02,;.01;]TJ ; -1;.95; Td; [00;ralpha()-qhy;per1;-alp;ha,t;,N0-;t,k];TJ 0; -11;.955; Td ;[000;data.frame(alpha,ralpha)alpharalpha10.054920.025130.0153Forexample,wemustcapturealleast49thatweretaggedinordertorejectH0atthe=0:05level.InthiscasetheestimateforNis^N=[kt=r]=1632.Asanticipated,rincreasesandthecriticalregionsshrinksasthevalueofdecreases.UsingthelevelrdeterminedusingthevalueN0forN,weseethatthepowerfunction(N)=PNfRrg:RisahypergeometricrandomvariablewithmassfunctionfR(r)=PNfR=rg=trNtkr Nk:Theplotforthecase=0:05isgivenusingtheRcommandsN()-c13;:2;Ā];TJ 0; -11;.955; Td ;[000;pi()-1-p;hype;r49,;t,N-;t,k];TJ 0; -11;.955; Td ;[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).Noticethatlowersignicancelevelreducespower.(right)=0:05,n=15(black),40(red),and100(blue).Asbefore,decreasedsignicancelevelreducespowerandincreasedsamplesizenincreasespower.Weusethisfacttodeterminethepowerfunctionforthistest()=PfX2Cg=1PfX=2Cg=1PX0 0=p nz=2=1Pz=2X0 0=p nz=2=1Pz=20 0=p nX 0=p nz=20 0=p n=1z=20 0=p n+z=20 0=p nIfwedonotknowifthemimicislargerorsmallerthatthemodel,thenweuseatwo-sidedtest.BelowistheRcommandsforthepowerfunctionwith=0:05andn=16observations.zalpha=qnorm(.975)mu0-10];TJ 0; -11;.955; Td ;[000;sigma0-3]T;J 0 ;-11.;ॕ ;Td [;mu()-600;:140;/10;]TJ; 0 -;.9;V T; [0;n-16];TJ 0; -11;.955; Td ;[000;pi(()(()))(()(()))-1-p;norm;zalp;ha-m;u-mu;/si;gma0;/sqr;tn+p;norm;-zal;pha-;mu-m;u0/s;igma;/sq;rtn];TJ 0; -11;.955; Td ;[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-277;R:IfanyofourobservationsXiaregreaterthanR,thenwearecertain-277;RandweshouldrejectH0.Ontheotherhand,alloftheobservationscouldbebelowLandthestateofnaturemightstilllandinthenormalrange.Consequently,wewilltrytobaseatestbasedonthestatisticX(n)=max1inXiandrejectH0ifX(n)-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=1PfX(n)Rg=1R 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,asignicancelevelofthetestandthenreportrejectorfailtoreject,butrathertoreportthevalueoftheteststatisticandtogiveallthevaluesforthatwouldleadtotherejectionofH0.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,notethatP0fZzg=P0fX0 p nz+0gandk(0)=(0=p n)z+0.Thepowerfunction()=PfX0 p nz+0g=PfX0 p nz(0)g=PX 0=p nz0 0=p n=z0 0=p n:5.ThetypeIIerrorrateis1(1600)=P1600fRrg:ThisisthedistributionfunctionofahypergeometricrandomvariableandthustheseprobabilitiescanbecomputedusingthephypercommandForvaryingsignicance,wehavetheRcommands:-278;t-160;]TJ; 0 -;.9;U T; [0;k-400;]TJ ; -1;.95; Td; [00;alpha()-c0.;,0;.02,;.01;]TJ ; -1;.95; Td; [00;ralpha()-c49;,51,;S]T;J 0 ;-11.;ॕ ;Td [;beta()-phy;perr; lph; ,t,;N-t,;k]TJ; 0 -;.9;U T; [0;data.frame(alpha,beta)alphabeta10.050.469559120.020.607165630.010.7316226NoticethatthetypeIIerrorprobabilityishighfor=0:05andincreasesasdecreases.Forvaryingrecapturesize,wecontinuewiththeRcommands:-phy;perr; lph; ,t,;N-t,;k]TJ; 0 -;.9;U T; [0;k()-c40;,60;,80;]TJ; 0 -;.9;U T; [0;ralpha()-c49;,70,;]T;J 0 ;-11.;ॖ ;Td [;beta()-phy;perr; lph; ,t,;N-t,;k]TJ; 0 -;.9;U T; [0;data.frame(k,beta)kbeta14000.4695591326000.2419490538000.09933596235