Playing around with an exercise I found this inequality:
Given $(\Omega,\mu)$ a measure space, $K$ a measurable subset and $X$ a real random variable, it holds:
$\left(\int_{K^c} X d \mu \right) \left(\int_{K} X d \mu \right) \le \frac{\mu(\Omega)}{4}\int_{\Omega} X^2 d \mu $
, where $K^c$ is the complementary of $K$.
I wanted to propose this inequality for these reasons:
1- To check if it is true and I did not make any mistake
2- To propose it as a simple exercise
3- To know if it is a well known inequality
Note that one can easily specialize the inequality to a discrete setting.
Let $(\Omega,\mathfrak{A},\mu)$ be a measure space, $K\subseteq\Omega$ be measurable and $X\colon\Omega\rightarrow\mathbb{R}$ be measurable. Furthermore, assume that $X$ is non-negative or integrable. Note that $\int_KX\mathrm{d}\mu+\int_{K^c}X\mathrm{d}\mu=\int_{\Omega}X\mathrm{d}\mu$. It is an easy exercise in calculus to show that $xy\le z^2/4$ for $x,y,z\in\mathbb{R}$ with $x+y=z$. Therefore, $$\left(\int_KX\mathrm{d}\mu\right)\left(\int_{K^c}X\mathrm{d}\mu\right)\le\frac{1}{4}\left(\int_{\Omega}X\mathrm{d}\mu\right)^2\le\frac{1}{4}\left(\int_{\Omega}|X|\mathrm{d}\mu\right)^2=\frac{1}{4}\left(\int_{\Omega}|X\cdot1|\mathrm{d}\mu\right)^2\\ \stackrel{\text{Hölder}}{\le}\frac{1}{4}\left(\left(\int_{\Omega}|X|^2\mathrm{d}\mu\right)^{1/2}\left(\int_{\Omega}1^2\mathrm{d}\mu\right)^{1/2}\right)^2=\frac{\mu(\Omega)}{4}\int_{\Omega}X^2\mathrm{d}\mu.$$