Means: geometric, weighted, harmonic - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP Prime Software Library (/forum-15.html) +--- Thread: Means: geometric, weighted, harmonic (/thread-9762.html) |
Means: geometric, weighted, harmonic - salvomic - 12-23-2017 11:20 AM 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 |