一元线性回归
(一)基本公式
如果预测对象与主要影响因素之间存在线性关系,将预测对象作为因变量y,将主要影响因素作为自变量x,即引起因变量y变化的变量,则它们之间的关系可以用一元回归模型表示为如下形式:
y=a+bx+e
其中:a和b是揭示x和y之间关系的系数,a为回归常数,b为回归系数
e是误差项或称回归余项。
对于每组可以观察到的变量x,y的数值xi,yi,满足下面的关系:
yi =a+bxi+ei其中ei是误差项,是用a+bxi去估计因变量yi的值而产生的误差。
在实际预测中,ei是无法预测的,回归预测是借助a+bxi得到预测对象的估计值yi.为了确定a和b,从而揭示变量y与x之间的关系,公式可以表示为:
y=a+bX公式y=a+bX是式y=a+bx+e的拟合曲线。可以利用普通最小二乘法原理(OLS)求出回归系数。最小二乘法基本原则是对于确定的方程,使观察值对估算值偏差的平方和最小。由此求得的回归系数为:
b=[∑xiYi—x∑yi]/∑xi2—x∑xi a=y‘-bx’式中:xi、yi分别是自变量x和因变量y的观察值,x-、y-分别为x和y的平均值。
x-=∑xi/ n y-=∑yi/ n对于每一个自变量的数值,都有拟合值:
yi‘=a+bxi yi’与实际观察值的差,便是残差项ei=yi一yi‘。





![[em2_01]](https://live.cdeledu.com/web/images/emoji/01.png)
![[em2_02]](https://live.cdeledu.com/web/images/emoji/02.png)
![[em2_03]](https://live.cdeledu.com/web/images/emoji/03.png)
![[em2_04]](https://live.cdeledu.com/web/images/emoji/04.png)
![[em2_05]](https://live.cdeledu.com/web/images/emoji/05.png)
![[em2_06]](https://live.cdeledu.com/web/images/emoji/06.png)
![[em2_07]](https://live.cdeledu.com/web/images/emoji/07.png)
![[em2_08]](https://live.cdeledu.com/web/images/emoji/08.png)
![[em2_09]](https://live.cdeledu.com/web/images/emoji/09.png)
![[em2_10]](https://live.cdeledu.com/web/images/emoji/10.png)
![[em2_11]](https://live.cdeledu.com/web/images/emoji/11.png)
![[em2_12]](https://live.cdeledu.com/web/images/emoji/12.png)
![[em2_13]](https://live.cdeledu.com/web/images/emoji/13.png)
![[em2_14]](https://live.cdeledu.com/web/images/emoji/14.png)
![[em2_15]](https://live.cdeledu.com/web/images/emoji/15.png)
![[em2_16]](https://live.cdeledu.com/web/images/emoji/16.png)
![[em2_17]](https://live.cdeledu.com/web/images/emoji/17.png)
![[em2_18]](https://live.cdeledu.com/web/images/emoji/18.png)
![[em2_19]](https://live.cdeledu.com/web/images/emoji/19.png)
![[em2_20]](https://live.cdeledu.com/web/images/emoji/20.png)






扫一扫立即下载
扫码添加老师