理解covariance协方差 vs correlation coefficient相关系数

  • covariance

From wikipedia, in probability theory and statistics, covariance is a measure of the joint variability of two random variables.

If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the lesser values, the covariance is positive.

In the opposite case, when the greater values of one variable mainly correspond to the lesser values of the other, the covariance is negative.

The sign of the covariance therefore shows the tendency in the linear relationship between the variables.

The magnitude of the covariance is not easy to interpret because it is not normalized and hence depends on the magnitudes of the variables.

The normalized version of the covariance, the correlation coefficient, however, shows by its magnitude the strength of the linear relation.

  • Covariance and correlation

From wikipedia, in probability theory and statictics, the mathematical concepts of covariance and correlation are very similar.

Both describe the degree to which two random variables or sets of random variables tend to deviate from their expected values in similar ways.

If X and Y are two random variables, with means (expected values) μ X \mu_X μXand μ Y \mu_Y μYand standard deviations σ X \sigma_X σXand σ Y \sigma_Y σY,respectively, then their covariance and correlation are as follows:
c o v a r i a n c e : c o v X Y = σ X Y = E [ ( X − μ X ) ( Y − μ Y ) ] covariance:\\cov_{XY}=\sigma_{XY}=E[(X- \mu_X)(Y-\mu_Y)] covariance:covXY=σXY=E[(XμX)(YμY)]

c o r r e l a t i o n : c o r r X Y = ρ X Y = E [ ( X − μ X ) ( Y − μ Y ) ] σ X σ Y correlation:\\corr_{XY}=\rho_{XY}=\frac{E[(X- \mu_X)(Y-\mu_Y)]}{\sigma_X\sigma_Y} correlation:corrXY=ρXY=σ

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值