您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 酒店餐饮 > 非参数统计讲义五--相关性度量
一、Spearman相关二、Kendall相关三、Cronbach系数四、定性数据相关,Pearson相关(1)用于度量线性关系,(2)用于连续数据12211()()()()niixyixynnxyiiiixxyysrssxxyy21/21/22(2)()1rtnr非参数相关(1)用于度量单调关系(不一定线性),相依关系度量(measuresofassociation)(2)可用于定序数据,适用于某些不能准确地测量指标值而只能以严重程度、名次先后、反映大小等定出的等级资料,也适用于某些不呈正态分布或难于判断分布的资料。SPEARMAN秩和相关(spearmanrankcorrelationcoefficient)Spearman等级相关分析秩相关的Spearman等级相关分析秩相关(rankcorrelation)又称等级相关Xx1x2x3…xnYy1y2y3…ynRXRx1Rx2Rx3…RxnRYRy1Ry2Ry3…RynCharlesSpearman秩相关系数2222())61(1)())IIiIIRXRXRYRYdrnnRXRXRYRY((RXi秩RYi秩Di=Rxi-Ryi第二个公式只有无节时成立。最大积雪深度X灌溉面积Y5.101907.003.501287.007.102693.006.202373.008.803260.007.803000.004.501947.005.602273.008.003313.006.402493.00XYRXRY5.11907323.51287117.12693776.22373558.832601097.83000884.51947235.6227344833139106.4249366Correlations1.976**.0001010.976**1.0001010PearsonCorrelationSig.(2-tailed)NPearsonCorrelationSig.(2-tailed)NRANKofXRANKofYRANKofXRANKofYCorrelationissignificantatthe0.01level(2-tailed).**.Correlations1.000.976**..0001010.976**1.000.000.1010CorrelationCoefficientSig.(2-tailed)NCorrelationCoefficientSig.(2-tailed)NXYSpearman'srhoXYCorrelationissignificantatthe0.01level(2-tailed).**.XYRXRYd25.119073213.512871107.126937706.223735508.8326010917.830008804.519472315.622734408331391016.4249366040.975758)1100(10)4(61)1(6122nndris公式只有无节时成立。x-c(1,2,3,4,5,6);y-c(6,5,4,3,2,1)cor.test(x,y,method=spearman)datanc;inputxy@@;datalines;162534435261proccorrdata=ncspearman;varx;withy;run;例:某公司想要知道是否职工期望成为好的销售员而实际上就能有好的销售记录。为了调查这个问题,公司的副总裁仔细地查看和评价了公司10个职工的初始面试摘要、学科成绩、推荐信等材料,最后副总裁根据他们成功的潜能给出了单独的等级评分。二年后获得了实际的销售记录,得到了第二份等级评分,见表中所示。统计问题为是否职工的销售潜能与开始二年的实际销售成绩一致。职工编号潜能等级rx销售成绩Y1240024360373004129556280633507102008926098220105385datanc;inputxy@@;datalines;24004360730012956280335010200926082205385proccorrdata=ncspearman;varx;withy;run;XY86887776686491968772SIGN(XI-XJ)SIGN(YI-YJ)-1-1-1-1111-1-1-1111-11111-1-1255*4/210C258-2-0.610CDNNC82===1010Nc乘积为正的个数。Nd乘积为负的个数。X-c(86,77,68,91,70,71,85,87,63)Y-c(88,76,64,96,65,80,81,72,60)cor.test(X,Y,method=kendall)868877766864919670657180858187726360Kendall相关系数KendallTau-b相关系数,有结修正公式非参数的相关系数,比较成对观测样本.0102(sgn()sgn())()()ijijxxyyrTTTTXY717.511.53178622659185443一、对X从小到大排序,二、对Y计算SIGN(G3-1.5)三、=SIGN(G3-1.5)四、求符号和sum五、组合数n(n-1)/2六、T=Sum/(n(n-1)/2)XY=SIGN(G3-1.5)=SIGN(G4-2=SIGN(G5-17)11.5221317114311-15411-116511-111717.51111118611-1111-191811111111sum=26n(n-1)/2=9*8/2=3626/36例:研究温度与产品采收率之间的关系,10次试验结果,计算spearman,Kendall相关系数温度成品采收率45100521115412063133621406815275160761719218088195Correlations1.000.911**..0001010.911**1.000.000.10101.000.976**..0001010.976**1.000.000.1010CorrelationCoefficientSig.(2-tailed)NCorrelationCoefficientSig.(2-tailed)NCorrelationCoefficientSig.(2-tailed)NCorrelationCoefficientSig.(2-tailed)NXYXYKendall'stau_bSpearman'srhoXYCorrelationissignificantatthe0.01level(2-tailed).**.一、两个分类变量的相关二、两个顺序变量有相关三、分类变量与顺序变量的相关四、mobiphon有序变量分类变量dataxjtj;inputxy;datalines;1271315533127381311015357180891444218970172781602317068176771795816363173891838418472169491534715963;proccorrdata=xjtjSPEARMANKENDALLpearson;varF1F2;run;
本文标题:非参数统计讲义五--相关性度量
链接地址:https://www.777doc.com/doc-3362441 .html