Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Introductiontohypotheses
Astatisticalhypothesisisastatementabouttheparametersof oneormorepopulations. Thehypothesiswhetherornotthemeanofthepopulationis 0 isstatedas H0 :=0 H1 :0 H0 iscalledthenullhypothesisandH1 thealternative hypothesis. Thistypeofhypothesesiscalledtwosidedalternative.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Hypothesistestingproceduresrelyonusingtheinformation inarandomsamplefromthepopulationofinterest. Testingthehypothesisinvolvestakingarandomsample, computingateststatisticfromthesampledata,andthen usingtheteststatistictomakeadecisionaboutthenull using the test statistic to make a decision about the null hypothesis.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
TypeIerrorisdefinedasrejectingthenullhypothesisH0 whenitistrue. TypeIIerrorisdefinedasfailingtorejectthenullhypothesis whenitisfalse. The probability of type I error is given by TheprobabilityoftypeIerrorisgivenby =P(typeIerror) TheprobabilityoftypeIIerrorisgivenby =P(typeIIerror)
Decision Fail torejectH0 RejectH0 H0 istrue Noerror TypeIerror H0 isfalse TypeIIerror Noerror
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Thepowerofastatisticaltestistheprobabilityofrejecting thenullhypothesisH0 whenthealternativehypothesisistrue. Thepowerisequalto1. ThePvalueisthesmallestlevelofsignificancethatwould leadtorejectionofthenullhypothesiswiththegivendata. lead to rejection of the null hypothesis with the given data
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Practice
Inaliquidfillingoperation,thetargetfillingvolumeis50ml. Ifwewanttotestwhetherthefillingoperationisactually producing50ml,wecanevaluatethehypothesis d i 50 l l t th h th i H0 :=50 H1 :50 Here,isthepopulationmeanortheactualfillingvolumeof theprocess. the process Theunbiasedestimatorofthepopulationmeanisthesample average. AssumethatwewillrejectH0 ifthesampleaveragefalls below48.5orabove51.5.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Assumenowthatthemeanfillingvolumeisnot50,but52ml. Then,theprobabilityoftypeIIerroris
= P{48.5 X 51.5when = 52} 51.5 52 48.5 52 = P Z 2.5 / 10 2.5 / 10 = P{ 4.43 Z 0.63} 3 = 0.2643
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Testsofthemeanofanormaldistribution, varianceknown
Inthecaseofthehypothesistestonthemeanofanormal population,weusetheteststatistic
Z0 = X 0 / n
For the t o sided alternati e H0 sho ld be rejected if Forthetwosidedalternative,H shouldberejectedif z0 >z/2 or z0 < z/2 Fortheonesidedalternative,H0 shouldberejectedif z0 >z forH1 :>0 z0 < z forH1 :<0
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
ThePvalueiscomputedasfollows
2[1 (| z0 |)] if H1 : = 0 P = 1 (| z0 |) if H1 : > 0 (| z |) if H1 : < 0 0
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
,samplesize,andOCcurves
Supposeforatwosidedalternativehypothesis,H0 isfalseand thetruemean =0 +. Wecanwritetheteststatistic
Z0 = X 0 X ( 0 + ) = + / n / n / n
byaddingandsubtractingaconstantterm Since the mean of the first term is zero then the distribution Sincethemeanofthefirsttermiszero,thenthedistribution ofZ0 whenH1 istrueis
Z0 ~ N ,0 / n
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Thevalueof dependsonthesamplesize,thestandard deviation,andthedeviation. The operating characteristic curves make it easy to compute Theoperatingcharacteristiccurvesmakeiteasytocompute thevalueof. TheOCcurvesplot versusthenormalizeddeviationfor varioussamplesizes. Thenormalizeddeviationiscomputedasd=||/. The OC curves can be also used to find the required sample TheOCcurvescanbealsousedtofindtherequiredsample sizeforagiven andd.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Testsofthemeanofanormaldistribution, varianceunknown
Theteststatisticforthehypothesistestonthemeanofa normalpopulationwithunknownvarianceis X 0 T0 = S/ n For the t o sided alternati e H0 sho ld be rejected if Forthetwosidedalternative,H shouldberejectedif t0 >t/2,n1 or t0 < t/2,n1 Fortheonesidedalternative,H0 shouldberejectedif t0 >t,n1 forH1 :>0 ,n 1 t0 < t,n1 forH1 :<0
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Testsonthevarianceofanormaldistribution
Thehypothesisonthepopulationvarianceisstatedas H0 :2 =02 Theteststatisticforhypothesistestsonthevarianceis (n 1) S 2 2 0 = 2 0 Fortwosidedalternative,H0 shouldberejectedif 2 2 2 2 0 > / 2,n 1 or 0 < 1- / 2,n 1 H0 shouldberejectedforonesidedalternativesif 2 2 2 0 > ,n 1 for H1 : 2 > 0
2 2 0 < 1- ,n 1
for
2 H1 : 2 < 0
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
,samplesize,andOCcurves
Theoperatingcharacteristiccurvesforthehypothesisonthe populationvarianceareprovided. ThexaxisontheOCcurvesistheratioofthetruestandard deviationoverthehypothesizedstandarddeviation:
= 0
isthetruestandarddeviationand0 isthehypothesizeds.d. yp
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Testsonapopulationproportion
Whenthepopulationisdividedintotwodissimilargroups,the numberofelementsinonegrouprelativetothepopulationis callproportion. ll ti Proportionsfollowreasonablythebinomialdistribution. The hypothesis of interest is Thehypothesisofinterestis H0 :p=p0 H1 :pp0 When the sample satisfies the conditions that np0 5 and Whenthesamplesatisfiestheconditionsthatnp 5and n(1p0) 5, thenormaldistributionapproximatesthe binomialdistribution.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Theteststatisticbasedonthenormalapproximationis P p0 Z0 = p0 (1 p0 ) / n
P whereisthesampleproportion. Fortwosidedalternative,H0 isrejectedif z0 > z/2 >z or or z0 < z/2 <
In case of onesided alternative, H0 should be rejected if Incaseofone sidedalternative,H shouldberejectedif z0 >z forH1 :p>p0 z0 < z forH1 :p<p0
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Practice
Acompressedtamor packagingplanthasdeterminedthat leakageinpackscanhappenandcustomerswouldtoleratea fractionofleakingcompresseddatespacksnotexceeding5%. f ti f l ki dd t k t di 5% Toassessthecapabilityoftheplantinmeetingthecustomers requirement,theindustrialengineerhastotestthe q , g hypothesisthatthefractionofbaddatesislessthan5%: H0 :p=0.05 H1 :p<0.05 Hecollectedarandomsampleof200datespacksandfound4 leakingpacks.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
z0 =
4 200
0.05
= 1.95
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
andthechoiceofthesamplesize
Beforenormalization,thelimitsoftheacceptanceregionare
p0 z / 2 p0 (1 p0 ) / n
and
p0 + z / 2 p0 (1 p0 ) / n
p0 z / 2 p0 (1 p0 ) / n p p (1 p ) / n
and
p0 + z / 2 p0 (1 p0 ) / n p p (1 p) / n
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
TheprobabilityoftypeIIerrorisgivenbytheareaunderthe normalcurveinsidetheacceptanceregion:
p0 + z / 2 p0 (1 p0 ) / n p p0 z / 2 p0 (1 p0 ) / n p = p (1 p) / n p (1 p ) / n
ForH1:p<p0,theprobabilityis p0 z p0 (1 p0 ) / n p = 1 p (1 p ) / n ForH1:p>p0,theprobabilityis p0 + z p0 (1 p0 ) / n p = p(1 p) / n
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
z / 2 p0 (1 p0 ) z p(1 p) n= p p0
andforonesidedalternative
z p0 (1 p0 ) z p(1 p) n= p p0
Practice
Inthecompresseddatespackagingoperation,theindustrial engineerwouldliketodesignahypothesisontheproportion ofleakingpacksthatwilldetectashiftintheproportionof f l ki k th t ill d t t hift i th ti f 0.03byaprobabilityof0.9. So,theprobabilityoftypeIIerrorhastobe0.1. , p y yp Usingthepreviousonesidedalternativehypothesis,z0.05 = 1.64andz0.1 =1.28. Therequiredsamplesizeis
1.64 0.05(1 0.05) (1.28) 0.03(1 0.03) n= = 832 0.03 0.05
2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Inferenceconcerningtwomeans,variancesknown
Itisassumedthetwopopulationsareindependentand normal. Thehypothesisconcerningthedifferenceonthemeansof twopopulationsis: H0: 1 2 = 0 : = Theteststatisticforthishypothesisis
Z0 =
X1 X 2 0
2 1 2 + 2 n1 n2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
TypeIIerrorandsamplesize
TheOCcurvesforthesinglepopulationmeancanbeusedon thecaseoftwopopulationmeans,wherethepointonthe horizontallineisdefinedas h i t l li i d fi d
d= 0
2 12 + 2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Inferenceconcerningtwomeans,variancesunknown
Ifthevariancesofthetwopopulationsareknowntobeequal, thepooledestimatorofthecommonvarianceisused:
2 (n1 1) S12 + (n2 1) S 2 S = n1 + n2 2 2 p
Theteststatisticis
X1 X 2 0 T0 = 1 1 + Sp n1 n2
whichhasatdistributionwithn1+n22degreesoffreedom.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Forthetwosidedalternative,H0 shouldberejectedif
t0 > t / 2,n1 + n2 2 or
t0 > t ,n1 + n2 2
t0 < t / 2,n1 + n2 2
Fortheonesidedalternative,H0 shouldberejectedif
for H 0 : 1 2 > 0
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Whenthetwovariancesarenotequal,theirestimatesare usedincomputingthevalueoftheteststatistic. Theteststatisticis X1 X 2 0 T0 = 2 S12 S 2 + n1 n2 whichhasatdistributionwith degreesoffreedomequalto which has a t distribution with degrees of freedom equal to 2 2 2 s1 s2 + n n = 2 12 2 2 ( s1 / n1 ) ( s2 / n2 ) 2 + n1 1 n2 1 roundedtothenearestinteger.
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
andsamplesize
TheOCcurvesareavailableonlyforthecasewherethetwo variancesareequal. Thepointonthehorizontallineisdefinedas
d= 0 2
Hypothesistestsontheratiooftwovariances
Thehypothesisofconcernis: H0:12 =22 Theteststatisticis F0 =S12/S22 Thenullhypothesisisrejectedinfollowingalternativecases:
2 2 f 0 > f / 2,n1 1,n2 1 or f 0 < f1- / 2,n1 1,n2 1 for H1 : 1 1
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
TypeIIerrorandsamplesize
Theoperatingcharacteristiccurvesrelatethesamplesize, probabilityoftypeIIerror,andthetwostandarddeviations ratio: ti
= 1 2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Hypothesisontwopopulationproportions
Thehypothesisontheequalityoftwopopulationproportions is H0:p1 p2 =0 For s fficientl large samples the mean difference in Forsufficientlylargesamples,themeandifferencein p1 p2 proportionsisnormallydistributedwithmeanand variance p1 (1 p1 ) + p2 (1 p2 ) . n1 n2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Thestatistic
P P2 ( p1 p2 ) 1 Z= p1 (1 p1 ) p2 (1 p2 ) + n1 n2 isnormallydistributedwithmean0andvariance1,where P and P2 arethesampleproportions. 1 For the hypothesis on the equality of the two proportions the Forthehypothesisontheequalityofthetwoproportions,the teststatisticis p1 p2 Z0 = p1 (1 p1 ) p2 (1 p2 ) + n1 n2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
Fortwosidedalternative,H0 isrejectedif or z0 < z/2 z0 >z/2 Incaseofonesidedalternative,H0 shouldberejectedif z0 >z forH1 :p1 >p2 z0 < z forH1 :p1 <p2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM
TypeIIerrorandsamplesize
Thelimitsoftheconfidenceintervalontheproportions differenceare
P (1 P ) P2 (1 P2 ) 1 1 P z P + 1 2 /2 n1 n2 and P (1 P ) P2 (1 P2 ) 1 1 P +z P + 1 2 /2 n1 n2
DrMuhammadAlSalamah,IndustrialEngineering,KFUPM