Convex function and Jensens inequality I have an exercise, which I don't know how to solve. 
Given that the random variable $X>0$, such that $P(X\leq 0)=0$. Argue that 
$ E(\frac{1}{X})\geq \frac{1}{E(X)}$.
My first question is, how can I know if a function is convex or concave, in this case 
$\frac{1}{x}$. If I figure out if this function is convex or concave I can apply the Jensens inequality to get the result. 
But secondly, what do I need the information $P(X\leq 0)=0$ for? 

A function $f(x)$ is convex iff $f''(x)\geq0$. In this case, $(\frac{1}{x})''=\frac{2}{x^3}\geq0$, so $\frac{1}{x}$ is convex. When you apply $Jensen's inequality$, you should have 
the assumption $X$ and $f(X)$ is integrable, where $f(x)=\frac{1}{x}$ in this question. However when $X\gt0$,$E(X)=\infty$ or $E(\frac{1}{X})=\infty$, the conclusion is abvious to hold. Since $X$ is not greater than 0, $EX$ may not exist. This is how we use $X\gt0$
