Modeling relationships: least squares method, regression equation, and interpreting slope and intercept.
Overview
Simple linear regression models the relationship between two variables by fitting a straight line to the data. It predicts the value of a dependent variable (Y) based on an independent variable (X).
The Model
y^=β0+β1x
Or equivalently:
Y=β0+β1X+ε
Where:
y^ = predicted value of Y
β0 = y-intercept
β1 = slope
ε = error term
Least Squares Method
Minimizes the sum of squared residuals:
SSE=∑(yi−y^i)2
Formulas
Slope (β1)
β1=∑(xi−xˉ)2∑(xi−xˉ)(yi−yˉ)
Or:
β1=r×sXsY
Or:
β1=n∑xi2−(∑xi)2n∑xiyi−(∑xi)(∑yi)
Intercept (β0)
β0=yˉ−β1xˉ
Interpretation
Slope (β1)
For each 1-unit increase in X, Y is predicted to change by β1 units.
Intercept (β0)
The predicted value of Y when X=0.
(May not be meaningful if X=0 is outside the data range)