Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. (4 marks) The line of best fit chosen for a linear regression is usually defined as the Icast-squares regression line. This is the line
1. (4 marks) The "line of best fit" chosen for a linear regression is usually defined as the Icast-squares regression line. This is the line that makes the sum of the squares of the vertical distances of the data points from the line as small as possible. The following applet, created by Milan Valasek and Jennifer Mankin at the University of Sussex, helps illustrate the idea of a least-squares regression line: https://and. netlify . app/viz/app/?v=ols_reg&t=Line+of+best+fit The applet shows a dataset of size n = 7. It allows you to move the line vertically up and down (by moving the left endpoint of the line with your cursor) or to make it more or less steep (by moving the right endpoint of the line with your cursor). Below is a screenshot of the applet: 10- 10 12 14 18 16 20 2 24 26 28 20 The dotted lines show the vertical distance from each data point to the line. The area of each blue square is equal to the square of the vertical distance. Therefore, a line is a "better fit" to the data if it results in a smaller total area of the squares. The "SSR" at the bottom of the page stands for "Sum of Square Residuals." This is just the total of these square vertical distances, which we have called "LSE" in class. In other words, it is the total area of all of the blue squares. This is the value we are trying to minimize. (a) Go to the applet link given above. Move the line around so that it is perfectly horizontal, at y = 18. What is the SSR. for this line? (b) First, let's observe what happens as we keep the slope constant, but change the intercept: Keep the line horizontal, and move it slowly downwards (by moving the left endpoint of the line with your cursor). As you move it downwards, you arechanging the intercept. For example, when the line is horizontal at y = 10} the intermpt is 10. (This is because 1:: = U at the left Side of this plot. Recall that the intercept is the value that 1; takes on when 35: 0') As you move the line downwards, keep an eye on the areas of the blue squares, and on the SSH. value. Still keeping the line horizontal, at approximately whet yvalue do you get the \"best\" horizontal line? (c) Next, let's observe what happens as we keep the intercept constant but change the slope: Adjust the line so that it is lying horizontally with an intercept of 2. Then, gradually increase the slope of the line (by moving the right endpoint upwards with your cursor), still keeping the intercept at 2. As you increase the slope, keep an eye on the areas of the blue squares, and on the SSR value. Still keeping the intercept at 2, what is the approximate slope of the line that minimizes the SSR? (It might be hard to read exact values off the applet. Approximate answers are OK.) (d) In part (c), you may have noticed that the line suddenly became purple at the "best" slope value. This indicates that this is the least squares regression line, which is the overall "best" line for this data. Recall from part (c) that this happened when the intercept was 2, and the slope was what you calculated above. What is the equation of the least squares regression line for this dataset
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started