λ
home posts study uses projects

Harmonic Mean

Jul 18, 2024

math

The harmonic mean can be represented in terms of the Arithmetic Mean. It is useful if you’re interested in the rate (e.g speed) of the data.

ni=1n1xi\frac{n}{\sum_{i=1}^{n} \frac{1}{x_i}}

You divide the number of data points by the sum of the reciprocals of all the points in the data set.

Examples

Let’s say you want to calculate the average speed of a car on a race track, based on measurements taken each lap. The first lap the car was driving at 120km/h120km/h and the second lap, at 100km/h100km/h.

Because we have a fixed distance (the track length) and varying time (speed is proportional to time), the speed is the rate we want to calculate.

21120km/h+1100km/h=211600109km/h\frac{2}{\frac{1}{120km/h}+\frac{1}{100km/h}} = \frac{2}{\frac{11}{600}}\approx109km/h

References

LλBS

All systems up and running

Commit a2cf7db, deployed on Dec 14, 2024.