资源描述:
《think bayes bayes’s theorem》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、CHAPTER1Bayes’sTheoremConditionalprobabilityThefundamentalideabehindallBayesianstatisticsisBayes’stheorem,whichissur‐prisinglyeasytoderive,providedthatyouunderstandconditionalprobability.Sowe’llstartwithprobability,thenconditionalprobability,thenBayes’stheorem,andontoBayesianstat
2、istics.Aprobabilityisanumberbetween0and1(includingboth)thatrepresentsadegreeofbeliefinafactorprediction.Thevalue1representscertaintythatafactistrue,orthatapredictionwillcometrue.Thevalue0representscertaintythatthefactisfalse.Intermediatevaluesrepresentdegreesofcertainty.Thevalue0
3、.5,oftenwrittenas50%,meansthatapredictedoutcomeisaslikelytohappenasnot.Forexample,theprobabilitythatatossedcoinlandsfaceupisverycloseto50%.Aconditionalprobabilityisaprobabilitybasedonsomebackgroundinformation.Forexample,IwanttoknowtheprobabilitythatIwillhaveaheartattackinthenexty
4、ear.AccordingtotheCDC,“Everyyearabout785,000Americanshaveafirstcoronaryattack(http://www.cdc.gov/heartdisease/facts.htm).”TheU.S.populationisabout311million,sotheprobabilitythatarandomlychosenAmericanwillhaveaheartattackinthenextyearisroughly0.3%.ButIamnotarandomlychosenAmerican.
5、Epidemiologistshaveidentifiedmanyfac‐torsthataffecttheriskofheartattacks;dependingonthosefactors,myriskmightbehigherorlowerthanaverage.Iammale,45yearsold,andIhaveborderlinehighcholesterol.Thosefactorsincreasemychances.However,IhavelowbloodpressureandIdon’tsmoke,andthosefactorsdec
6、reasemychances.1Pluggingeverythingintotheonlinecalculatorathttp://hp2010.nhlbihin.net/atpiii/calculator.asp,Ifindthatmyriskofaheartattackinthenextyearisabout0.2%,lessthanthenationalaverage.Thatvalueisaconditionalprobability,becauseitisbasedonanumberoffactorsthatmakeupmy“condition
7、.”TheusualnotationforconditionalprobabilityispAB,whichistheprobabilityofAgiventhatBistrue.Inthisexample,ArepresentsthepredictionthatIwillhaveaheartattackinthenextyear,andBisthesetofconditionsIlisted.ConjointprobabilityConjointprobabilityisafancywaytosaytheprobabilitythattwothings
8、aretrue.IwritepAandBtomeantheprobability