fit -> predict까지의 과정
* 단순회귀에서의 회귀계수 추정 by LSE
yi=β0+β1∗xi+ϵiy_{i} = \beta_{0} + \beta{1}*x_{i} + \epsilon_{i}yi=β0+β1∗xi+ϵi in given data {(x1,y1)...(xn,yn)}\{(x_{1},y_{1})...(x_{n},y_{n})\}{(x1,y1)...(xn,yn)} β1^=SxySxx\hat{\beta_{1}} = \frac{S_{xy}}{S_{xx}}β1^=SxxSxy β0^=yˉ−β1^xˉ\hat{\beta_{0}} = \bar{y}-\hat{\beta_{1}}\bar{x}β0^=yˉ−β1^xˉ Sxy=∑i=1n(xi−xˉ)(yi−yˉ)S_{xy} = \sum\limits_{i=1}^{n}(x_{i}-\bar{x})(y_{i}-\bar{y})Sxy=i=1∑n(xi−xˉ)(yi−yˉ) Sxx=∑i=1n(xi−xˉ)2S_{xx} = \sum\limits_{i=1}^{n}(x_{i}-\bar{x})^2Sxx=i=1∑n(xi−xˉ)2