线性回归分析-HW5

HW5.
Data.

Prob-1

1-a

Consistent, as the age groups are similar in size.

1-b


The residuals present good normality.

1-c

The two plots provide the same information as Y^i\hat{Y}_{i} is a linear transformation of XiX_{i}.

The two plots ascertain E(ε∣X)=0\mathbb{E}(\varepsilon\mid X)=0 and V[ε∣X]=σ2\mathbb{V}[\varepsilon\mid X]=\sigma^{2}.

1-d

1
2
q <- qnorm(res)
cor(q$x,q$y)

The coefficient of correlation: 0.9896158

Use the correlation test

t=r1−r2n−2∼tn−2t=\frac{r}{\sqrt{1-r^{2}}}\sqrt{n-2}\sim t_{n-2}

Here t=52.434,n=60t=52.434,n=60.

The results are

We have enough evidence to say that they have linear correlation.

1-e

Suppose

σi2=exp⁡(α0+α1Xi)\sigma_{i}^{2}=\exp(\alpha_{0}+\alpha_{1}X_{i})

The alternatives:

H0:α1=0H1:o.w.\begin{align} H_{0} & :\alpha_{1}=0 \\ H_{1} & :\text{o.w.} \end{align}

The test statistic:

LM=SSR∗2/(SSEn)2=318332/(3874.460)2=3.817167LM=\frac{SSR^{*}}{2}\big/\left( \frac{SSE}{n} \right)^{2}=\frac{31833}{2}\big/\left( \frac{3874.4}{60} \right)^{2}=3.817167

The decision rule:

LM>χ0.99,12=6.634897LM>\chi^{2}_{0.99,1}=6.634897

The conclusion: cannot reject.

Prob-2

It is saying that the median is smaller than the mean, which usually indicates that the distribution is right-skewed.


线性回归分析-HW5
https://wtx17.github.io/2026/10/23/线性回归分析-HW5/
作者
wtx
发布于
2026年10月23日
更新于
2026年11月6日
许可协议