Post Reply 
(12C) Geometric & Harmonic Mean
06-26-2024, 04:51 AM
Post: #1
(12C) Geometric & Harmonic Mean
Program to calculate the Geometric and Hamonic Mean

--------------------------------------------------------------

Procedure:

For every new problem first " Clear Statistic Registers "

To clear statistic register press [f] [Σ]

--------------------------------------------------------------

Enter each Data Value press [R/S] and display will show

the number of data entered 1, 2, 3, ....... , n

When done press 0 [R/S] display answer for Geometric Mean

[X<>Y] display answer for Harmonic Mean

---------------------------------------------------------------
Example:

Data: 30, 10

[f] [Σ]

30 [R/S] display 1
10 [R/S] display 2

0 [R/S] display answer for GM = 17.3205 [X<>Y] for HM = 15

----------------------------------------------------------------
Program:
Quote:01 X=0
02 GTO 09
03 1/x
04 ENTER
05 LSTx
06 LN
07 Σ+
08 GTO 00
09 X-bar // [g] [0]
10 X<>Y
11 1/x
12 X<>Y
13 e^x

Gamo 6/2024
Find all posts by this user
Quote this message in a reply
06-26-2024, 03:08 PM
Post: #2
RE: (12C) Geometric & Harmonic Mean
I am trying to load this program in my HP-25, and have difficulty understanding step number 9: x-bar//[g] [0]. Can you assist me please. Pedro
Find all posts by this user
Quote this message in a reply
06-26-2024, 04:50 PM
Post: #3
RE: (12C) Geometric & Harmonic Mean
(06-26-2024 03:08 PM)PedroLeiva Wrote:  I am trying to load this program in my HP-25, and have difficulty understanding step number 9: x-bar//[g] [0]. Can you assist me please. Pedro

"x-bar" is the "mean of x", located at [g] [0] on the HP-12C. It calculates both the mean of X and the mean of Y.

On the HP-25, it looks like x-bar is located at [f] [x<>y] according to the images that I see on the internet. No idea if it calculates both x-bar and y-bar like the HP-12C.
Find all posts by this user
Quote this message in a reply
06-26-2024, 05:48 PM
Post: #4
RE: (12C) Geometric & Harmonic Mean
(06-26-2024 04:50 PM)bxparks Wrote:  
(06-26-2024 03:08 PM)PedroLeiva Wrote:  I am trying to load this program in my HP-25, and have difficulty understanding step number 9: x-bar//[g] [0]. Can you assist me please. Pedro

"x-bar" is the "mean of x", located at [g] [0] on the HP-12C. It calculates both the mean of X and the mean of Y.

On the HP-25, it looks like x-bar is located at [f] [x<>y] according to the images that I see on the internet. No idea if it calculates both x-bar and y-bar like the HP-12C.
TYVM, I will test and inform. Pedro
Find all posts by this user
Quote this message in a reply
06-27-2024, 09:58 AM (This post was last modified: 06-27-2024 10:04 AM by Gamo.)
Post: #5
RE: (12C) Geometric & Harmonic Mean
I'm looking in the HP25 User's Handbook on page 68

About using the (Mean) function the X-bar key.

Example provided only the Mean Value on the X-Stack and look like

no Mean Calculation on the Y-Stack unlike the HP-12C example on page 89

Remark:
This program on line 10 the [X<>Y] key swap the Y-Stack for the Mean Value
from the Y-Stack to calculate the Harmonic Mean


Gamo
Find all posts by this user
Quote this message in a reply
06-27-2024, 10:02 AM
Post: #6
RE: (12C) Geometric & Harmonic Mean
Yes Gamo, you are right. For double mean (X & Y) stack values I will have to use HP-67. Thanks for taking care of the issue. Pedro
Find all posts by this user
Quote this message in a reply
06-27-2024, 02:25 PM
Post: #7
RE: (12C) Geometric & Harmonic Mean
(06-27-2024 10:02 AM)PedroLeiva Wrote:  Yes Gamo, you are right. For double mean (X & Y) stack values I will have to use HP-67. Thanks for taking care of the issue. Pedro

The same HP-25 manual also says that Σy is collected in R4, and N is collected in R3. And ybar=Σy/N. It shouldn't be hard to adapt the program to the HP-25 by calculating ybar manually using R4 and R3.
Find all posts by this user
Quote this message in a reply
06-27-2024, 09:40 PM
Post: #8
RE: (12C) Geometric & Harmonic Mean
I have an HP-25C version of Geometric and Harmonic Mean, but 8MB load cuota is exceeded. If anyone is interested, please send me an email to: pedrodanielleiva@gmail.com. As far as I know with private messages is not possible to attach files. Pedro
Find all posts by this user
Quote this message in a reply
06-27-2024, 11:40 PM
Post: #9
RE: (12C) Geometric & Harmonic Mean
(06-27-2024 09:40 PM)PedroLeiva Wrote:  I have an HP-25C version of Geometric and Harmonic Mean, but … Pedro

as received from same

.pdf  HP 25C - Harmonic and Geometic Mean.pdf (Size: 75.61 KB / Downloads: 11)

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
06-27-2024, 11:59 PM
Post: #10
RE: (12C) Geometric & Harmonic Mean
Thank you SlideRule
Pedro
Find all posts by this user
Quote this message in a reply
06-29-2024, 04:10 AM
Post: #11
RE: (12C) Geometric & Harmonic Mean
Program update from Post #1 to include the Arithmetic mean

Usage:

Data: 40, 10

[f] REG
[f] Σ

40 [R/S] display 1
10 [R/S] display 2

0 [R/S] display answer for AM is 25

[R↓] display answer for GM is 20

[R↓] display answer for HM is 16

Remark: AM > GM > HM
-----------------------------------------
Program:
Quote:01 X=0
02 GTO 10
03 STO+0
04 1/x
05 ENTER
06 LSTx
07 LN
08 Σ+
09 GTO 00
10 X-bar
11 X<>Y
12 1/x
13 X<>Y
14 e^x
15 RCL 0
16 RCL 1
17 ÷

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




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