Harmonic mean of a statistical list
Important: The stats package has been deprecated. Use the superseding package Statistics instead.
The function harmonicmean of the subpackage stats[describe, ...] computes the harmonic mean of the given data.
Classes are assumed to be represented by the class mark, for example 10..12 has the value 11. Missing data are ignored.
The harmonic mean is defined to be the reciprocal of the mean of the reciprocals of the data. A mnemonic formula is 1H=sum⁡1XN.
The harmonic mean is a measure of central tendency. For more information about such measures, refer to the information for the (arithmetic) mean. The harmonic mean is often appropriate when one is dealing with velocities or rates.
The command with(stats[describe],harmonicmean) allows the use of the abbreviated form of this command.
The harmonic mean of 1/3 and 1/5 is
When I purchase gasoline for my automobile, I always pay 1 Sim. Of course the price is never the same. One time it was 3 Sim/bucket, at another time it was 5 Sim/bucket. The ``average price'' is then obtained as follows: The first time I obtained 1/3 buckets. The second time, it was 1/5 buckets. In total I obtained 1/3+1/5 buckets for a cost of 2 Sim. The average price I paid was then 2/ (1/3+1/5)=15/4=3.75 Sim/bucket.
Note that the arithmetic mean is not appropriate in this case, since it is equal to
If the first time, since the price was low, I bought for 2 Sim of fuel, the average price becomes
Download Help Document