# Counterexample to Jensen's inequality

This appeared in an exam I took.

The question asked us to give an example of a convex function $g: \mathbb{R} \longmapsto \mathbb{R}$ and a measure $\mu$ on $\left(\mathbb{R}, \mathscr{B}(\mathbb{R})\right)$ such that $g\left(\int x \, d\mu(x)\right) > \int g(x)\, d\mu(x)$.

I am assuming that such an example can be constructed by violating the finiteness of the measure, but I have no idea how I would construct such an example. I guess the Lebesgue measure can be used, but am having trouble finding a function that is convex and gives this result.

-
A probability measure or an ordinary un-normalized measure? –  zyx Nov 7 '11 at 0:08
So, Jensen's inequality will always hold for finite measures like probability measures. I think I will need to use un-normalised measures for this. –  fg nu Nov 7 '11 at 0:09
I'm not sure this is what you're looking for but $$\exp\left(\int_0^2 x \, dx\right) = e^2 > \int_0^2 e^x \, dx = e^2 - 1$$ –  Joel Cohen Nov 7 '11 at 0:20
That certainly seems to work. I wonder which of the requirements of Jensen's inequality it violates. –  fg nu Nov 7 '11 at 0:40
@Joel: For an even simpler example, just use $g(x)\equiv1$. Then,$$g\left(\int_0^\frac12x\,dx\right)=1 > \frac12=\int_0^\frac12g(x)\,dx.$$ –  George Lowther Nov 7 '11 at 1:14

For Jensen's inequality to hold, you need $\mu$ to be a probability measure (for other finite measures, you can obtain a rescaled version). To see that it does not hold if you remove this hypothesis, consider for example (almost any example will do)

$$\exp\left(\int_0^2 x \, dx\right) = e^2 > \int_0^2 e^x \, dx = e^2 - 1$$

However, we can rescale the measure to get a modified version of Jensen's inequality. Indeed, since $\int_0^2 f(x) \, dx = \int_0^1 2 f(2u) \, du$, we get

$$\exp\left(\int_0^2 x \, dx\right) = \exp\left(\int_0^1 (4u) \, du\right) \le \int_0^1 e^{4u} \, du = \int_0^2 \frac{e^{2x}}{2} \, dx$$

-