Regression

Simple Linear Regression

Given dependent variable yi and independent variable xi, simple linear regression involves the computation of a linear model that predicts y:

y^i=β0+β1xyi=β0+β1xi+ϵi=y^i+ϵi

where,

β1=(xix¯)(yiy¯)(xix¯)2=nxiyixiyinxi2(xi)2β0=y¯β1x¯

Goodness of Fit

Sum of Squares Total (SST)=i=1n(yiy¯)2Sum of Squares Regression (SSR)=i=1n(yi^y¯)2Sum of Squares Error (SSE)=i=1n(yiy^i)2SST=SSR+SSER2=SSRSST

Multiple Linear Regression

Given dependent variable yi and k independent variables xi, multiple linear regression involves the computation of a linear model that predicts y:

y^i=β0+β1xi,1+β2xi,2+...+βkxi,kyi=β0+β1xi,1+β2xi,2+...+βkxi,k+ϵi=y^i+ϵi

Goodness of Fit

R2=SSRSSTR¯2=1(1R2)(n1)nk1

where R¯2 is the adjusted R2.