Means: geometric, weighted, harmonic
|
12-23-2017, 11:20 AM
(This post was last modified: 01-04-2018 10:32 AM by salvomic.)
Post: #1
|
|||
|
|||
Means: geometric, weighted, harmonic
Here there is a simple program to calculate some means, given lists of values.
• gmean Geometric mean of {list1} (all numbers in the list must be >0) • wmean Weighted mean of {list1} with weights {wlist} • hmean Harmonic mean of {list1} (all numbers must be >0) Enjoy! Salvo M. Code:
EDIT:: thanks to Carlos29pz for info: I didn't remember that we can use the already present command mean(list1, list2) to get weighted mean, so please, use my program only for geometric and harmonic means, since those command won't be built-in the Prime. EDIT 2 :: see also the thread Means API by StephenG1CMZ with some other means ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)