|
|
By: Neil E. Cotter |
Regression |
|
|
|
Multiple regression |
|
|
|
Example 1 |
|
|
|
|
|
|
|
|
Ex: Find a multiple regression (i.e., hyperplane fit) to the following data:
(3, 4, 27) (5, 5, 15) (2, 6, 23) (1, 3, 9) (4, 2, 1)
Sol'n: The hyperplane is defined as follows:
![]()
We write matrix terms for the data and hyperplane fit:

The matrix equation for the data and hyperplane fit are as follows:
![]()
A pseudoinverse of X yields the least-squares solution:
![]()
where
![]()
Not'n: XT ≡ X transpose

![]()
Plugging the (x1, x2) coordinates into the hyperplane equation yields the following estimated y values:
![]()
or

The errors are found by subtracting y values from estimated y values:

Note: The errors sum to zero, but this is not always the case.
In the plot, below, the estimates are shown as circles:
