# Expectation on 1/X

In general can one say that for a random variable X:

$E[\frac{1}{X}] = \frac{1}{E[X]}$ ?

I've worked out a few examples where this works but I'm not sure how widely this is useful...

• In general, $1/E[X]$ is the inverse of an arithmetic mean, and $E[1/X]$ is the inverse of a harmonic mean. Arithmetic and harmonic means of the same set are highly unlikely to be equal to each other... – Micah Dec 1 '12 at 6:38
• If $X$ is a positive random variable, then this equality holds if and only if $X$ is a constant (that is, $X=c$ almost surely). – Yury Dec 1 '12 at 6:41
• I've worked out a few examples where this works... Really? Which ones? – Did Dec 1 '12 at 11:10
• An example where this does hold is given here. Further discussion can be found here. – StubbornAtom May 10 '20 at 19:34

It is very rarely true. Let's do a random example. Let $X$ be uniform on $[1,3]$. Then $E(X)=2$. But $$E\left(\frac{1}{X}\right)=\int_1^3 \frac{1}{x}\cdot\frac{1}{2}\,dx=\frac{\log 3}{2}\ne \frac{1}{2}.$$

For a simpler example, let $X=1$ with probability $1/2$, and let $X=3$ with probability $1/2$. Then $E(X)=2$.

But $E(1/X)=(1/2)(1)+(1/2)(1/3)=2/3$.

• I am somewhat confused with this answer. Isn't $E(1/X) = \int_{1}^{3} 1/x \cdot f(1/x) d(1/x)$, where $f$ is the density function of the random variable $1/x$, and is this the same as the term given in the answer? – Florian Jan 10 '19 at 17:41
• @Florian that would be incorrect since it is implicit here that the expectation is over the random variable $X$ not it’s inverse. The density would accordingly have be of $X$. – ijuneja Jan 10 at 6:49

Jensen's inequality for functions of RVs is $\mathbf{E} \varphi(x) \geq \varphi(\mathbf{E}X)$ for convex functions and $\mathbf{E} \varphi(x) \leq \varphi(\mathbf{E}X)$ for concave functions. Clearly $Y = \frac{1}{X}$ is a convex function, so the first inequality holds.

• There is a "for concave functions" missing. – Michael Greinecker Jul 2 '13 at 21:39

For such a case, it is a good idea to study Jensen's inequality.

Another counterexample to the one given by André Nicolas is this one. Consider $X$ to be a normal distribution with mean $\mu$ and variance one. Then $E[X]=\mu$ but not only is $E[\frac{1}{X}]$ not in general equal to $1/\mu$; rather, it does not exist.

• How do I see that it doesn't exist? Could you explain that? Thank you! – kelu Jun 19 '13 at 9:40
• I think you'd need to compute the inner product of f(x) and 1/x (as per wiki), which in this case (Wolfram Alpha notation ignoring constants, m=1: Integrate[exp(-(x-1)^2)/x,{x,-inf,inf}] ) just doesn't converge. Why? Well, I guess the area under the curve is just infinite. I remember Infinite Acres from calc, but beyond that you'd have to do some tests to really check. – alexey Mar 11 '16 at 18:53

Y = 1/X is a convex function when x > 0

In general if, X>0 , then the following inequality always will be satisfied:

E(1/X)>= 1/E(X)