资源描述:
《reilly media] r cookbook general statistics》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、CHAPTER9GeneralStatisticsIntroductionAnysignificantapplicationofRincludesstatisticsormodelsorgraphics.Thischapteraddressesthestatistics.Somerecipessimplydescribehowtocalculateastatistic,suchasrelativefrequency.Mostrecipesinvolvestatisticaltestsorconfidenceintervals.Thestatis
2、ticaltestsletyouchoosebetweentwocompetinghypotheses;thatparadigmisdescribednext.Confidenceintervalsreflectthelikelyrangeofapopulationparameterandarecalculatedbasedonyourdatasample.NullHypotheses,AlternativeHypotheses,andp-ValuesManyofthestatisticaltestsinthischapteruseatime-
3、testedparadigmofstatisticalinference.Intheparadigm,wehaveoneortwodatasamples.Wealsohavetwocom-petinghypotheses,eitherofwhichcouldreasonablybetrue.Onehypothesis,calledthenullhypothesis,isthatnothinghappened:themeanwasunchanged;thetreatmenthadnoeffect;yougottheexpectedanswer;t
4、hemodeldidnotimprove;andsoforth.Theotherhypothesis,calledthealternativehypothesis,isthatsomethinghappened:themeanrose;thetreatmentimprovedthepatients’health;yougotanunexpectedanswer;themodelfitbetter;andsoforth.Wewanttodeterminewhichhypothesisismorelikelyinlightofthedata:1.T
5、obegin,weassumethatthenullhypothesisistrue.2.Wecalculateateststatistic.Itcouldbesomethingsimple,suchasthemeanofthesample,oritcouldbequitecomplex.Thecriticalrequirementisthatwemustknowthestatistic’sdistribution.Wemightknowthedistributionofthesamplemean,forexample,byinvokingth
6、eCentralLimitTheorem.3.Fromthestatisticanditsdistributionwecancalculateap-value,theprobabilityofateststatisticvalueasextremeormoreextremethantheoneweobserved,whileassumingthatthenullhypothesisistrue.1954.Ifthep-valueistoosmall,wehavestrongevidenceagainstthenullhypothesis.Thi
7、siscalledrejectingthenullhypothesis.5.Ifthep-valueisnotsmallthenwehavenosuchevidence.Thisiscalledfailingtorejectthenullhypothesis.Thereisonenecessarydecisionhere:Whenisap-value“toosmall”?Inthisbook,Ifollowthecommonconventionthatwerejectthenullhypothesiswhenp<0.05andfailtorej
8、ectitwhenp>0.05.Instatisticalterminology,Ichoseasignificancelevelofα=0.05to