Post Reply 
(15C) Multiple Linear Regression for HP-15C
01-27-2014, 07:35 AM
Post: #2
RE: Multiple Linear Regression for HP-15C
This example could be calculated without entering data twice or using any program.
Make sure to set the calculator to USER mode.

Enter matrix \(A\):
\(A = \begin{bmatrix}
1 & 1 & 55 \\
1 & 2 & 67 \\
1 & 3.5 & 33 \\
1 & 4 & 34 \\
1 & 5 & 41 \\
\end{bmatrix}
\)

Code:
5 ENTER 3
DIM A
MATRIX 1
1   STO A
    STO A
55  STO A
1   STO A
2   STO A
(…)
5   STO A
41  STO A

Enter matrix \(B\):
\(
B = \begin{bmatrix}
-4.5 \\
-6.1 \\
7.1 \\
7.8 \\
7.7 \\
\end{bmatrix}
\)

Code:
5 ENTER 1
DIM B
-4.5   STO B
-6.1   STO B
(…)
 7.7   STO B

Calculate \(C=A^{\top}A\):
Code:
RESULT C
RCL MATRIX A
ENTER
MATRIX 5

Calculate \(D=A^{\top}B\):
Code:
RESULT D
RCL MATRIX A
RCL MATRIX B
MATRIX 5

Calculate \(E=C^{-1}D\):
Code:
RESULT E
RCL MATRIX D
RCL MATRIX C
/

Get result:
Code:
RCL E   -> 10
RCL E   -> 2
RCL E   -> -0.3

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Multiple Linear Regression for HP-15C - Thomas Klemm - 01-27-2014 07:35 AM



User(s) browsing this thread: 1 Guest(s)