EasyManua.ls Logo

HP 50G

HP 50G
887 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Page 18-58
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]]
`` (keep an extra copy)
[5.7,8.2,5.0,8.2,9.5] `
Press J@MTREG. The result is: [-2.1649…,–0.7144…,-1.7850…,7.0941…],
i.e.,
y = -2.1649–0.7144x
1
-1.7850×10
-2
x
2
+ 7.0941x
3
.
You should have in your calculator’s stack the value of the matrix X and the
vector b, the fitted values of y are obtained from y = Xb, thus, just press *
to obtain: [5.63.., 8.25.., 5.03.., 8.22.., 9.45..].
x
1
x
2
x
3
y
1.20 3.10 2.00 5.70
2.50 3.10 2.50 8.20
3.50 4.50 2.50 5.00
4.00 4.50 3.00 8.20
6.00 5.00 3.50 9.50

Table of Contents

Other manuals for HP 50G

Related product manuals