TITLE: Prove that $\int_E \log fd\mu \leqslant \mu(E) \, \log \left[\frac{1}{\mu(E)} \right]$ for strictly positive measure $\mu$
QUESTION [6 upvotes]: Let $(X, \Sigma, \mu)$ be a measurable space, with strictly positive measure $\mu$.
Let $f: X \rightarrow (0, \infty)$ be a function such that $\int_X fd\mu=1$.
Show that for every $\mu$-measurable set $E \in \Sigma$ with $0 < \mu(E)<\infty$ the following inequality holds:
$$\int_E \log fd\mu \leqslant \mu(E) \, \log \left[\frac{1}{\mu(E)} \right]$$
I'm dealing with this quiestion quite a bit and can't seems to find a solution.
My approach: We define new measure $\nu = f \cdot \mu$. Since $f>0$ and $\mu$ strictly positive, then $\nu$ is strictly positive.
Moreover, $\nu(X) \equiv \int_Xdv = \int_Xd(f\cdot\mu) =\int_Xfd\mu = 1$. Therefore, by the Jansen inequality (concaved version):
For every integrable function $g$ (according to $\mu$ ) such that $g:X \rightarrow (0,\infty)$ and concave function $F:(0, \infty) \rightarrow$ R (R for the real numbers):
$$\int_X F\circ g d\nu \leq F \biggl(\int_X g d\nu \biggl)$$
I thought about taking $F(x) = \log(x)$ but I can't seem to find the right $g$ and how to conclude it to the integral overall given set $E$.
Does anyone have a solution for this?
Thanks.
Edit:
I got it. Take $g=f$ and for every set E above define $\nu_E = \frac{1}{\mu(E)} \cdot \mu$. Clearly, $\nu(E)=1$ there fore by the Jensen inequality we get:
$$\int_E \frac{1}{\mu(E)} \cdot \log f d\mu  \leq \log \biggl(\int_E f \frac{1}{\mu(E)} \cdot d\mu \biggl)$$
Now we play with the last inequality and we get an equivalent one:
$$\int_E \log fd\mu \leqslant \mu(E) \, \log \left[\frac{1}{\mu(E)} \right]$$

REPLY [2 votes]: Define
$$\mu_E(dy) := \frac{1}{\mu(E)} 1_E(y) \, d\mu(y)$$
then
$$\int_E \log f \, d\mu = \mu(E) \int \log f \, d\mu_E.$$
Applying Jensen's inequality to the probability measure $\mu_E$ and $F(x) = \log x$ we find
$$\int_E \log f \, d\mu \leq \mu(E) \log \left( \int f \, d\mu_E \right) = \mu(E) \log \left( \frac{1}{\mu(E)} \int_E f \, d\mu \right).$$
As $\int_E f \, d\mu \leq 1$ it follows from the monotonicity of the logarithm that
$$\int_E \log f \, d\mu \leq \mu(E) \log \left( \frac{1}{\mu(E)} \right). $$