




已阅读5页,还剩28页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
BEO2255AppliedStatisticsforBusiness,WeekSixAnalyzingcategoricaldata:Chi-squaredtests,1,Thisweeklecturewillcover.,Analysingcategoricaldata(nominal)Chi-squaretestofdifferencesbetweenproportionsChi-squaretestofindependence,2,SPSS单样本非参数检验,总体分布的chi-square检验(1)目的:根据样本数据推断总体的分布与某个已知分布是否有显著差异-吻合性检验。适用于分类资料的统计推断,3,SPSS单样本非参数检验,总体分布的chi-square检验(2)基本假设:H0:总体分布与理论分布无显著差异(3)基本方法根据已知总体的构成比计算出样本中各类别的期望频数,计算实际观察频数与期望频数的差距,即:计算卡方值卡方值较小,则实际频数和期望频数相差较小.如果P大于a,不能拒绝H0,认为总体分布与已知分布无显著差异.反之,4,SPSS单样本卡方检验,总体分布的chi-square检验(4)基本操作步骤:菜单:analyze-nonparametrictest-chisquare选定待检验变量入testvariablelist框确定待检验个案的取值范围(expectedrange)getfromdata:全部样本usespecifiedrange:用户自定义个案范围指定期望频数(expectedvalues)allcategoriesequal:所有类别有相同的构成比value:用户自定义构成比,5,Categoricalvariable,VariablesthatdescribecategoriesofentitiesDealingwiththemallthetimeinstatisticsMakingcomparisonsamongvariablesForexample,whetherconsumerspreferaparticularbrandofaproductamongothercompetingbrands.CheckingwhetherthereisarelationshipbetweentwocategoricalvariablesGenderandpreferenceforaproduct,whetherthepreferenceforaproductisindependentfromgender,6,Chi-squaretestfordifferencesbetweenproportions,ThistestinvolveswithnominaldataproducedbymultinomialexperimentItisageneralisationofabinomialexperimentThesetestthenullhypothesisthatdatainthetargetpopulationhasaparticularprobabilitydistribution.Example1Wemighttestwhetherconsumersareindifferenttowhichoffourmaterials(glass,plastic,steeloraluminium)thatcouldbeusedtomakesoftdrinkcontainers.Thenullhypothesisisthattheyareindifferent(orthatequalnumberspreferglass,plastic,steelandaluminium).,7,Example1,DataLetpGbetheprobabilitythatanindividualselectedatrandomwillnominateglassashis/herpreferenceifrequiredtomakeachoice.SimilarlyforpP(plastic),pS(steel)andpA(aluminium)HypothesesHO:pG=pP=pS=pA=0.25.HA:atleastonepi0.25.Thealternativeisthatatleastonematerialismorepreferred(orlesspreferred)thantheothers.,8,Example1cont.,Procedure:Selectarandomsampleof,say,100consumersanddeterminetheirpreferences.UnderthenullhypothesisWeexpect25consumerstonominateglass,25tonominateplastic,25tonominatesteeland25tonominatealuminiumThesearetheexpectedfrequencies,Ei.Ei=npi.Wecomparetheexpectedfrequencieswiththesampleresultsortheobservedfrequencies,Oi.Iftheyareapproximatelythesamewewouldconcludethatthenullhypothesisistrue.OiEiHOisprobablytrue.,9,Example1cont.,Chisquare,Werequireateststatistictodecidewhetherthedifferenceislargeenoughtorejectthenullhypothesis.WeusechisquarewithG-1degreesoffreedomwhereGisthenumberofgroups.,Supposeinourexample,39preferglass,16preferplastic,20prefersteeland25preferaluminium.Recallthattheexpectedfrequencieswereall25.,10,ObtainthecriticalvalueofchisquareCritical23=7.82.Obtainthecriticalvalueat5%significancelevelat3d.f.,(TableE4,page742,Berensonet.al.2013)i.e.thereisonlya5percentchanceorlessthat237.82ifHOistrue.Comparisonofchisquarevalues23=12.087.82rejectHO.Conclusion:atthe5%significancelevelthereissufficientevidencetorejectthenullhypothesis.Atleastoneoftheprobabilities(pi)isdifferent.Thesampleresultsindicatethatthematerialsarenotequallypreferredbyconsumersinthetargetpopulation.Thus,atleastpreferencesfortwomaterialsaredifferent.,11,ChisquaretestusingSPSS,Example:Supposethatwewanttotestwhetherornotcustomershaveacolourpreferenceforpackaging.Threedifferentcolours,Blue,Green不同层为水平数积.(5)是否显示各分组的棒图(displayclusteredbarcharts),20,产生交叉列联表,进一步计算cells选项:选择在频数分析表中输出各种百分比.row:行百分比(Rowpct);column:列百分比(Colpct);total:总百分比(Totpct);,21,分析列联表中变量间的关系,目的:通过列联表分析,检验行列变量之间是否独立。方法:卡方检验:对品质数据的相关性进行度量,22,分析列联表中变量间的关系,卡方检验年龄与工资收入交叉列联表低中高青40000中05000老00600低中高青00500中06000老40000,23,分析列联表中变量间的关系,卡方检验基本步骤(1)H0:行列变量之间无关联或相互独立(2)构造卡方统计量统计量服从(r-1)*(c-1)个自由度的卡方分布count:观察(实际)频数expectedcount:期望频数(期望频数反映的是H0成立情况下的数据分布特征)Residual:剩余(观察频数-期望频数),24,1、列联表,2、三维柱形图,3、二维条形图,从三维柱形图能清晰看出各个频数的相对大小。,从二维条形图能看出,吸烟者中患肺癌的比例高于不患肺癌的比例。,通过图形直观判断两个分类变量是否相关:,25,Testsofindependencecont,Example2Supposeweinterviewed400people&askedthemwhichofthreeagegroupstheyarein(under25,25to60,andover60).Wealsoasktheirresponsetothestatementthat“Allimportsofautomobilesshouldbebannedinordertoprotectthelocalindustry”(agree,novieweitherway,disagree).,attitudestowardsbanningimportsagreenoviewdisagreeTotalagegroupunder251953259725-60469447187over60305630116Total95203102400,26,Testsofindependencecont,Example2cont.Nullhypothesis:Thenullhypothesisisthatanswerstothetwoquestionsareindependent.Underthenull:Probover60andagree=Probover60ProbagreeMultiplicationruleforindependenteventsExpectedfrequency=Probover60Probagreesamplesize.,27,ProcedureWesetupacross-tabulationshowingtheobservedfrequenciesofanswerstothetwoquestions.Wecalculatetheexpectedfrequencies.TestOurtestisbasedonacomparisonoftheobservedandexpectedfrequencies.Short-cutforexpectedfrequencies,28,Age*attitudetobanningimportsCrosstabulation,19.0,53.0,25.0,97.0,23.0,49.2,24.7,96.9,46.0,94.0,47.0,187.0,44.4,94.9,47.7,187.0,30.0,56.0,30.0,116.0,27.6,58.9,29.6,116.1,95.0,203.0,102.0,400.0,95.0,203.0,102.0,400.0,Count,ExpectedCount,Count,ExpectedCount,Count,ExpectedCount,Count,ExpectedCount,Under25,25-60,Over60,Age,Group,Total,Agree,Noview,Disagree,Attitudetobanimports,Total,Calculationforexpectedfrequencyofagreeandover60,95116/400,29,Age*attitudetobanningimportsCrosstabulation,19.0,53.0,25.0,97.0,23.0,49.2,24.7,96.9,46.0,94.0,47.0,187.0,44.4,94.9,47.7,187.0,30.0,56.0,30.0,116.0,27.6,58.9,29.6,116.1,95.0,203.0,102.0,400.0,95.0,203.0,102.0,400.0,Count,ExpectedCount,Count,ExpectedCount,Count,ExpectedCount,Count,ExpectedCount,Under25,25-60,Over60,Age,Group,Total,Agree,Noview,Disagree,Attitudetobanimports,Total,Thecount(observed)andtheexpectedaredifferent,butdifferentenoughtorejectthenull?,30,Chi-squaredtestforindependence,Rationale:OijEijHOisprobablytrue.TeststatisticWerequireateststatistictodecidewhetherthedifferenceislargeenoughtorejectthenullhypothesis.,31,Chi-SquareTests,1.438,a,4,.837,1.517,4,.805,1.307,1,.758,400,PearsonChi-Square,LikelihoodRatio,Linear-by-Linear,Association,NofValidCases,Value,df
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 家电公司分支机构管理办法
- 保密法考试题及答案
- 在职研究生考试试题及答案
- 香烟考试题库及答案
- 政治会考试题及答案
- 普通选调面试题及答案
- 如何高效提升孩子洞察力
- 2026届齐鲁名校教科研协作体山东、湖北部分重点中学化学高二上期中调研试题含解析
- 家电公司突发事件报告细则
- 2026届云南省元阳县第三中学化学高一第一学期期中调研试题含解析
- 学院 军训协议书
- 食材应急保障方案
- 5.1 平行与垂直(课件)-2025-2026学年四年级上册数学人教版
- 分厂团队管理办法
- 信息通信网络运行管理员测试题及答案
- 《医疗机构工作人员廉洁从业九项准则》
- 2025年月度工作日历含农历节假日电子表格版
- 未来医美的必然趋势课件
- 附件1发电设备备品备件验收及仓储保养技术标准
- 12、信息通信一体化调度运行支撑平台(SG-I6000)第3-8部分:基础平台-系统安全防护
- 大连市劳动用工备案流程
评论
0/150
提交评论