返回题库

变量对调

Variable Swap

专题
Machine Learning / 机器学习
难度
L2

题目详情

考虑一个简单的一元线性回归。已知以下 XXYY 的取值: (5,5),(4,0),(6,10)(5,5), (4,0), (6,10)

我们先回归 YYXX,得到某个 β\beta。现在改为回归 XXYY。不做任何计算,β\beta 会如何变化?

Consider a simple univariate linear regression. We have the following XX and YY values. (5,5),(4,0),(6,10)(5,5), (4,0), (6,10)

We regress YY onto XX and obtain some β\beta. Now, we regress XX onto YY. Without doing any calculation, how does β\beta change?

解析

在简单线性回归中,斜率系数满足 βYX=Cov(X,Y)Var(X),βXY=Cov(X,Y)Var(Y).\beta_{Y \mid X} = \frac{\mathrm{Cov}(X,Y)}{\mathrm{Var}(X)}, \quad \beta_{X \mid Y} = \frac{\mathrm{Cov}(X,Y)}{\mathrm{Var}(Y)}.

两次回归中的协方差 Cov(X,Y)\mathrm{Cov}(X,Y) 是相同的。 由给定数据可见,YY 的波动远大于 XX(取值为 0、5、10,而 XX 为 4、5、6),因此 Var(Y)>Var(X).\mathrm{Var}(Y) > \mathrm{Var}(X).

由于回归 XXYY 时分母更大,所以斜率系数更小。因此,当交换回归方向时,β\beta 会减小。


Original Explanation

In simple linear regression, the slope coefficients satisfy βYX=Cov(X,Y)Var(X),βXY=Cov(X,Y)Var(Y).\beta_{Y \mid X} = \frac{\mathrm{Cov}(X,Y)}{\mathrm{Var}(X)}, \quad \beta_{X \mid Y} = \frac{\mathrm{Cov}(X,Y)}{\mathrm{Var}(Y)}.

The covariance between XX and YY is the same in both regressions. From the given data, YY varies much more than XX (values 0, 5, 10 versus 4, 5, 6), so Var(Y)>Var(X).\mathrm{Var}(Y) > \mathrm{Var}(X).

Since the denominator is larger when regressing XX onto YY, the slope coefficient is smaller. Therefore, β\beta decreases when switching the regression direction.