The simple linear regression model has the form of
y=c0+c1x,(1)
where formula for c1 is
c1=i∑(xi−xˉ)2i∑(xi−xˉ)(yi−yˉ)(2)
and for c0 is
c0=yˉ−c1xˉ.(3)
The terms xˉ and yˉ are calculated using
xˉ=N1i∑xi(4)
and
yˉ=N1i∑yi,(5)
where N is Number of pairs of (xi,yi) data.
- Mark Inlow, “On Deriving the Least Squares Estimates in Introductory Regression Courses”, Journal of Probability and Statistical Science [J Probab Stat Sci], vol 20, no 1, pp 184-190, Aug 2022, url https://doi.org/10.37119/jpss2022.v20i1.506.