Simple Linear Regression

Summary

Simple linear regression models the mean response of a continuous outcome Y as a linear function of a single predictor x . The coefficients are usually estimated by ordinary least squares, which minimizes the sum of squared residuals. Under standard assumptions, these estimators are the best linear unbiased estimators, and normal-theory inference applies to the slopes.[1]

Prerequisites

Definition / Notation

The model is

Yi=β0+β1xi+εi,i=1,…,n.
Symbol Meaning
Yi Response variable
xi Predictor, treated as fixed or conditioned upon
β0,β1 Intercept and slope parameters
εi Random error
Y^i Fitted value, β^0+β^1xi
ei Residual, Yi−Y^i
R2 Coefficient of determination

The least-squares estimates are

β^1=∑i=1n(xi−x¯)(Yi−Y¯)∑i=1n(xi−x¯)2,β^0=Y¯−β^1x¯.

Parameters / Assumptions

Essential Result

The Gauss-Markov theorem states that, under the assumptions above, the least-squares estimators are the best linear unbiased estimators (BLUE). Under normality,

β^1∼N(β1,σ2Sxx),

where Sxx=∑i=1n(xi−x¯)2 . In practice σ2 is estimated by s2=∑ei2n−2 , and

t=β^1−β1,0s/Sxx∼tn−2

under H0:β1=β1,0 . The coefficient of determination is

R2=1−∑ei2∑(Yi−Y¯)2.

Worked Example

For data x=(1,2,3,4) and y=(2,4,5,7) :

x¯=2.5,y¯=4.5,Sxx=5,Sxy=7.

Thus

β^1=75=1.4,β^0=4.5−1.4(2.5)=1.0.

The fitted line is y^=1.0+1.4x .[2]

Common Mistakes

Connections

References


  1. OpenStax, Introductory Statistics, "Linear Regression", https://openstax.org/details/books/introductory-statistics ↩︎

  2. MIT OCW, Introduction to Probability and Statistics, "Simple Linear Regression", https://ocw.mit.edu/courses/mathematics/ ↩︎