Difference between harmonic mean of arithmetic means and arithmetic mean of harmonic 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}
$$
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? 
 A: I will give you a short proof for the even case. I think it may be possible to imitate the steps for $n$ odd.
Restating your problem in a math-olympiad fashion, one has to prove that for $0< x_i,y_i\leq 1$, $1\leq i\leq n$, the following holds:
$$ \frac{1}{n} \cdot \frac{2\left(\sum_{i=1}^n x_i\right) \left(\sum_{i=1}^n y_i\right)}{\left(\sum_{i=1}^n x_i\right) + \left(\sum_{i=1}^n y_i\right)} - \frac{2}{n} \sum_{i=1}^n \frac{x_iy_i}{x_i+y_i} \leq \frac{1}{2}$$
Which in turn, using the inequalities between harmonic and arithmetic means in the first summand, means that it is enough to prove:
$$ \frac{1}{2n} \left(\sum_{i=1}^n x_i + \sum_{i=1}^n y_i\right) - \frac{2}{n} \sum_{i=1}^n \frac{x_iy_i}{x_i+y_i} \leq \frac{1}{2}$$
And this is equivalent to this:
$$ \sum_{i=1}^n (x_i + y_i) - 4 \sum_{i=1}^n \frac{x_iy_i}{x_i+y_i} \leq n$$
Which, rewriting is just to prove:
$$ \sum_{i=1}^n \frac{(x_i-y_i)^2}{x_i+y_i} \leq n$$
And it is sufficient to verify that each summand is $\leq 1$, which is pretty simple given that $(x_i-y_i)^2\leq x_i+y_i$, since this is just equivalent to $x_i^2+y_i^2 \leq x_i+y_i + 2x_iy_i$, and the last inequality follows directly from the fact that $x_i^2\leq x_i$ and $y_i^2\leq y_i$, for $x_i,y_i\in [0,1]$.
Interestingly, the case of equality is straightforward to construct, since we only need that $(x_i-y_i)^2= x_i+y_i$ which is easy to see only can happen for $x_i=1$ and $y_i=0$ or viceversa, and that $\sum x_i = \sum y_i$.
