;11],[912-7])r=1.0000-0.9892-0.98921.0000p=1.00000.09380.09381.00000.0938小于显著性水平0.1,即拒绝x的第三列与y第二列不相关的原假设。命令:[...]=corr(...,'param1',val1,'param2',val2,...)ParameterValues1、'Pearson'(putesPearson'slinearcorrelationcoefficient;2、'type''putesKendall'stau;3、'putesSpearman'srho1、'all'(thedefault)usesallrowsregardlessofmissingvalues(NaNs)2、'complete'usesonlyrowswithnomissingvalues'rows'3、'putesRHO(i,j)usingrowswithnomissingvaluesincolumniorj‘tail'--Thealternativehypothesisagainst1、'ne'--Correlationisnotzero(thedefault)pute2、'gt'--Correlationisgreaterthanzerop-valuesfortesting3、'lt'--Correlationislessthanzerothehypothesisofnocorrelation例:《统计学原理》黄良文p226页复习时间(小时)考试成绩(分)2排队等级排队等级dixiyi原始数据原始数据xiyi33863044874011410228520559361869151108958.50.25979470119958.50.25131096100合计55826552.5Spearman等级相关系数