Book: Analysing Data Using Linear Models
Chapter 4: 4.3, 4.4, 4.5, 4.6, 4.7
Chapter 4.3: Linear regression
Prediction model - a reasonable approximation of the data.
linear regression - finding a straight line to approximate the data points. We describe the behaviour of
the dependent variable (the Y-variable on the vertical axis) on the basis of the independent variable (the
X-value on the horizontal axis) using a linear equation.
We say that we regress variable Y on variable X.
Chapter 4.4: Residuals
Residuals or errors - the discrepancy between, in this example, the actual amount spent (the actual
value) and the amount prescribed by the linear equation
809-786=23 euros. 809 is the amount of money spent on holidays. 786 being the amount of
money spent on holidays according to the linear equation. 23 being the residual.
Chapter 4.5: Least squares regression lines
Ordinary Least Squares (OLS) - we draw a line that is more or less in the middle of the Y-values.
Two criteria: we want the sum of the residuals to be 0 (about half of them negative, and half of
them positive), and we want the residuals to be as small as possible.
We can achieve both of these when we use as our criterion the idea that the sum of the squared
residuals be as small as possible. This way the variance of the residuals is as small as possible.
1. Numerical search Try some reasonable combinations of values for the intercept and slope, and
for each combination, calculate the sum of the squared residuals. For the combination that shows
the lowest value, try to tweak the values of the intercept and slope
a bit to find even lower values for the sum of the squared
residuals. Use some stopping rule otherwise you keep looking
forever.
2. Analytical approach For problems that are not too complex, like
this linear regression problem, there are simple mathematical
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller kayleighdebruin1. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.21. You're not tied to anything after your purchase.