---
# System prepended metadata

title: 1044794 毛勝煒 迴歸作業

---

# 1044794 毛勝煒 迴歸作業

# HW.1
證明$Cov(\overline{Y},\widehat{\beta _{1}})=0$
$Cov(\overline{Y},\widehat{\beta _{1}})=Cov(\frac{\sum y_{i}}{n},\sum c_{i}y_{i})$
$c_{i}=\left (x_{i}-\overline{x}  \right )$
and $S_{xx}=\sum \left ( x_{i}-\overline{x} \right )$
so  $Cov(\frac{\sum y_{i}}{n},\sum c_{i}y_{i})=\frac{1}{n}Cov({\sum y_{i}},\sum c_{i}y_{i})$
$\frac{1}{n}Cov({\sum y_{i}},\sum c_{i}y_{i})=
\frac{1}{n}Cov\left ( \sum y_{i} ,\sum c_{i} y_{i}\right )=\frac{1}{n}\sum c_{i}Var\left ( y_{i} \right )=\frac{\sigma^2}{n}\sum c_{i}=0$
So  $Cov(\overline{Y},\widehat{\beta _{1}})=0$

# HW.2
證明$\sum \left ( y_{i}-\widehat{y_{i}} \right )\left ( \widehat{y_{i}}-\overline{y} \right )^{2}=0$
let $\widehat{y_{i}}-\overline{y}=\widehat{B_{1}}\left ( x_{i}-\overline{x} \right )$
$\sum \left ( y_{i}-\widehat{y_{i}} \right )\left ( \widehat{y_{i}}-\overline{y} \right )^{2}=\sum \left ( y_{i}-\widehat{y_{i}} \right )[\widehat{B_{1}}\left ( x_{i}-\overline{x} \right )]^{2}$
$=\sum[\widehat{B_{1}}\left ( x_{i}-\overline{x} \right )]^{2}[(y_{i}-\overline{y})-(\widehat{B_{1}}\left ( x_{i}-\overline{x} \right ))]$
$=\widehat{B_{1}}^{2}\sum (y_{i}-\overline{y})(x_{i}-\overline{x})^{2}-\widehat{B_{1}}(x_{i}-\overline{x})^{3})$

$\rightarrow \sum (y_{i}-\overline{y})(x_{i}-\overline{x})^{2}-\widehat{B_{1}}(x_{i}-\overline{x})^{3})=\sum (x_{i}-\overline{x})[(y_{i}-\overline{y})(x_{i}-\overline{x})-\widehat{B_{1}}(x_{i}-\overline{x})^{2}]$
$=\sum (x_{i}-\overline{x})(y_{i}-\overline{y})(x_{i}-\overline{x})-\sum \widehat{B_{1}}(x_{i}-\overline{x})(x_{i}-\overline{x})^{2}$
$\because \widehat{B_{1}}=\frac{\sum (y_{i}-\overline{y})(x_{i}-\overline{x})}{\sum (x_{i}-\overline{x})^{2}}$
$=\sum (x_{i}-\overline{x})[(y_{i}-\overline{y})(x_{i}-\overline{x})-(y_{i}-\overline{y})(x_{i}-\overline{x})]$
$=\sum (x_{i}-\overline{x})*0=0$

SO$\sum \left ( y_{i}-\widehat{y_{i}} \right )\left ( \widehat{y_{i}}-\overline{y} \right )^{2}=0$




