IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04. Bayes Iterval Estmato for bomal proporto ad dfferece of two bomal proportos wth Smulato Study Masoud Gaj, Solmaz hlmad Departmet of Statstcs, Faculty Mathematcal Scece, Uversty of Mohaghegh Ardabl Ardabl, Ira Departmet of Statstcs, Faculty Mathematcal Scece, Uversty of Mohaghegh Ardabl Abstract Ardabl, Ira Ths study s cosdered a umber of popular cofdece terval for bomal proporto ad the dfferece of two bomal proportos. A ew approach s proposed base o Bayesa vew for bomal proporto ad also for dfferece of two bomal proportos. The Bayes cofdece tervals compared wth other cofdece tervals of coverage probablty ad expected legth. Based o ths aalyss ad t, he smulato study recommed the Bayes cofdece terval of bomal proporto ad dfferece of two bomal proportos for small sample, ad show ther superor performace from both crtera. Keywords: Bayes terval, coverage probablty, cofdece terval, expected legths.. Itroducto I recet years the terval estmato of bomal proporto ad dfferece of two bomal proportos has bee revewed. Ths s due to poor ad rregular behavor of Wald cofdece terval of coverage probablty, t s metoed by rest ad Coull[], rest ad Caffo[], Brow et al.[5] ad Newcomb[7]. Stadard cofdece terval s used globally, sce t s structure s smple, ad t ca be accouted as the represetatve of cofdece terval for bomal proporto ad dfferece of two bomal proportos. Ths cofdece terval, s acqured of vertg Wald test, ad s kow to Wald cofdece terval. Nevertheless, the erratc behavor of the coverage probablty of cofdece terval s metoed several papers. For example, rest ad Caffo[] shows the poor performace of Wald cofdece terval, by usg of drawg ad umercal methods ad by addg successes ad falures to the sample sze, they mproved cofdece terval for the bomal proportos whch s show the performace of ew cofdece terval of coverage probablty, whch mproved cofdece terval s kow as rest-coull cofdece terval. rest ad Coull[] by addg success ad falure to the sample sze, they mproved cofdece terval for the dfferece of two bomal proportos, whch s show the superor performace of ew cofdece terval of coverage probablty. Newcomb[7] by usg lower ad upper lmts of score cofdece terval, made the ew cofdece terval by combato of these lmts for dfferece of two bomal proportos, ad by comparso of ths cofdece terval wth te others famous cofdece terval, the he showed t s good performace of coverage probablty. There are 550
IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04. much cofdece terval (CI) such as Wlso CI, arcse CI, logt CI, exact CI, lkelhood rato CI ad Jefferys CI for bomal proporto. It should explaed that, the Bayes estmator x + 0.5 p = s obtaed by usg the m + Jeffery Beta form, wth parameters (0.5,0.5) as a pror dstrbuto, ad the Jeffery approxmate CI obtaed by usg the ormal approxmato. For such estmator, ths CI, s recommeded for small sample sze (less tha 40) (Brow et al.[5], [6]). There for, we apply the Beta( β, ) pror dstrbuto ad ormal approxmato to make Bayes approxmate CI. We kow that, the pror dstrbuto Beta( β, ) for bomal dstrbuto s cojugate. If we assume that X ~ bom (, p ), ad p has the pror dstrbuto Beta( β, ), the posteror dstrbuto of p s Beta( x +, m x + β). By usg of the ormal approxmate, we get : p ( p ) P x ~ N ( p, ) () ( + + β + ) There for by otce to the above approxmato, we ca proposed the Bayes approxmate of CI ad secto ad 3 we show that, for sutable amout of ad β comparso wth the other CIs, the Bayes CI volve the best performace the coverage probablty ad expected legth.. Cofdece terval of bomal proporto ad dfferece of two bomal proportos.. Cofdece terval of bomal proporto Fg. coverage probablty of 95% cofdece tervals for =5 Wald CI ( CI w ): If x, x,., x s a radom sample from bomal dstrbuto wth ukow parameter P ad kow parameter, the MLE of p s x pˆ =. As t s metoed most of text books CIw of p s equal wth : CI = pˆ ± z pˆ( pˆ)/ () w Where z / deote the upper /qutle of the stadard ormal dstrbuto. rest-coull CI ( CI AC ) : rest ad Coull[] mproved CI w, by addg two successes ad two falures to the sample sze, that s, they replaced by = + 4 ad ˆp wth x + p =, whch s + 4 performace mproved the CI w. The CIAC s as : CI = p ± z p ( p ) / (3) AC Exact CI ( CI E ): I cotrast to CIw, most advaced statstcal text books recommed the 55
IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04. CI E whch preseted by Clopper-Pears o (934). CI E of p, obtaed by vertg the bomal test of H 0 : p = p0 wth equal-tald ad by solvg the followg equatos wth respect to p,.e : 0 x p k = 0 k ad p k = x k ( p ) = k k 0 0 ( p ) = k k 0 0 Ths estmated CI E esures that, coverage probablty for all of the amout of p s at least, for x=,,...-. The CI E s as follows : P x ~ Beta( x +, x + ) By usg the ormal approxmate we get: p ( p ) P x ~ N ( p, ) ( + 5) x + ad by usg p = as a estmato of p, + 4 ca be obtaed as follows : CI = p ± z p ( p ) / ( + 5) (5) B Fg. 3 average expected legths of 95% cofdece tervals, =5 CI E x + xf = [ + ] < p (4) x,( x + ), / x < [ + ] ( x + ) F( x + ),( x ), / Where F s measure of F dstrbuto wth abc,, "a" ad "b" degree of freedom ad "-c" qutle. Fg. coverage probablty of 95% cofdece tervals for =50.. Cofdece terval of dfferece of two bomal proportos The followg otato used frequetly ths artcle. X bom (, p), y bom (, p), = p p, q = p, =, ad the MLE of p ad p are X y pˆ =, pˆ = respectvely. m Bayes CI ( ): Accordg to pror dstrbuto Beta(, ), the posteror of p s : Wald CI ( CI W ): The dstrbuto of statstcs ( ˆ ) T = approxmately teds to the stadard σ ˆ ormal dstrbuto, sce σ ˆ s the cosstet estmator of V ar ( ) = pq / + p q / m, we ca replace MLE of the parameters above formula 55
IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04..e. V ar ( ˆ ) = pˆˆ ˆˆ q / + p q / m, where = ˆ p ˆ ˆ p ad get CI W as; CI = ± ˆ z pˆˆ q / + pˆˆ/ q m (6) w rest CI ( CI ) : rest ad Caffo[] estmated both of populatos parameters by addg oe success ad oe falure for each sample ad obtaed X + p = ad Y + p = + m + as a estmato of p ad p respectvely. They gat CI for dfferece of bomal proportos as follows : CI = p p ± z p q / ( + ) + p q / ( m + ) ( 7) Newcomb CI ( CI ): Newcomb[7] by usg ew lower ad upper lmts of Wlso CI for p ad p separately, made the ew CI wth combg of ths lmtato. (see Newcomb[7]). ( l, u ) are becomes from the soluto of the quadratc equato ( pˆ p) z =, wth respectve to p ( p ) / p, =,, wth ( = ad = m, as follow : ( ) ( ) l l u u pˆ pˆ z / +, ( ) ( ) l l u u pˆ ˆ p + z / + m m ) (8) Bayes CI ( ): To fd CIB for bomal proporto, we get pror dstrbuto Beta( β, ) wth = β =, whch s acqures Bayes estmate of p as x + p =. By regardg ths fact ad + 4 cosderg the depedet pror dstrbuto Beta(,), for each populatos, the posteror dstrbuto of p ad p are as follows: P x ~ Beta( x +, x + ) ad P y ~ Beta ( y +, m y + ) Now by usg the ormal approxmato, we get : p ( p ) P x ~ N ( p, ) ( + 3) ad p ( p ) P y ~ N ( p, ) ( m + 3) Whch mples that, x + p = ad y + p + =. m + So of two bomal proportos s : CI = p p ± z p q / ( + 3) + p q / ( m + 3) B Fg. 4 Compare coverage probablty of 95% cofdece tervals for fxed =0, varable p ad =m=0 (9) 3. comparso of cofdece terval of bomal proporto 3.. Coverage probablty of cofdece terval of bomal proporto We wll compare four CIs term of coverage probablty wth ths defto of performace, the CI whch s closer to omal level has preferece tha to other CIs, other words, the lowest oscllato s otceable. I ths vew, a approxmate of CI of ( ) of level should cover the rght umber of parameter approxmately 00 ( ) tmes, so we ca 553
IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04. cosder the coverage probablty of CI as follows : k k C( p) = I( k, p) p ( p) k = 0 k Where I(k, p) s equal to oe, f CI cludes p, otherwse s equal to zero. Fgs. ad dcate the coverage probablty of four CIs for a sample sze =5 ad =50, respectvely. It seems that, except CIw, the other CIs have acceptable performace term of coverage probablty. CI AC ad are closer oscllato to omal level, ad CI E s upper tha omal level. By otce to Table, we ca see that, has the less dstace of omal level wth respect to other CIs, such as, CI E has the upper omal level wth respect to other CIs. Fg. 5 Compare coverage probablty of 95% cofdece tervals for varable, fxed p=0.5 ad =m=0 3.. Expected legth of cofdece terval of bomal proporto The legth of CI s oe of the most mportat performace crtera. I Fg. 3, four CIs from expected legth are comparso for =5, ad as t s see, s shorter tha CI E ad CIAC ad ths s true eve for CIw for dstace of 0. utl 0.8. We see that, the CIAC ca ever be shorter tha. Accordg the Table, we see that, CIw has the shortest legth comparso wth other tervals small sample sze ad t ca be argued that, acts as short as CIw ad has much better performace tha the other two CIs. But wheever, whe the sample sze s greater, the dfferece betwee CIs becomes less, term of legth crtera. Ths was expected for us, accordg to CIs structure. 4. The compare of cofdece terval for dfferece of two bomal proportos 4.. Coverage probablty of cofdece terval for dfferece of two bomal proportos Wth respect to structure of CIs of two bomal proporto, whch have four parameters as (m,, p, ), we compared here, four CIs for dfferet values of ther parameters. Fg. 4 s drow wth assumpto fxed ad varable p ad =m=0. Smply t s recogzable that CI ad ew have the better performace tha CI ad especally performace tha CI W. Fg. 5 s drow for p=0.5 ad =m=0 ad for as a varable, here t s recogzable that, CI has the least oscllato from omal level, ad CI W ever reach to omal level ad CI below omal level s oscllato. ew Table 3 dcates the average coverage probablty of four CIs dfferet stuato. Accordg o ths table, we ca remark that has better performace average coverage probablty tha the CI, ew CI ad especally CI W. 4.. Expected legth of cofdece terval for dfferece of two bomal proporto 554
IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04. The legth of CI s aother mportat attrbute evaluato of a CI. As show Fg. 6 ad Table 4, expected legth of the CI W s much shorter tha CI ad CI for smaller sample sze. ew Whle performs as short as CI W term of expected legth ad also, for larger sample ther performace s very smlar from ths vewpot. Fg. 6 Compare expected legths of 95% cofdece tervals for =0, =30 ad m=0 coverage probablty. Also for fxed value of p ad varable, we recommeded the CI ad wth respect to others. Ad whe the value of s fxed ad parameter p s varable, we proved that, CI ad ew have the better performace tha the two other CIs, especally CI W. At last, t s possble that we fd out that the ad for all sample szes dfferet stuato, has better performace from both comparatve crtera. 5. Cocluso I ths study, we develop by smulato study a CI for bomal proporto ad dfferece of two bomal prop ortos the hope that, ew CI s smple ad useful for early all sample sze. We revewed the popular CI of bomal proporto ad dfferece of two bomal proportos. By dog smlar process we obtaed other Bayes CI for bomal proporto ad dfferece of two bomal proportos. Applyg of umercal tables ad drawg dagrams, we showed that, has the good performace both of the coverage probablty ad expected legth for small sample sze. For a larger sample sze (>40) except CI W, the others CI have acceptable coverage probablty such that, the CI s preferred for ts smplcty structure. I ths paper we compared CIs of bomal proporto, ad dcate the poor performace of CI W Refereces []A. rest, B.A. Coull "Approxmato s better tha exact for terval estmato of bomal proportos", Amer. Statst. 5, 998, 9 6. [] A. rest, B. Caffo "Smple effectve cofdece tervals for proportos ad dffereces of proportos result from addg two successes ad two falures." Amer. Statst, 54, 000, 80 88. [3] E.B. Wlso, "Probable ferece the law of successo ad statstcal ferece, " J. Amer. Statst. Assoc.,, 97, 09. [4] L. D. Brow, "Cofdece terval for two sample bomal dstrbuto", J.Statst Pla. Ifer.30, 004, 359-375. [5] L. D. Brow, T.T. Cao, A. DasGupta, "Iterval estmato for a bomal proporto". Statst. Sc, 6, 00, 0 33. [6] L. D. Brow, T.T. Cao, A. DasGupta, "Cofdece tervals for a bomal proporto ad asymptotc expasos", A. Statst, 30, 00, 60 0. [7] R. Newcombe, "Iterval estmato for the dfferece betwee depedet proportos: comparso of eleve methods", Statst. Med, 7, 998, 873 890. [8] S. Lee, "Iterval estmato of bomal proportos based o weghted Polya posteror",com.statst.5, 005, 0-0. 555
IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04. Frst Author: Masoud Gaj s Assocate Professor at Departmet of Statstcs, Faculty of Mathematcal Scece, Uversty of Mohaghegh Ardabl, Ardabl, Ira. He obtaed hs Ph. D. from the Natoal Uversty of Delh, Ida. Hs research terests are the areas of Appled Mathematcs, Statstcal ferece. He has publshed research artcles reputable teratoal jourals of Statstcs ad sceces. He s referee ad edtor of mathematcal jourals the frame of Appled Mathematcs ad Statstcs. He s curretly Drector of the joural of Hyperstructures. Secod Author: Solmaz hlmad s M.Sc. studet of Statstcs the uversty of Mohaghegh Ardabl, Ardabl, Ira. Her ma research terests are Dstrbuto theory, Parameter estmato, Bayes estmato. Table Ttles ad Legeds Table. Compare coverage probablty of 95% cofdece tervals for varable Method =5 =5 =30 =40 =50 Wald 0.65 0.89 0.884 0.90 0.909 AC 0.967 0.963 0.96 0.959 0.957 Bayes 0.950 0.954 0.956 0.955 0.955 Exact 0.990 0.980 0.974 0.97 0.968 Table. Compare average expected legths of 95% cofdece tervals for varable Method =5 =5 =30 =40 =50 Wald 0.59 0.365 0.70 0.36 0. AC 0.606 0.389 0.80 0.43 0.8 Bayes 0.57 0.379 0.76 0.4 0.6 Exact 0.676 0.48 0.97 0.56 0.8 Table. 3 Compare coverage probablty of 95% cofdece tervals Method Wald AC Bayes ewcomb =0,m==5 0.94 0.990 0.959 0.960 =0.,m==5 0.840 0.980 0.963 0.96 =0,m==50 0.947 0.956 0.956 0.957 =0.,m==50 0.943 0.95 0.950 0.95 =0,=40,m=30 0.947 0.960 0.957 0.956 =0.,=40,m=30 0.939 0.95 0.95 0.954 =0,=0,m=5 0.946 0.963 0.957 0.957 =0.,=0,m=5 0.94 0.959 0.957 0.96 P=0.5,m=40,=5 0.99 0.955 0.950 0.953 P=0.,m=40,=5 0.9 0.956 0.95 0.955 556
IJIEST Iteratoal Joural of Iovatve Scece, Egeerg & Techology, Vol. Issue 5, July 04. Table. 4 Compare average expected legths of 95% cofdece tervals Method Wald AC Bayes ewcomb =0,m==5 0.804400 0.908448 0.8499346 0.9740487 =0.,m==5 0.907954 0.99898 0.870335 0.974643 =0,m==50 0.3079 0.3076849 0.30479 0.30968 =0.,m==50 0.33739 0.3304354 0.373357 0.393394 =0,=40,m=30 0.365507 0.3707945 0.365575 0.3748306 =0.,=40,m=30 0.398733 0.39645 0.3907539 0.3945575 =0,=0,m=5 0.58604 0.655786 0.59409 0.630 =0.,=0,m=5 0.647335 0.64366 0.655 0.64605 P=0.5,m=40,=5 0.54784 0.5508 0.5558 0.5508 P=0.,m=40,=5 0.456966 0.4633073 0.45536 0.469565 557