开发者:上海品职教育科技有限公司 隐私政策详情

应用版本:4.2.11(IOS)|3.2.5(安卓)APP下载

粗眉毛辣椒油 · 2024年01月31日

公式

NO.PZ2020010304000034

问题如下:

What is the effect on the sample covariance between X and Y if X is scaled by a constant a?

What is the effect on the sample correlation?

选项:

解释:

The sample covariance is defined

1ni=1(XiX)(YiY)\frac{1}{n}\sum_{i=1} (X_i - \overline X)(Y_i - \overline Y).

Multiplying each Xi by a constant a will rescale the sample mean by a so that

1ni=1(aXiaX)(YiY)=1ni=1a(XiX)(YiY)=a1ni=1(XiX)(YiY)\frac{1}{n}\sum_{i = 1}(aX_i - a\overline X)(Y_i - \overline Y) =\frac{1}{n}\sum_{i = 1} a(X_i - \overline X)(Y_i - \overline Y) =a\frac{1}{n}\sum_{i = 1} (X_i - \overline X)(Y_i - \overline Y)

The final covariance is a times the original covariance. The correlation is then ρ=σXYσXσY\rho = \frac{\sigma_{XY}}{\sigma_X\sigma_Y} so that scaling XiX_i by a will produce ρ=aσXYaσXσY=σXYσXσY\rho = \frac{a\sigma_{XY}}{a\sigma_X\sigma_Y} = \frac{\sigma_{XY}}{\sigma_X\sigma_Y} and the samle correlation is invariant to rescaling the data.

解析中的相关系数公式和讲义78页不一致,请问是怎么推导成的?

1 个答案
已采纳答案

pzqa39 · 2024年01月31日

嗨,努力学习的PZer你好:


题目问的是如果X扩大a倍的话,对covariance 和correlation的影响,结果是covariance变大a倍,ρ不变。

在这边前台看到的关于ρ的答案如下图所示:

和我们讲义中的公式是一样的,讲义公式见下图:

X扩大a倍的话,ρ公式中分子分母都需要*a,ρ不变。

----------------------------------------------
就算太阳没有迎着我们而来,我们正在朝着它而去,加油!