HP Forums
(11C) The Four Means - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (11C) The Four Means (/thread-11627.html)



(11C) The Four Means - Eddie W. Shore - 10-21-2018 08:27 PM

The following program uses the statistical registers to calculate four types of mean:

Arithmetic Mean: μ = Σx / n

Harmonic Mean: HM = n / Σ(1/x)

Geometric Mean: GM = (Πx) ^ (1/n)

Root Mean Square: RMS = √(Σx^2 / n)


The HP 11C uses the following registers in statistical analysis. Be sure to clear registers by pressing [ f ] [ x<>y ] (CLEAR REG) before beginning.

R0 = n
R1 = Σx
R2 = Σx^2
R3 = Σy
R4 = Σy^2
R5 = Σxy

LBL A: Enter data
LBL B: Analysis: μ [R/S], HM [R/S], GM [R/S], RMS

HP 11C Program: The Four Means
Code:

001 42, 21, 11  LBL A
002 49   Σ+
003 43, 36  LAST x
004 44, 20, 7  STO× 7
005 15   1/x
006 44, 40, 6   STO+ 6
007 43, 32  RTN

008 42, 21, 12  LBL B
009 43, 0         x-bar 
010 32   R/S
011 45, 6         RCL 6
012 15   1/x
013 45, 0   RCL 0
014 20   *
015 31   R/S
016 45, 7         RCL 7
017 45, 0         RCL 0
018 15   1/x
019 14   y^x
020 31   R/S
021 45, 2         RCL 2
022 45, 0         RCL 0
023 10   ÷
024 11   √
025 43, 32  RTN

Link to blog entry: https://edspi31415.blogspot.com/2018/10/hp-11c-and-emulators-four-means.html


RE: (11C) The Four Means - Carsen - 10-22-2018 01:47 AM

Good work Eddie! I had a lot of fun with your program for finding the 4 different means and I can see you put a lot of work into your blog. It's like a form of retreat for me.

I ran your program and I got every mean except the geometric mean. I checked all my inputs as well as checked my program for any errors and detected none. After entering your example into my 11C emulator, my register 7 has a 0.0000 in it, which leads me to believe that the STO * 7 is not working as intended.


RE: (11C) The Four Means - Eddie W. Shore - 10-22-2018 12:30 PM

(10-22-2018 01:47 AM)Carsen Wrote:  Good work Eddie! I had a lot of fun with your program for finding the 4 different means and I can see you put a lot of work into your blog. It's like a form of retreat for me.

I ran your program and I got every mean except the geometric mean. I checked all my inputs as well as checked my program for any errors and detected none. After entering your example into my 11C emulator, my register 7 has a 0.0000 in it, which leads me to believe that the STO * 7 is not working as intended.

I forgot to say store 1 in register 7 first before running the program. Thanks for reminding me!