Chapter 2 Simple Linear Regression
2.1 Getting started
Putting text here
2.2 Foundation
Putting text here
2.3 Inference
Putting text here
2.4 Prediction
2.5 Checking conditions
2.6 Partioning variability
2.7 Derivation for slope and intercept
This document contains the mathematical details for deriving the least-squares estimates for slope () and intercept (). We obtain the estimates, and by finding the values that minimize the sum of squared residuals ().
Recall that we can find the values of and that minimize () by taking the partial derivatives of () and setting them to 0. Thus, the values of and that minimize the respective partial derivative also minimize the sum of squared residuals. The partial derivatives are
Let’s begin by deriving .
Now, we can derive using the we just derived
To write in a form that’s more recognizable, we will use the following:
where is the covariance of and , and is the sample variance of ( is the sample standard deviation).
Thus, applying () and (), we have
The correlation between and is . Thus, . Plugging this into (), we have