The Museum of HP Calculators


Linear Regression for the HP-41C/CV/CX

This program is Copyright © HP and is used here by permission. It was originally printed in the Applied Stats 2 Solution Book. This program was entered and uploaded by Tony Duell.

This program is supplied without representation or warranty of any kind. Tony Duell, Hewlett Packard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Documentation Information (CD or source code)
How to get this Program to your Calculator (via HP-IL, disk, wand, and fingers)
Download Binary (.raw) program for disk or PC HP-IL Card download
Download Hexadecimal (.dat) program for Serial Port download

Program Listing

LINE  KEYS
 01 LBL "REGR"
 02 LBL a
 03 CF 00
 04 CF 01
 05 RTN
 06 LBL F
 07 SF 00
 08 LBL A
 09 CLRG
 10 RTN
 11 LBL D
 12 SF 01
 13 LBL 01
 14 STOP
 15 FS? 00
 16 LOG
 17 STOP
 18 ADV
 19 X<>Y
 20 SREG 14
 21 S+
 22 GTO 01
 23 LBL C
 24 CLRG
 25 STOP
 26 STO 20
 27 ADV
 28 LBL 02
 29 STOP
 30 FS? 00
 31 LOG
 32 STO 21
 33 ADV
 34 LBL 00
 35 STOP
 36 ST+ 00
 37 RCL 21
 38 SREG 14
 39 S+
 40 XROM 30,29
 41 GTO 00
 42 LBL B
 43 RCL 00
 44 "~Y."
 45 XEQ 11
 46 ADV
 47 X^2
 48 RCL 25
 49 /
 50 ST+ 02
 51 0
 52 STO 00
 53 STO 25
 54 GTO 02
 55 LBL G
 56 MEAN
 57 STO 00
 58 X<>Y
 59 STO 01
 60 RCL 15
 61 RCL 14
 62 X^2
 63 RCL 19
 64 /
 65 -
 66 STO 10
 67 RCL 18
 68 RCL 14
 69 RCL 16
 70 *
 71 RCL 19
 72 /
 73 -
 74 STO 11
 75 RCL 10
 76 /
 77 STO 21
 78 RCL 16
 79 RCL 21
 80 RCL 14
 81 *
 82 -
 83 RCL 19
 84 /
 85 STO 23
 86 SF 13
 87 "A"
 88 XEQ 11
 89 RCL 21
 90 "B"
 91 XEQ 11
 92 CF 13
 93 ADV
 94 RCL 17
 95 RCL 16
 96 X^2
 97 RCL 19
 98 /
 99 STO 22
100 -
101 STO 12
102 FS? 01
103 GTO 03
104 RCL 02
105 RCL 22
106 -
107 STO 13
108 LBL 03
109 RCL 11
110 RCL 21
111 *
112 STO 04
113 RCL 13
114 FS? 01
115 RCL 12
116 RCL 04
117 -
118 STO 05
119 XEQ 06
120 RCL 05
121 X<>Y
122 /
123 STO 06
124 FS? 01
125 GTO 04
126 RCL 12
127 RCL 13
128 -
129 STO 07
130 RCL 19
131 RCL 20
132 -
133 STO 08
134 /
135 STO 22
136 LBL 04
137 ADV
138 "ANVA"
139 AVIEW
140 ADV
141 "REG."
142 AVIEW
143 1
144 "D.L."
145 XEQ 11
146 STO 24
147 RCL 04
148 "S.C."
149 XEQ 11
150 "C.M."
151 XEQ 11
152 RCL 06
153 /
154 STO 16
155 "F"
156 XEQ 11
157 XEQ 06
158 STO 26
159 XEQ 10
160 "DEV."
161 AVIEW
162 XEQ 06
163 STO 24
164 "D.L."
165 XEQ 11
166 RCL 05
167 "S.C."
168 XEQ 11
169 RCL 06
170 "C.M."
171 XEQ 11
172 FS? 01
173 GTO 05
174 RCL 22
175 /
176 STO 16
177 "F"
178 XEQ 11
179 RCL 08
180 STO 26
181 XEQ 10
182 "ERR."
183 AVIEW
184 RCL 08
185 "D.L."
186 XEQ 11
187 RCL 07
188 "S.C."
189 XEQ 11
190 "C.M."
191 RCL 22
192 XEQ 11
193 ADV
194 LBL 05
195 FS? 01
196 ADV
197 "TOT."
198 AVIEW
199 RCL 19
200 1
201 -
202 "D.L,"
203 XEQ 11
204 RCL 12
205 "S.C."
206 XEQ 11
207 RCL 09
208 .05
209 X>Y?
210 GTO 00
211 7
212 RCL 05
213 RCL 07
214 +
215 RCL 19
216 2
217 -
218 STO 24
219 /
220 STO 06
221 LBL 07
222 RTN
223 LBL E
224 FS? 01
225 GTO 08
226 STOP
227 ST- 00
228 RCL 21
229 S-
230 RCL 25
231 1
232 -
233 STO 25
234 GTO 00
235 LBL 08
236 STOP
237 FS? 00
238 LOG
239 STOP
240 X<>Y
241 S-
242 GTO 01
243 LBL 11
244 "|-="
245 ARCL X
246 AVIEW
247 RTN
248 LBL 06
249 RCL 20
250 FS? 01
251 RCL 19
252 2
253 -
254 RTN
255 LBL 10
256 2
257 ENTER
258 9
259 /
260 STO 28
261 RCL 24
262 /
263 STO 25
264 RCL 28
265 RCL 26
266 /
267 STO 28
268 1
269 -
270 CHS
271 RCL 16
272 3
273 1/X
274 Y^X
275 *
276 1
277 RCL 25
278 -
279 -
280 STO 27
281 RCL 28
282 RCL 16
283 2
284 ENTER
285 3
286 /
287 Y^X
288 *
289 RCL 25
290 +
291 SQRT
292 RCL 27
293 X<>Y
294 /
295 STO 28
296 X>0?
297 SF 02
298 ABS
299 1
300 RCL 28
301 .196854
302 *
303 +
304 RCL 28
305 X^2
306 .115194
307 *
308 +
309 RCL 28
310 3
311 Y^X
312 .00034
313 *
314 +
315 RCL 28
316 4
317 Y^X
318 .019527
319 *
320 +
321 -4
322 Y^X
323 2
324 /
325 CHS
326 1
327 +
328 FIX 03
329 FS?C 02
330 XEQ 12
331 "P"
332 XEQ 11
333 STO 09
334 FIX 02
335 ADV
336 RTN
337 LBL 12
338 1
339 X<>Y
340 -
341 RTN
342 LBL H
343 LBL 13
344 RCL 23
345 RCL 21
346 STOP
347 FS? 00
348 LOG
349 STO 15
350 *
351 +
352 "Y"
353 XEQ 11
354 STO 16
355 RCL 15
356 RCL 00
357 -
358 X^2
359 RCL 10
360 /
361 RCL 19
362 1/X
363 +
364 RCL 06
365 *
366 SQRT
367 "S.E.Y"
368 XEQ 11
369 XEQ 19
370 *
371 RCL 16
372 X<>Y
373 ST+ 16
374 -
375 "L.I."
376 XEQ 11
377 RCL 16
378 "L.S."
379 XEQ 11
380 ADV
381 GTO 13
382 LBL I
383 0
384 STO 17
385 STO 25
386 FS? 01
387 GTO 14
388 LBL 15
389 STOP
390 ST+ 17
391 XROM 30,29
392 GTO 15
393 LBL J
394 ADV
395 RCL 17
396 RCL 25
397 /
398 STO 17
399 GTO 16
400 LBL 14
401 STOP
402 STO 17
403 LBL 16
404 RCL 23
405 -
406 RCL 21
407 /
408 STO 18
409 FS? 00
410 10^X
411 "X"
412 XEQ 11
413 FS? 01
414 GTO 17
415 RCL 25
416 1/X
417 RCL 19
418 1/X
419 +
420 GTO 18
421 LBL 17
422 1
423 RCL 19
424 1/X
425 +
426 LBL 18
427 RCL 17
428 RCL 01
429 -
430 X^2
431 RCL 21
432 X^2
433 /
434 RCL 10
435 /
436 +
437 RCL 06
438 RCL 21
439 X^2
440 /
441 *
442 SQRT
443 "S.E.X"
444 XEQ 11
445 ADV
446 XEQ 19
447 *
448 RCL 18
449 X<>Y
450 ST+ 18
451 -
452 FS? 00
453 10^X
454 "L.I"
455 XEQ 11
456 RCL 18
457 FS? 00
458 10^X
459 "L.S"
460 XEQ 11
461 ADV
462 GTO I
463 LBL 19
464 2.3777
465 RCL 24
466 /
467 E^X
468 .96
469 +
470 RTN
471 ADV
472 END

Go back to the HP-41 software library
Go back to the general software library
Go back to the main exhibit hall