# Difference between harmonic mean of arithmetic means and arithm. mean of harm. means

Let $$S=\{(x_i, y_i)\}_{i=1...n} \in [0,1]^{2n}$$ bet a tuple of ordered pairs, and let $$A, H$$ denote the arithmetic and harmonic mean. Then $$\sup_S (H(\underset{i}{A}(x_i),\underset{i}{A}(y_i)) - \underset{i}{A}(H(x_i, y_i))) = \begin{cases} 0.5,n\text{ is even}\\ 0.5 - \frac{1}{2n^2},\text{else} \end{cases}$$

Both composite functions are called "macro F1" and are used by researchers to evaluate machine learning systems. They are, however, not equivalent, which is why we analysed the difference. Also, the fact that they are composite means that the well-known inequalities for means do not hold.

We found a proof (Opitz and Burst, 2019: Macro F1 and Macro F1) by showing that the difference can be increased by intelligently swapping variables and then setting them to either 0 or 1. The proof is fairly long, and we are wondering: Is there a simple way to show this bound?

• It is easy to show that the supremum is at least as large as your bound simply by exhibiting a tuple that attains it, right? So the hard part is to show that no tuple exceeds the bound?
– user856
Commented Nov 21, 2019 at 13:33