Let $X = \{x_1, x_2, ..., x_n\}$ where $x_i \in \mathrm{R}$. Given a fixed positive integer $k$, let $N^{X}_k(x_i) \subset X$ denote the set of $k$ values from $X$ that are closest to $x_i$ (in absolute value). Example, if $X = \{6, 4, 2, 7, 19, 9, 22\}$ and $k=3$, then $N^{X}_k(7) = \{6, 7, 9\}$.
For each $x_i \in X$, let us define $y_i$ as the mean of $N^{X}_k(x_i)$. This gives $Y = \{y_1, y_2, ..., y_n\}$.
How can one prove the following (I tried experimentally on some examples and it seems to hold) : $$\sum_{y_i \in Y} \sum_{y_j \in N^{Y}_k(y_i)} |y_i - y_j| \leq \sum_{x_i \in X} \sum_{x_j \in N^{X}_k(x_i)} |x_i - x_j|$$
One simple intuition is that our averaging is smoothing the data, but I couldn't find from where to start to prove the above inequality.