# HP 48gII User Manual Page 628

Graphing calculator.

Then, the vector of coefficients is obtained from b = (X
the vector y = [y
y
... y
1
2
For example, use the following data to obtain the multiple linear fitting
1.20
2.50
3.50
4.00
6.00
With the calculator, in RPN mode, you can proceed as follows:
First, within your HOME directory, create a sub-directory to be called MPFIT
(Multiple linear and Polynomial data FITting) , and enter the MPFIT sub-
directory. Within the sub-directory, type this program:
«
X y « X TRAN X * INV X TRAN * y * " "
and store it in a variable called MTREG (MulTiple REGression).
Next, enter the matrices X and b into the stack:
[[1,1.2,3.1,2][1,2.5,3.1,2.5 ][1,3.5,4.5,2.5][1,4,4.5,3][1,6,5,3.5]]
Press J@MTREG. The result is: [-2.1649...,–0.7144...,-1.7850...,7.0941...],
i.e.,
y = -2.1649–0.7144⋅x
T
]
.
m
⋅x
⋅x
y = b
+ b
+ b
+ b
0
1
1
2
2
x
x
x
1
2
3
3.10
2.00
3.10
2.50
4.50
2.50
4.50
3.00
5.00
3.50
`` (keep an extra copy)
[5.7,8.2,5.0,8.2,9.5] `
-1.7850×10
1
T
⋅X)
-1
⋅X
T
⋅y, where y is
⋅x
3
3,
y
5.70
8.20
5.00
8.20
9.50
-2
⋅x
+ 7.0941⋅x
.
2
3
Page 18-57