I'm just starting out in statistics and my textbook has given me some confusion. I'm currently working on basic linear regression with bivariate data.
Going by the textbook residuals were determined from N-point moving averages. Also the regression line was taken from the N-point moving averages.
Later on in the chapter however residuals were taken directly from the line of best fit. It is unclear whether this regression line was determined from the original data points or from moving averages.
So to sum it all up,
- Can residuals be determined from moving averages or are they strictly from the regression line?
- Can the regression line be determined from the moving averages or only from the original data points?
Having a look through google it looks like the regression line and residuals are taken from the raw data, so I'm unsure why the textbook uses moving averages.
Edit: After looking through the wiki mentioned below I see that the least squares regression line and residuals are derived from the raw data. Not sure what my textbook is going for, maybe using the moving averages instead of the raw data saves time since there are less data points to consider.