# Covariance $X$ and $e^{X}$

How can I prove that covariance of random variable $X$ and $e^{X}$ is non-negative regardless distribution of $X$. I assume it is true.

• is $E$ a positive constant? – the_candyman Aug 25 '17 at 20:39
• Yes, it is actually e. Sorry for confusion – Ethan Aug 25 '17 at 20:41
• By positive, you mean non-negative (0 is allowed), right? – Clement C. Aug 25 '17 at 20:58
• Non-negative is sufficient – Ethan Aug 25 '17 at 21:00
• (Well, I hope so, because it is also necessary -- there are easy examples of distributions for which it's zero) – Clement C. Aug 25 '17 at 21:01

## 2 Answers

\begin{align} \operatorname{Cov}(X,e^X)&=E[Xe^X]-E[X]E[e^X]\\ &=E[Xe^X-\mu e^X]\\ &=E[(X-\mu)e^X] \\&=E[(X-\mu)(e^X-e^{\mu})] \end{align}

The last step comes from $E[(X-\mu) c] = 0$ for any constant $c$.

Because $e^x$ is non-decreasing (this is all we need), $(x-\mu)(e^x-e^{\mu})\geq0$ $\forall x$

Hence $\operatorname{Cov}(X,e^X) \ge 0$

• Is this statement that true cov($X,Y$)$>= 0$ and $f$ is non-decresing function then cov($X,f(Y)$)$>= 0$? And where can I find it? – Ethan Aug 25 '17 at 21:17
• I have added more details in my answer – GladeLiu Aug 25 '17 at 21:24
• I am not sure, because here you assume that$E[e^{X}] = e^{E[X]}$, which is not the same in general. – Ethan Aug 25 '17 at 21:28
• @Arash No, this answer is correct (+1) It never assumed $E[e^{X}] = e^{E[X]}$. I edited it for clarity. – leonbloy Aug 25 '17 at 21:31
• @loenbloy, Definitely right; nice answer; +1. – Arash Aug 25 '17 at 21:35

Suppose that $X$ and $Y$ are two independent and identically distributed random variables. Since $e^x$ is an increasing function, $X-Y$ and $e^{X}-e^Y$ are co-sign. So the following holds: $$\mathbb E[(X-Y)(e^X-e^Y)]\geq 0.$$ Using the assumption that $X$ and $Y$ are identically distributed, we have $\mathbb E(e^X)=\mathbb E(e^Y)$ and $\mathbb E(X)=\mathbb E(Y)$. Hence: $$\mathbb E[(X-Y)(e^X-e^Y)]=2\mathbb E(Xe^X)-2\mathbb E(X)\mathbb E(e^X)\geq 0.$$ The last one is two times the covariance of $X$ and $e^X$.

The statement can be generalized for any increasing function $f$. The reverse holds for any decreasing function.