Iteratioal Joural of Mathematical Aalysis Vol. 8, 2014, o. 48, 2375-2383 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/10.12988/ijma.2014.49287 Estimatig Cofidece Iterval of Mea Usig Classical, Bayesia, ad Bootstrap Approaches Solimu Departmet of Mathematics Faculty of Mathematics ad Natural Scieces Uiversity of Brawijaya Jala Vetera Malag-Idoesia Copyright 2014 Solimu. This is a ope access article distributed uder the Creative Commos Attributio Licese, which permits urestricted use, distributio, ad reproductio i ay medium, provided the origial work is properly cited. Abstract I oe study, sometimes observed the characteristics of a populatio (eg the media, variace, media, or proportio). Give the limitatios ad costraits, it is ot possible to observe the whole of the populatio elemets. Alterative estimatio step is performed usig a populatio sample draw at radom from a populatio. I this study, the media iterval estimatio of the populatio ( ). There are three methods that will be studied is the classical method, Bayes approach, ad a bootstrap approach. This study focused o estimatig meas usig the third approach ad compare the results obtaied from the three approaches. Test results usig the data of the populatio obtaied a estimate of the value of the middle third populatio is relatively the same method, i which the bootstrap method produces the smallest cofidece iterval. Keywords: Cofidece iterval, classic, Bayes, ad Bootstrap 1 Itroductio All observatios, whether fiite or ifiite, comprise of what s kow as populatio. I a study, sometimes characteristics of a populatio are observed. Several statistical measures are used to discover the characteristics of populatios, such as mea, variace, media, or proportio.
2376 Solimu I statistical iferece we wat to draw coclusios o populatios, although it s impossible or impractical for us to observe all idividuals i a populatio. With various limitatios ad obstacles, it s impossible to observe the etire populatio elemets. A alterative step is estimatig populatios usig a radomly collected sample from a populatio. Oe of populatio parameter estimatio system based o sample statistics is cofidece iterval which is a system which produces represetative parameter estimatios. Statistical iferece theory icludes all methods used i drawig coclusios or geeralizig a populatio. The curret tedecy i estimatig a populatio parameter is the developmet of classical method which bases its coclusio oly o iformatio from a radom sample from the populatio. Two ew methods discussed i this study are Bayesia ad Bootstrap methods. Bayesia method uses or combies subjective kowledge o the distributio of ukow parameter opportuity with iformatio from data sample. Bootstrap method uses classical method which uses resamplig. Based o the backgroud above, the problem discussed was How is the use of iterval estimatio of the meas of a populatio usig classical method, Bayesia approach, ad bootstrap approach, ad the compariso of the three methods? The purpose of this study was usig iterval estimatio of the meas of a populatio usig classical method, Bayesia approach, ad bootstrap approach, ad the compariso of the three methods. The beefit of this study was researchers ca use Bayesia approach ad bootstrap approach as alteratives i parameter estimatio, aside from the popular classical method. 2 Materials ad Methods The populatio of a data is assumed to be ormally distributed with X N(µ, 2 ) where expectatio value of X is with mea µ ad variace 2. Populatio parameters µ ad 2 are ukow. Mea sample X ad variace s 2 are estimators of the mea ad variace of the populatio: 1 2 2 1 ˆ X X i da ˆ s X i X i 1 1 where Xi is radom variable take radomly from a populatio. Expectatio value of average sample is E ( X ) = µ ad Stadard deviatio Se ( X ) =. For a small sample ( < 30) the populatio distributes ormally (X N (µ, 2 )) ad 2 is ukow ad estimated by s 2, so it ca be formulated that: i 1 2
Estimatig cofidece iterval of mea 2377 X µ s t-1 where t-1 is produced from t distributio with degree of freedom -1, so cofidece iterval for mea is: P( t s 1 / 2, < µ < X 1 t s 1 / 2, ) = 95% X 1 I classical approach, cofidece iterval estimatio comes from asymptotic sample drawig theory, while for Bayesia approach, cofidece iterval estimatio comes from posterior distributio from the geeratio of sample data from data ad some cocetratio of prior distributio of parameters. At the first level of the model, it s assumed that the distributio of the sample is ormal Level 1 (DATA): Xi N(µ, 2 ). At the secod level, it specifies prior distributio for μ Level 2 (PRIOR): µ N(μμ, 2 μ ). At the third or last level, it specifies hyperprior distributio for 2, μμ, 2 μ. Level 3 (HYPERPRIOR): P( 2 ), P(μμ) ad P( 2 μ). This Bayesia approach geerate a sample for uobserved parameters µ (1), µ (2),, µ (k) of distributio µ. Every sample geeratio estimates posterior distributio for µ ad calculates posterior mea. Estimator of cofidece iterval of mea with cofidece level 95% is obtaied from percetile 2.5% ad 97.5% of the simulatio. Bootstrap method uses resamplig method. It s assumed that data distributio is ukow. x1,x2,...,x is a radom sample of F which is a ukow distributio, = (F) is parameter ad ˆ T( x,..., x ) is the ˆ * * 1 1 * estimatio of. Estimator T( x,...,x ) obtaied from bootstrap sample * * ( x1,...,x ) is called bootstrap replicatio for ˆ. This study uses data of bowlig scores preseted i Table 1.
2378 Solimu Table 1: Data Score Bowlig Game No Score No Score 1 93 12 72 2 119 13 118 3 110 14 73 4 72 15 102 5 99 16 122 6 85 17 70 7 53 18 81 8 70 19 130 9 66 20 97 10 142 21 89 11 63 22 27 Usig three method, classical, Bayesia, ad bootstrap, estimatio of cofidece level of a populatio was coducted. The software used were SPLUS ad Wibugs: 3 Result ad Discussio Figure 1 shows histogram ad data cocetratio fuctio. We ca see that the data has asymmetrical distributio. Estimator of the mea of the populatio is 88, 77 with stadard deviatio 5, 90. Cofidece iterval 95% for estimatio of the mea of the populatio is [76, 51; 101.05]. 0 2 4 6 0.0 0.002 0.004 0.006 0.008 0.010 0.012 0.014 20 40 60 80 100 120 140 160 data 0 50 100 150 data Figure 1: Histograms ad Desity Fuctio Data
Estimatig cofidece iterval of mea 2379 This Bayesia approach used software Wibugs. First, it defied model data ad estimatio of iitial value. Next, it performed simulatio with iteratio 10000. Figure 2 shows the mea obtaied i every simulatio. The fial part used aalysis based o 1001 st to 10000 th iteratios. mu 120.0 100.0 80.0 60.0 40.0 1000 2500 5000 7500 10000 iteratio Figure 2: Trace plots for the media populatio (after the disposal of the first observatio i 1000) Estimatio of cocetratio fuctio for posterior distributio for mea of the populatio is preseted i Figure 3. Estimatio of cofidece iterval of the mea of the populatio is obtaied from quatile values 2,5% ad 97,5% from the simulatio. 0.08 0.06 0.04 0.02 0.0 mu sample: 9001 40.0 60.0 80.0 100.0 Figure 3: Posterior desity fuctio for the distributio of the media populatio Estimator of the mea of posterior distributio is 88, 58 ad stadard deviatio is 6, 18. Cofidece iterval 95% for mea of the populatio is [76, 46; 100, 30]. Estimatio usig Maximum Likelihood i Bootstrap approach is 88, 78 with stadard deviatio 5, 75. Cofidece iterval 95% for mea of the populatio is [77, 50; 99, 95]. Figure 4 shows histogram ad cocetratio fuctio for the mea of the sample based o the result of 1000 bootstrap iteratios.
2380 Solimu 0 200 400 600 800 1000 1200 1400 dx$y 0.0 0.02 0.04 0.06 70 80 90 100 110 theta.x 70 80 90 100 110 theta Figure 4: Histograms ad Desity Fuctio Cetral Value Based o 1000 Repetitio Bootstrap Samples The results of the three methods are preseted i the followig table: Table 2: Estimatio of Cetral Value, Stadard Deviatio ad Cofidece Iterval Methods Classical, Bayes ad Bootstrap Method Cetral Value Stadard Deviatio Lower limit Hose cofidece Upper Limit Width Clasic 88,77 5,90 76,51 101,05 24,54 Bayes 88,58 6,18 76,46 100,30 23,84 Bootstrap 88,78 5,74 77,50 99,95 22,45 Table 2 shows that the mea obtaied from the three approaches were early the same, especially classical ad bootstrap methods. Similarly for stadard deviatio Bayesia method had the biggest stadard deviatio, ad Bootstrap method had the smallest stadard deviatio. Similarly for cofidece iterval, Bootstrap method had the smallest width of cofidece iterval. The mai differeces
Estimatig cofidece iterval of mea 2381 of the three methods were: 1) classical ad Bayesia methods required distributio assumptio to base the data, while bootstrap method did t assume data with certai distributio. 2) Classical method was derived from multiplicatio with critical value. This made the cofidece iterval produced to be symmetrical with mea estimator. While i Bayesia ad Bootstrap methods, cofidece iterval approaches used quatile 2,5% ad 97,5% which produced asymmetrical cofidece iterval. 4 Coclusio Cofidece iterval estimatio could use Classical, Bayesia ad Bootstrap methods. I the applicatio, by usig data of a populatio, three methods were relatively similar. Bootstrap method had the smallest width of cofidece iterval, idicatig that this method was more thorough ad recommeded. Ackowledgemets. May thaks to Uiversity of Brawijaya for fiacial support. Refereces [1]. Dukic, V., da Hoga, J.W. A hierarchical bayesia approach to modelig embryo implatatio followig i vitro fertilizatio. http://biostatistics.oxfordjourals.org/cgi/reprit/3/3/361.pdf. [2]. Friedma, N., Goldszmidt, M., ad Wyer, A. Data aalysis with Bayesia etworks: a bootstrap approach. Http://www.cs.huji.ac.il/~ir/Abstracts/FGW2.html. [3]. Matthew, J. B., Falciai, F., Ghahramai, Z., Ragel, C., da Wild, D. L.. A Bayesia approach to recostructig geetic regulatory etworks with hidde factors. Http://bioiformatics.oxfordjourals.org/cgi/cotet/full/21/3/349. [4]. Walpole, R.E. 1995. Pegatar Statistika. (I Idoesia) PT. Gramedia Pustaka Utama, Idoesia. Received: August 12, 2014 Appedix 1. Code
2382 Solimu Clasical Method data<-c(93,119,110,72,99,85,53,70,66,142,63,72,118,73,102,122,70,81,130,97,89,27) par(mfrow=c(1,2)) hist(data,col=0,class=7) dx<-desity(data) data<-dx$x plot(data,dx$y,type="l") s.data<-sum(data) ssq.data<-sum(data^2) <-legth(data) # histogram of replicates # desity estimate # sum the data # sum of square the data # sample size ml.x<-s.data/ mea ml.sd<-sqrt((ssq.data-s.data^2/)/(-1)) for stadard deviatio ml.se<-ml.sd/sqrt() df<--1 CIL<-ml.x-qt(0.975,df)*ml.se CIU<-ml.x+qt(0.975,df)*ml.se # maximum likelihood estimator for # maximum likelihood estimator # stadard error # degree of freedom # lower limit CI # upper limit CI ml.x ml.se CIL CIU Bayesia Approach model { } for( i i 1 : N ) { data[i] ~ dorm(mu,tau.c) } tau.c ~ dgamma(0.001,0.001) mu ~ dorm(alpha,tau.alpha) alpha ~ dorm(0.0,1.0e-6) tau.alpha ~ dgamma(0.001,0.001) list(n=22, data=c(93,119,110,72,99,85,53,70,66,142,63,72,118,73,102,122,70,81,130,97,89, 27)) list(mu=10, alpha = 0, tau.c = 1, tau.alpha = 1)
Estimatig cofidece iterval of mea 2383 Bootstrapig Method data<-c(93,119,110,72,99,85,53,70,66,142,63,72,118,73,102,122,70,81,130,97, 89,27) B<-10000 # umber of bootstrap theta.x<-c(1:b) # vector to keep the theta for (i i 1:B) { data.boot<-sample(data,size=,replace=t) # draw o-parametric bootstrap sample theta.x[i]<-mea(data.boot) # calculate theta } mu<-mea(theta.x) # mea of theta sd<-stdev(theta.x) # stadard deviatio of theta CIL<-quatile(theta.x,probs=0.025) # lower limit cofidece iterval CIU<-quatile(theta.x,probs=0.975) # upper limit cofidece iterval mu sd CIL CIU par(mfrow=c(1,2)) hist(theta.x,col=0,class=) dx<-desity(theta.x) theta<-dx$x plot(theta,dx$y,type="l") # histogram of replicates # desity estimate