30
$\begingroup$

I am confused in applying expectation in denominator.

$E(1/X)=\,?$

can it be $1/E(X)\,$?

$\endgroup$
2

5 Answers 5

44
$\begingroup$

can it be 1/E(X)?

No, in general it can't.

The first thing when pondering such things is to try a few simple cases/examples. To begin with, consider the simplest nondegenerate concrete example, a distribution with $\frac12$ probability on two distinct values, say $1$ and $2$.

$E(X) = \frac32$ so $1/E(X) = \frac23$ but $E(\frac{1}{X}) = \frac{\frac11 + \frac12}{2}=\frac{3}{4}$. Clearly the answer is "no" for that case. You might like to make a few additional ones of your own.

If you prefer to simulate, that takes but a moment. In R, we have:

> 1/mean(sample(1:2,1000000,replace=TRUE))
[1] 0.6664441
> mean(sample(1/(1:2),1000000,replace=TRUE))
[1] 0.7496865

Close to the above results. You can repeat this simulation several times to see that it's not some fluke. Additional examples are simple enough. For example, consider a uniform on (0.5,2):

> 1/mean(runif(1000000,0.5,2))
[1] 0.8000138
> mean(1/runif(1000000,0.5,2))
[1] 0.9242307

Again, repetition will convince you that it's not a fluke and that these sample averages from simulation are barely changing. By inspection we can see that in the first calculation the uniform has expected value (2.5)/2, so its reciprocal of expectation is 0.8, and some simple algebra establishes that the reciprocal has expected value $\frac23\log 4 \approx 0.9242$. We got nice agreement from the simulations.

Try a couple of cases of your own, either algebraically or via simulation.

Jensen's inequality tells us that if $X$ is a random variable and $\varphi$ is a convex function, then $\varphi(\text{E}[X]) \leq \text{E}\left[\varphi(X)\right]$. If $X$ is strictly positive, then $1/X$ is convex, so $\text{E}[1/X]\geq 1/\text{E}[X]$, and for a strictly convex function, equality only occurs if $X$ has zero variance ... so in cases we tend to be interested in, the two are generally unequal.

Assuming we're dealing with a positive variable, if it's clear to you that $X$ and $1/X$ will be inversely related ($\text{Cov}(X,1/X)\leq 0$) then this would imply $E(X \cdot 1/X) - E(X) E(1/X) \leq 0$ which implies $E(X) E(1/X) \geq 1$, so $E(1/X) \geq 1/E(X)$.

I am confused in applying expectation in denominator.

Use the law of the unconscious statistician

$$\text{E}[g(X)] = \int_{-\infty}^\infty g(x) f_X(x) dx$$

(in the continuous case)

so when $g(X) = \frac{1}{X}$, $\text{E}[\frac{1}{X}]=\int_{-\infty}^\infty \frac{f(x)}{x} dx$

In some cases the expectation can be evaluated by inspection (e.g. with gamma random variables), or by deriving the distribution of the inverse, or as some other answerers considered, by using the MGF, or indeed by other means.

$\endgroup$
23
$\begingroup$

As Glen_b says that's probably wrong, because the reciprocal is a non-linear function. If you want an approximation to $E(1/X)$ maybe you can use a Taylor expansion around $E(X)$:

$$ E \bigg( \frac{1}{X} \bigg) \approx E\bigg( \frac{1}{E(X)} - \frac{1}{E(X)^2}(X-E(X)) + \frac{1}{E(X)^3}(X - E(X))^2 \bigg) = \\ = \frac{1}{E(X)} + \frac{1}{E(X)^3}Var(X) $$ so you just need mean and variance of X, and if the distribution of $X$ is symmetric this approximation can be very accurate.

EDIT: the maybe above is quite critical, see the comment from BioXX below.

$\endgroup$
8
  • 2
    $\begingroup$ I don't think you can use it for $|X|$ as that function is not differentiable. I would rather divide the problem into the cases and say $E(|X|) = E(X|X > 0)p(X>0) + E(-X|X < 0)p(X<0)$, I guess. $\endgroup$ Commented May 8, 2014 at 20:35
  • 1
    $\begingroup$ @MatteoFasiolo Can you please explain why the symmetry of the distribution of $X$ (or lack thereof) has an effect on the accuracy of the Taylor approximation? Do you have a source that you could point me to that explains why this is? $\endgroup$ Commented Jul 31, 2017 at 11:03
  • 1
    $\begingroup$ @AaronHendrickson my reasoning is simply that the next term in the expansion is proportional to $E\{(X-E(X))^3\}$ which is related to the skewness of the distribution of $X$. Skewness is an asymmetry measure. However, zero skewness does not guarantee symmetry and I am not sure whether symmetry guarantees zero skewness. Hence, this is all heuristic and there might be plenty of counterexamples. $\endgroup$ Commented Aug 1, 2017 at 12:50
  • 1
    $\begingroup$ @MatteoFasiolo I see. So really one could make the case that so long as the higher order central moment are small the approximation is accurate. This is in effect making a statement about symmetry since symmetry requires all odd central moments to be zero. $\endgroup$ Commented Aug 1, 2017 at 13:22
  • 8
    $\begingroup$ I don't understand how this solution gets so many upvotes. For a single random variable $X$ there is no justificiation about the quality of this approximation. The third derivative $f(x)=1/x$ is not bounded. Moreover the remainder of the approx. is $1/6f'''(\xi)(X-\mu)^3$ where $\xi$ is itself a random variable between $X$ and $\mu$. The remainder won't vanish in general and may be very huge. Taylor approx. may only be useful if one has sequence of random variables $X_n -\mu = O_p(a_n)$ where $a_n \to 0$. Even then uniform integrability is needed additionally if interested in the expectation. $\endgroup$
    – BloXX
    Commented Sep 20, 2017 at 10:19
13
$\begingroup$

Others have already explained that the answer to the question is NO, except trivial cases. Below we give an approach to finding $\DeclareMathOperator{\E}{\mathbb{E}} \E \frac1{X}$ when $X>0$ with probability one, and the moment generating function $M_X(t) = \E e^{tX}$ do exist. An application of this method (and a generalization) is given in Expected value of $1/x$ when $x$ follows a Beta distribution, we will here also give a simpler example.

First, note that $\int_0^\infty e^{-t x}\; dt = \frac1{x}$ (simple calculus exercise). Then, write $$ \E \left(\frac1{X}\right) = \int_0^\infty x^{-1} f(x)\; dx = \int_0^\infty \left( \int_0^\infty e^{-tx}\; dt \right) f(x)\; dx =\\ \int_0^\infty \left( \int_0^\infty e^{-tx} f(x) \; dx \right) \; dt = \int_0^\infty M_X(-t) \; dt $$ A simple application: Let $X$ have the exponential distribution with rate 1, that is, with density $e^{-x}, x>0$ and moment generating function $M_X(t)=\frac1{1-t}, t<1$. Then $\int_0^\infty M_X(-t)\; dt = \int_0^\infty \frac1{1+t} \; dt= \ln(1+t) \bigg\rvert_0^\infty = \infty$, so definitely do not converge, and is very different from $\frac1{\E X}=\frac11=1$.

$\endgroup$
8
$\begingroup$

An alternative approach to calculating $E(1/X)​$ knowing X is a positive random variable is through its moment generating function $E\left[e^{-\lambda X}\right]​$. Since by elementary calculus $$ \int_0^\infty e^{-\lambda x} d\lambda =\frac{1}{x} $$ we have, by Fubini's theorem $$ \int_0^\infty E\left[e^{-\lambda X}\right] d\lambda =E\left[\frac{1}{X}\right]. $$

$\endgroup$
4
  • 2
    $\begingroup$ The idea here is right, but the details wrong. Pleasecheck $\endgroup$ Commented Aug 7, 2017 at 19:56
  • 1
    $\begingroup$ @Kjetil I don't see what the problem is: apart from the inconsequential differences of using $t X$ instead of $-t X$ in the definition of the MGF and naming the variable $t$ instead of $\lambda$, the answer you just posted is identical to this one. $\endgroup$
    – whuber
    Commented Aug 8, 2017 at 19:48
  • 1
    $\begingroup$ You are right, the problems was less than I thought. Still this answer would be better withm some more details. I will upvote this tomorrow ( when I have new votes) $\endgroup$ Commented Aug 8, 2017 at 20:19
  • 1
    $\begingroup$ This is not correct. For example, if $X$ has exponential distribution with mean $\frac1\mu$ then its moment-generating function is $$ \mathbb E[e^{-\lambda X}] = \int_0^\infty e^{\lambda x}\mu e^{-\mu x}\ \mathsf dx = \frac\mu{\mu-\lambda}, $$ but the integral only converges for $\lambda<\mu$. So the integral of the moment-generating function over $(0,\infty)$ cannot possible converge - and indeed, $\mathbb E\left[\frac 1X\right]$ does not exist. $\endgroup$
    – Math1000
    Commented Nov 22, 2020 at 2:03
2
$\begingroup$

To first give an intuition, what about using the discrete case in finite sample to illustrate that $\text{E}(1/X)\neq 1/\text{E}(X)$ (putting aside cases such as $\text{E}(X)=0$)?

In finite sample, using the term average for expectation is not that abusive, thus if one has on the one hand

$\text{E}(X) = \frac{1}{N}\sum_{i=1}^N X_i$

and one has on the other hand

$\text{E}(1/X) = \frac{1}{N}\sum_{i=1}^N 1/X_i$

it becomes obvious that, with $N>1$,

$\text{E}(1/X) = \frac{1}{N}\sum_{i=1}^N 1/X_i \neq \frac{N}{\sum_{i=1}^N X_i} = 1/\text{E}(X)$

Which leads to say that, basically, $\text{E}(1/X)\neq 1/\text{E}(X)$ since the inverse of the (discrete) sum is not the (discrete) sum of inverses.

Analogously in the asymptotic $0$-centered continuous case, one has

$\text{E}(1/X)=\int_{-\infty}^\infty \frac{f(x)}{x} dx \neq 1/\int_{-\infty}^\infty xf(x) dx = 1/\text{E}(X)$.

$\endgroup$
1
  • 1
    $\begingroup$ +1 "using the term average for expectation is not that abusive" -- the sample calculation you did carries over pretty directly to sampling from discrete random variables, so this tack is more than just motivation. The restriction $N>1$ (with at least some distinct x's) corresponds to "population variance > 0" restriction to get a strict inequality. It's possible to draw a direct connection from this form of argument to the fact that arithmetic and harmonic means are generally unequal and the conditions where AM>HM (and hence 1/HM>1/AM) correspond to E(1/X)>1/E(X). $\endgroup$
    – Glen_b
    Commented 17 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.