Science:Math Exam Resources/Courses/MATH102/December 2015/Question 05/Solution 1

From UBC Wiki

You can probably identify the line that best fits the data just by looking, but it is better to justify your intuition with a calculation.
The least-squares line is the one that minimizes the sum of the squares of the differences in y-values between the points and the line.
We start with picture (a). This picture contains 5 data points: (1,4), (2,3), (3,2), (4,1), and (5,3). The line passes through the points (1,3), (2,3), (3,3), (4,3), and (5,3). The differences in the y-values for these points are -1, 0, 1, 2, and 0. We square each of these numbers to arrive at 1, 0, 1, 4, 0, and add to get 6.
The line in (b) passes through (1,3.5), (2,3), (3,2.5), (4,2), and (5,1.5). The differences in y-values are therefore -0.5, 0, 0.5, 1, and -1.5. Squaring gives 0.25, 0, 0.25, 1, and 2.25. We add these numbers and arrive at 3.75.
The line in (c) passes through (1,4), (2,3), (3,2), (4,1), and (5,0). The differences in y-values are therefore 0, 0, 0, 0, -3. Squaring gives 0, 0, 0, 0, 9. Adding gives 9.
The line in (d) passes through (1,5), (2,4), (3,3), (4,2), and (5,1). The differences in y-values are therefore 1, 1, 1, 1, and -2. Squaring these gives 1, 1, 1, 1, 4. We add these together to get 8.

The smallest of these numbers, 3.75, is achieved by (b).

answer: