相关系数计算公式

上传人:新** 文档编号:498869634 上传时间:2023-05-24 格式:DOCX 页数:7 大小:10.72KB
返回 下载 相关 举报
相关系数计算公式_第1页
第1页 / 共7页
相关系数计算公式_第2页
第2页 / 共7页
相关系数计算公式_第3页
第3页 / 共7页
相关系数计算公式_第4页
第4页 / 共7页
相关系数计算公式_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《相关系数计算公式》由会员分享,可在线阅读,更多相关《相关系数计算公式(7页珍藏版)》请在金锄头文库上搜索。

1、相关系数计算公式相关系数计算公式Statistical correlation coefficientDue to the statistical correlation coefficient used more frequently, so here is the use of a few articles introduce these coefficients.The correlation coefficient: a study of two things (in the data we call the degree of correlation between the vari

2、ables).If there are two variables: X, Y, correlation coefficient obtained by the meaning can be understood as follows:(1) , when the correlation coefficient is 0, X and Y two variable relationship.(2) , when the value of X increases (decreases), Y value increases (decreases), the two variables are p

3、ositive correlation, correlation coefficient between 0 and 1.(3) , when the value of X increases (decreases), the value of Y decreases (increases), two variables are negatively correlated, the correlation coefficient between -1.00 and 0.The absolute value of the correlation coefficient is bigger, st

4、ronger correlations, the correlation coefficient is close to 1 or -1, the higher degree of correlation, the correlation coefficient is close to 0 and the correlation is weak.The related strength normally through the following range of judgment variables:The correlation coefficient 0.8-1.0 strong cor

5、relation0.6-0.8 strong correlation0.4-0.6 medium degree.0.2-0.4 weak correlation 0.0-0.2 very weakly correlated or not correlatedPearson (Pearson) correlation coefficient1, introductionPearson is also known as the correlation (or correlation) is a kind of calculation method of the linear correlation

6、 of British statistician Pearson in twentieth Century.Suppose there are two variables X, Y, then the Pearson correlation coefficient between the two variables can be calculated by the following formula:A formula:Formula two:Formula three:Formula four:Four equivalent formulas listed above, where E is

7、 the mathematical expectation, cov said the covariance, N represents the number of variables.2, scope of applicationWhen the two variables of the standard deviation is not zero, the correlation coefficient is defined, the correlation coefficient for Pearson:(1) , is the linear relationship between t

8、he two variables, are continuous data.(2) overall, two variables are normally distributed, or near normal unimodal distribution.(3) and the observation values of two variables is in pairs, each pair of observations are independent of each other.3, MatlabPearson correlation coefficient Matlab (accord

9、ing to the formula four):cpp view plaincopyFunction coeff = myPearson (X, Y)% of the function of the realization of the Pearson correlation coefficient calculating operation% input:% X: numerical sequence input% Y: numerical sequence input% output:% coeff: two input numerical sequence X, the correla

10、tion coefficient of Y%If length (X) = length (Y)Error (two numerical sequence dimension is not equal to);Return;EndFenzi = sum (X * Y) - (sum (X) * sum (Y) / length (X);(fenmu = sqrt (sum (X.a2) - sum (X) a2 / le ngth (X) * (sum (Y.a2) - sum (Y) a2 / le ngth (X);Coeff = fenzi / fenmu;End% myPearson

11、end functionCalculate the Pearson correlation coefficient function can also be used in existing Matlab:cpp view plaincopyCoeff = corr (X, Y);4, reference contentSpearman Rank (Spielman rank correlation coefficient)1, introductionIn statistics, Spielman correlation coefficient is named for Charles Sp

12、earman, and often use the Greek symbol (rho) said its value. Spielman rank correlation coefficient is used to estimate the correlation between the two variables X and Y, the correlation between variables can be used to describe the monotone function.If the two sets of two variable does not have the

13、same two elements, so, when one of the variables can be expressed as a monotone function well when another variable (i.e. changes in two variables of the same trend), between the two variables can reach +1 or -1.Suppose that two random variables were X, Y (also can be seen as a set of two), the numb

14、er of their elements are N, two I(1=i=N) random variables take values respectively with Xi, Yi said. Sort of X, Y (at the same time as ascending or descending), two ranking elements set X, y, Xi, Yi elements which are Xi in X and Yi ranking in the Y ranking. The collection of X, y elements in the co

15、rresponding subtraction to get a list of difference set D, di=xi-yi, 1=i=N. Spielman rank correlation coefficient between random variables X and Y can be obtained by X, y or D calculation, the calculation methods are as follows:By ranking difference calculated from D diversity (formula one):From the

16、 top set X, calculated from Y (Spielman rank correlation coefficient were also considered after ranking two random variables Pearson correlation coefficient, the following is the actual Pearson calculated the correlation coefficient X, y) (formula two):The following is a set of elements in the list of examples of calculation (calculated only for Spielman r

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号