线性回归分析-HW10

HW.

Prob-1

a.

Any solution of the following equation is a valid response function:

XTXb=XTYX^TXb=X^TY

The general solution is

b=(3100)+t(−5−121),t∈R.b= \begin{pmatrix} 3\\10\\0 \end{pmatrix} +t \begin{pmatrix} -5\\-\frac12\\1 \end{pmatrix}, \qquad t\in\mathbb R.

Let t=0t=0, the developed response function is

Y^=3+10X1\hat{Y}=3+10X_{1}

b.

The intersection is

{X2=5+12X1,Y=3+10X1.\begin{cases} X_2=5+\frac12X_1,\\ Y=3+10X_1. \end{cases}

Prob-2

a.

  • β0:\beta_0: Mean of YY if X1=X2=0X_{1}=X_{2}=0
  • β1\beta_{1}: The change in the mean of YY if entrance test score is one unit higher holding all other variables fixed
  • β2\beta_{2}: The change in the mean of YY if the student had indicated a major field of concentration at the time of application holding all other variables fixed

b.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Call:
lm(formula = Y ~ X1 + X2, data = d)

Residuals:
Min 1Q Median 3Q Max
-2.70304 -0.35574 0.02541 0.45747 1.25037

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.19842 0.33886 6.488 2.18e-09 ***
X1 0.03789 0.01285 2.949 0.00385 **
X2 -0.09430 0.11997 -0.786 0.43341
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.6241 on 117 degrees of freedom
Multiple R-squared: 0.07749, Adjusted R-squared: 0.06172
F-statistic: 4.914 on 2 and 117 DF, p-value: 0.008928

c.

From the table above we have p−p-value of b2b_2 is 0.4 > 0.01, so it can be dropped.

H0:H_{0}: β2=0\beta_{2}=0, Ha:H_{a}: β2≠0\beta_{2}\ne 0.

Decision rule: reject if p-value is smaller than 0.01

Conclusion: cannot reject. No enough evidence that β2\beta_{2} is not 00 in the model.

d.

442
Seems no linear relationship between X1X2X_{1}X_{2} and the residuals. I think it would not be helpful to include an interaction term.

Prob-3

a.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Call:
lm(formula = Y ~ X1 * X2, data = d)

Residuals:
Min 1Q Median 3Q Max
-2.80187 -0.31392 0.04451 0.44337 1.47544

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.226318 0.549428 5.872 4.18e-08 ***
X1 -0.002757 0.021405 -0.129 0.8977
X2 -1.649577 0.672197 -2.454 0.0156 *
X1:X2 0.062245 0.026487 2.350 0.0205 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.6124 on 116 degrees of freedom
Multiple R-squared: 0.1194, Adjusted R-squared: 0.09664
F-statistic: 5.244 on 3 and 116 DF, p-value: 0.001982

b.

  • H0:β3=0H_{0}:\beta_{3}=0
  • Ha:β3≠0H_{a}:\beta_{3}\ne 0

Decision rule: reject if p-value is smaller than 0.05

Conclusion: reject. The interaction term cannot be dropped.

The nature of the interaction effect: the effect of X1X_{1} depends on X2X_{2}.


线性回归分析-HW10
https://wtx17.github.io/2026/11/29/线性回归分析-HW10/
作者
wtx
发布于
2026年11月29日
更新于
2026年12月2日
许可协议