# Jensen inequality, unexplained distribution, very confusing problem

1. Jan 29, 2012

### giglamesh

Hi everyone
I don't know if I can find someone here to help me understand this issue, but I'll try

the jensen inequality can be found here http://en.wikipedia.org/wiki/Jensen%27s_inequality

I have the following discrete random variable $X$ with the following pmf:

x 0 1 2 3
pr(x) 0.110521 0.359341 0.389447 0.140691

and the summation is (1).

defining the function $Y=\frac{1}{X}$

Then finding the $\bar{X}=\sum_{i=0}^{3}{iPr(i)=1.560308}$

Now calculating $E[Y]=E[\frac{1}{X}]=\sum_{i=1}^{3}{\frac{1}{i}Pr(i)}=0.6009615$
then:
$Y(\bar{X})=\frac{1}{\bar{X}}=\frac{1}{1.560308}=0.640899105$

According to Jensen inequality what should happen:

$E[\frac{1}{X}] \geq \frac{1}{E[X]}$
but what I got is the opposite case!!!!!!!!

Now also I have to mention the function $Y=\frac{1}{X}$ is convex given that the second derivative is strictly larger than zero.

Do I misunderstand the Jensen inequality? or is there something wrong with the convixity assumption?
Any idea?

2. Jan 30, 2012

### winterfors

Without having looked at the details of your calculations, you certaintly have a problem with Y = 1/X for X=0

3. Jan 30, 2012

### giglamesh

Yes you are right to assume it but in the calculation I assumed X>0 when calculating Y.
Even with this assumption I can't approve the opposite inequality.
This can be thought like: choosing one message from X messages problem.

4. Jan 30, 2012

### winterfors

Well, you cannot simply "remove" X=0 by setting 1/0=0. Then your function is not convex any more, and this is the source of your problem.

5. Jan 30, 2012

### giglamesh

thanks winterfors
But why it's not convex
is there a way to prove that it's concave?
Maybe you mean it's non differentiable at X=0

6. Jan 30, 2012

### winterfors

I suggest you look up the definition of a convex/concave function. A function does not have to be differentiable to be convex, for instance is f(x)=abs(x) convex even though is it not differentiable at x=0. Also, that a function is not convex does not imply it is concave, or vice versa.

7. Jan 30, 2012

### giglamesh

I know dear
that's why I asked about why setting Y=0 when X=0 caused the problem
You said the function is not convex any more, here I didn't get it, does it mean now it's concave?
the second derivative is positive since X>0
Anyway thanks for reply I'll do more research on that