资源描述:
《introduction to bayesian thinking-single》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、2IntroductiontoBayesianThinking2.1IntroductionInthischapter,thebasicelementsoftheBayesianinferentialapproachareintroducedthroughthebasicproblemoflearningaboutapopulationpropor-tion.Beforetakingdata,onehasbeliefsaboutthevalueoftheproportionandonemodelshisorherbeliefsintermsofap
2、riordistribution.Wewillillus-tratetheuseofdifferentfunctionalformsforthisprior.Afterdatahavebeenobserved,oneupdatesone’sbeliefsabouttheproportionbycomputingtheposteriordistribution.Onesummarizesthisprobabilitydistributiontoper-forminferences.Also,onemaybeinterestedinpredictingt
3、helikelyoutcomesofanewsampletakenfromthepopulation.ManyofthecommandsintheRbasepackagecanbeusedinthissetting.Theprobabilitydistributioncommandssuchasdbinomanddbeta,andsimu-lationcommands,suchasrbeta,rbinom,andsample,arehelpfulinsimulat-ingdrawsfromtheposteriorandpredictivedistr
4、ibutions.AlsoweillustratethespecialRcommandspdisc,histprior,anddiscintintheLearnBayespackage,whicharehelpfulinconstructingpriorsandcomputingandsumma-rizingaposterior.2.2LearningAbouttheProportionofHeavySleepersSupposeapersonisinterestedinlearningaboutthesleepinghabitsofAmer-ic
5、ancollegestudents.Shehearsthatdoctorsrecommendeighthoursofsleepforanaverageadult.Whatproportionofcollegestudentsgetatleasteighthoursofsleep?HerewethinkofapopulationconsistingofallAmericancollegestudentsandletprepresenttheproportionofthispopulationwhosleep(onatypicalnightduring
6、theweek)atleasteighthours.Weareinterestedinlearningaboutthelocationofp.J.Albert,BayesianComputationwithR,UseR,DOI10.1007/978-0-387-92298-02,©SpringerScience+BusinessMedia,LLC2009202IntroductiontoBayesianThinkingThevalueoftheproportionpisunknown.IntheBayesianviewpoint,aperson’s
7、beliefsabouttheuncertaintyinthisproportionarerepresentedbyaprobabilitydistributionplacedonthisparameter.Thisdistributionreflectstheperson’ssubjectiveprioropinionaboutplausiblevaluesofp.Arandomsampleofstudentsfromaparticularuniversitywillbetakentolearnaboutthisproportion.Butfirst
8、theresearcherdoessomeinitialresearchtolearnaboutthesleepingha