One inequality about the average integral: $\bar{f}_A:=\frac{1}{\mu(A)} \int_A f \,d\mu$ For a measurable function $f$, if we consider the average integral:
$$\bar{f}_A:=\frac{1}{\mu(A)}\int_A f \, d\mu$$
where $\mu$ is Lebesgue measure.
\begin{equation}
     \begin{split}
         \int_A (f-\bar{f}_{A})^2\,d\mu
         &\leq \int_A (f-\bar{f}_{B})^2\,d\mu\\
         &\leq\int_B (f-\bar{f}_{B})^2\,d\mu
     \end{split}
 \end{equation}
where $A\subset B$. 

I am confused about how to get the first inequality? 


$f-\overline {f}_B =(f-\overline {f}_A )+ (\overline {f}_A -\overline {f}_B )$. Square both sides and integrate over $A$. Note that the cross term vanishes: $2\int_A (f-\overline {f}_A )(\overline {f}_A -\overline {f}_B )=2(\overline {f}_A -\overline {f}_B ) \int_A (f-\overline {f}_A )$ and $\int_A(f-\overline {f}_A ) =0$. Can you finish?
