非参数统计friedman检验.docx
《非参数统计friedman检验.docx》由会员分享,可在线阅读,更多相关《非参数统计friedman检验.docx(23页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、非参数统计期末大作业一、Wilcoxon符号秩检验某个公司为了争夺竞争对手的市场,决定多公司重新定位进行宣传。在广告创意 中,预计广告投放后会产生效果。一组不看广告组和一组看广告,抽取16位被 调查者,让起给产品打分。现有数据如下分析广告效应是否显著。不看广告62839699716097100看广告87929086949582911、手算建立假设:H0:广告效应不显著111:广告效应显著不看广告组记为x,看广告组记为y。检验统计量计算表XYD=x-yIDI|D|的秩D的符号6287-25257-8392-992.5-9690661+998613134+7194-23236-6095-35358
2、-978215155+10091992.5+由表可知:T+= 1+4+5+2. 5=12. 5=7+2. 5+6+8=23. 5根据n=8, T+和T-中较大者二23. 5,查表得,T+的右尾概率为0. 230到0. 273, 在显著性水平a = 0.05下,P值显然较大,故没有理由拒绝原假设,说明广告效 应不显著。四、k个独立样本的Kruskal-Wallis检验为检测四种防护服对人脉搏的影响,找来20人试穿,每种有5人试穿,测量试 穿者的脉搏,得到以下表格:试穿者防护服1防护服2防护服3防护服4113010412313321111161191283114106115130412398120
3、1125115104117110问:穿四种防护服测得的脉搏有无差异。1、手算建立假设:H0:测得的脉搏没有显著差异H1:测得的脉搏有显著差异 脉搏等级整理如下:防护服1防护服2防护服3防护服418.52.515.5206111317849.518.515.511479.52.5125秩和57.5216467.5计算检验统计量H:仁标为th】) j=l 11257.52 + 212 4- 642 + 67.52=X3x21=70.854-63=7.854查表:自由度df=3,显著性水平a = 0.05,相对应的临界值卡方=7. 82。显然,11=7.854卡方:7.82,所以拒绝原假设,说明四种
4、防护服对脉搏的影响 有显著差异。2、 spss输入20个观测值(数据4)在非参数检验中选择k个独立样本检验防护服分组定义为1到4操作如下列图:16:味傅133脑博防护服11301211113114141231611516104271162810629982101042111233121193131153141203匚151173164171284181304191124201104WormnetyzoQrephs UMitsa Add-Qns vymdow yelp日混口ReQorte2 -Descriptive Statistics防护TablesCotrjpore Meansvar Iva
5、r |var空oncra Linear Model Gonerertzed Linear Mod* M 区ed ModelsCorreunte BegressionLoginearNeural NetworksClassttyQata Reduction由 2hl-Sque gKruskei-mhsH Q Medon O Jonckhecre-TerpstraOK ftsteFe 沦 tOK ftsteFe 沦 tCareer H&A输出结果如下(输出4):Ranks防护服NMean Rank脉搏 1234Total55552011.504.2012.8013.50Test Statistic
6、sa b脉搏Chi-SquaredfAsymp. Sig.7.8783.049a. Kruskal Wallis Testb. Grouping Variable:防护服由上表,卡方与手算十分接近,拒绝原假设,即说明四种防护服对脉搏的影 响有显著性差异。3、中位数检验20个数,中位数为115. 5,整理每个总体中大于或小于该中位数的观测值人数,如下表:1234115.5214310=115.5341210555520计算Q检验量2232I242Q= 20-x 2 + x 2 + - x 2 + x 2 - 15 x 105 x 105 x 105 x 10=4Q统计量小于卡方=7.82,没有理
7、由拒绝原假设,说明四种防护服对脉搏的影响 没有显著差异。Spss:唬test type中选择中位数,输出结果如下:Frequencies防护服1234脉搏 Median2143 kruskal. test (x, y)Kruskal-Wallis rank sum testdata: x and yKruskal-Wallis chi-squared = 7.878, df = 3, p-value = 0.0486 与以上的手算和KS检验法结果一致,拒绝原假设,说明四种防护服防护服对 脉搏的影响存在显著差异。五、列联表卡方检验一种原料来自三个不同的地区,原料质量被分成三个不同等级。从这批原料
8、 中随机抽取500件进行检验,得样本数据如下表所示,要求检验地区与原料质量 之间有无依赖关系。一级二级三级合计地区1526424140地区2605952171地区3506574189合计1621881505001、手算:建立假设:H0:地区与原料质量无关H1:地区与原料质量相关地区等级f.(fij - eij), Cij115245. 360.97126452. 642.451324427.71216055.40. 38225964.30. 44235251.30.01315061.242.06326571.060. 52337456.75. 28介计19. 82r c(2 = 与肛=19.8
9、2i=l j=l 自由度 df= (r-1) (c-1) =4查表得,忘.05=949,由于319.82忌05=9.49,因此拒绝原假设,即说明地 区与原料质量是相关的。2、 SPSS:输入数据(数据5)后,对数量加权处理:DataWeight Cases在分析描述统计中选择列联表Crosstabs生成地区与等级列联表,卡方检验表,方向性测度和对称性测度。输出结果如F (输出5):Bar Chart及 12 3等口123luno。4O-地区地区 * 等级 Crosstabulation等级Total123地区Count526424140Expected Count45.452.642.0140
10、.0% within 地区37.1%45.7%17.1%100.0% within 等级32.1%34.0%16.0%28.0% of Total10.4%12.8%4.8%28.0%Count6059521712Expected Count55.464.351.3171.0% within 地区35.1%34.5%30.4%100.0% within 等级37.0%31.4%34.7%34.2% of Total12.0%11.8%10.4%34.2%Count5065741893Expected Count61.271.156.7189.0% within 地区26.5%34.4%39.2
11、%100.0% within 等级30.9%34.6%49.3%37.8% of Total10.0%13.0%14.8%37.8%TotalCount162188150500Expected Count162.0188.0150.0500.0% within 地区32.4%37.6%30.0%100.0% within 等级100.0%100.0%100.0%100.0% of Total32.4%37.6%30.0%100.0%方向性测度表Directional MeasuresValueAsymp. Std.Error*Approx. TbApprox.Sig.Nominal byLam
12、bdaSymmetric.032.035.906.365Nominal地区Dependent.032.033.954.340等级Dependent.032.051.623.533Goodman and Kruskal 地区tauDependent.019,008.001c等级Dependent.019.008.001cUncertainty Coefficient Symmetric.019.0082.356.000d地区Dependent.019.0082.356.000。等级Dependent.019.0082.356.000dOrdinal by Ordinal Somers dSymm
13、etric.147.0383.880.000地区Dependent.147.0383.880.000等级Dependent.147.0383.880.000a. Not assuming the null hypothesis.Using the asymptotic standard error assuming the null hypothesis.b. Based on chi-square approximationLikelihood ratio chi-square probability.对称性测度表Symmetric MeasuresValueAsymp. Std.Error
14、3Approx. TbApprox. Sig.Nominal by Nominal Phi.199.001Cramers V.141.001Contingency Coefficient.195.001Ordinal by OrdinalKendalls tau-b.147.0383.880.000Kendalls tau-c.146.0383.880.000Gamma.220.0563.880.000N of Valid Cases500Not assuming the null hypothesis.a. Using the asymptotic standard error assumi
15、ng the null hypothesis.卡方检验表Chi-Square TestsValuedfAsymp. Sig. (2-sided)Pearson Chi-SquareLikelihood RatioN of Valid Cases19.822a4.00120.7325004.000a. 0 cells (.0%) have expected count less than 5. The minimum expected count is 42.00.由输出结果,检验统计量为19.822,精确双尾显著性概率P远远小于显著 性水平0.05,因此拒绝原假设,即说明地区与原料质量相关,与
16、手算结果一致。六、Friedman检验(英文)来源: :/ statisticslectures. com/topics/friednian/#videoThe Friedman Test is a version of the Repeated-Measures ANOVA that can be performed on ordinal(ranked) data.Friedman检验是一种通过顺序(排名)数据重复测量方差分析。Ordinal data is displayed in the table below. Is there a difference betweenWeeks 1,
17、 2, and 3 using alpha = 0. 05原始数据显示在下面的表中。周1、2和3有什么区别,显著性水平。=0.05WeeklWeek 2Week 3Lets test to see if there are any differences with a hypothesis test. 让我们通过假设检验测试是否存在差异。Steps for Friedman TestFriedman检验的操作步骤1. Define Null and Alternative Hypotheses 定义零假设和备择假设State Alpha规定显著水平2. Calculate Degrees of
18、 Freedom 计算自由度State Decision Rule 陈述决策规那么3. Calculate Test Statistic 计算检验统计量State Results 声明结果4. State Conclusion 陈述结论Define Null and Alternative HypothesesHq there is no difference between the three conditions.Hi; there is a difference between the three conditions.HO:三周没有差异Hl:三周存在差异1. State Alphaal
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 参数 统计 friedman 检验
限制150内