Consider the data given at the beginning of this section.
We found that the best-fit line is y = (9/10)x + 11/6. Find the best-fit line that passes through the point x = 10, y = 11.
10 | 5 | 0 | x |
11 | 6 | 2 | y |
Subtracting 10 from all the x values and 11 from all the y values, we obtain a new set of data in terms of the new variables X = x − 10 and Y = y − 11.
Expressing (C.1.3) in terms of the new variables X and Y, we have
m \sum\limits_{i=1}^n x_i^2=\sum\limits_{i=1}^n x_i y_i (C.1.3)
m \sum\limits_{i=1}^3 X_i^2=\sum\limits_{i=1}^3 X_i Y_i
\sum\limits_{i=1}^3 X_i^2=(-10)^2+5^2+0=125
\sum\limits_{i=1}^3 X_i Y_i=(-10)(-9)+(-5)(-5)+0=115
Thus, m = 115/125 = 23/25 and the best-fit line is Y = (23/25)X. In terms of the original variables, this line is expressed as y − 11 = (23/25)(x − 10) or y = (23/25)x + 9/5.
0 | -5 | -10 | X |
0 | -5 | -9 | Y |