综合讨论版 #610801 层

Harmonic Mean

楼主 · 1 楼
During lecture, our teacher gave us an example.


引用


Two products A and B, you get product A 10 liters for 100 euros and you get product B 15 liters towards the same money. What is the average price of products A and B?



- Wrong way:

(10 liters + 15 liters)/ 200 euros = 0.125 liters / euros.

So, in average the price for 1 unit would hence be 1 euro/0.125 Liters = 8 euros / unit?



- Right way:

To buy a 1 unit (liters) of product A we need 100 euros /10 liters = 10 euros / liters, and 100 euros / 15 euros = 6.66667 euros / liter to buy 1 unit of product B. To get 1 unit of both products we need in total 10 + 6.66667 = 16.66667 euros, hence the avg. price is 8.3333 euros / 1 unit.



This is definitely not 8 euros as calculated above. In the wrong way we do not take into account unit prices.



Harmonic mean is know calculated as 2/((100/10) + (100/15)) = 0.12 so that with 1 euros you get 0.12 units. So, 1/0.12 = 8.3333 euros / unit.


I had though the harmonic mean should be calculated as 200/((100/10) + (100/15))...could you tell me the reason why i'm wrong?