Page 155 - Applied Statistics with R
P. 155
155
• 1 as the weight (wt) of the th car.
• 2 as the model year (year) of the th car.
The picture below will visualize what we would like to accomplish. The data
points ( , , ) now exist in 3-dimensional space, so instead of fitting a line
1
2
to the data, we will fit a plane. (We’ll soon move to higher dimensions, so this
will be the last example that is easy to visualize and think about this way.)
40
30
40
30
20
20 82
80
mpg
10 78
0 76 year 10
2000
74
3000
72
wt 4000
5000 70 0
How do we find such a plane? Well, we would like a plane that is as close as
possible to the data points. That is, we would like it to minimize the errors it
is making. How will we define these errors? Squared distance of course! So, we
would like to minimize
( , , ) = ∑( − ( + + )) 2
2 2
0
2
1
1 1
0
=1

