On an expected value inequality.

Taking the particular case of small $r$ ($r \to 0$) and continuous $f$, your inequality turns equivalent to

$$ \int f^2 \ge \int f g $$

with the restrictions $\int f = \int g = 1$ and $f\ge 0$, $g\ge 0$. This is clearly false. For a fixed $f$ we maximize $\int f g$, not by choosing $g=f$, but by choosing $g$ concentrated around the mode (maximum) of $f$.

Incidentally, your assertion has a simple interpretation: suppose I have to guess the value of a random variable $x$ with pdf $f$, so that I win if the absolute error $e=|x- \hat x|$ is less than $r$. If the inequality were true, then the conclusion would be that my best estrategy (in terms of expected win rate) is to make a random guess , by drawing my $\hat x$ as an independent random variable with the same density as $x$. But this is not true, the optimal guess is to choose a deterministic value, that which maximizes the respective integral; for small $r$ this is the mode of $f$ (maximum a posteriori).


Unfortunately, your intuitive conjecture is INCORRECT.

Let $f(x)$ be the PDF of the random variable $X$ and $F(x)$ be its cumulative PDF, so that $F'(x)=f(x)$, or $$F(x)=\int_{-\infty}^x f(t)dt$$ Similarly, let $g(x)$ be another PDF with cumulative PDF $G(x)$. Then the expected value of the integral $$\int_{X-r}^{X+r} g(x)dx$$ is equal to $$\int_{-\infty}^\infty \int_{x-r}^{x+r} f(x)g(t)dtdx=\int_{-\infty}^\infty (G(x+r)-G(x-r))f(x)dx$$ By using integration by parts, we have that $$\int_{-\infty}^\infty (G(x+r)-G(x-r))f(x)dx=\int_{-\infty}^\infty (F(x+r)-F(x-r))g(x)dx$$ Consider this simple counterexample. Let $r=1$, and suppose that $$f(x)=\frac{1}{\pi}\frac{1}{1+x^2}$$ Then, if your conjecture is true, for no function $g$ will the integral $$\frac{1}{\pi}\int_{-\infty}^\infty (\arctan(x+1)-\arctan(x-1))g(x)dx$$ even surpass the value $$\frac{1}{\pi^2}\int_{-\infty}^\infty \frac{\arctan(x+1)-\arctan(x-1)}{1+x^2}dx\approx 0.1475$$ However, suppose that we let $$g(x)=\frac{4}{\pi}\frac{1}{1+4x^2}$$ Then the value of our integral is equal to $$\frac{4}{\pi^2}\int_{-\infty}^\infty \frac{\arctan(x+1)-\arctan(x-1)}{1+4x^2}dx\approx 0.3743$$ which disproves your conjecture.