0

Given that $f,g$ are monotonically increasing functions and $X$ is a random variable, how do I show that $$\mathrm{Cov}(f(X),g(X)) \geq 0? $$

I've seen: covariance of increasing functions
and tried to use the hint that given $X,Y$ iid, then $$\mathbb{E}((f(X) - f(Y))(g(X)-g(Y))) \geq 0. $$
I expand the left hand side to be $$\mathbb{E}(f(X)g(X)) - \mathbb{E}(f(X)g(Y)) - \mathbb{E}(g(X)f(Y)) + \mathbb{E}(f(Y)g(Y)) $$ But to no avail.

Can someone show me how it's done?

OneGapLater
  • 820
  • 1
  • 9
  • 22

1 Answers1

-1

$f(X)$ and $g(Y)$ are independent. Hence, from the hint we have $Ef(X)g(X)-Ef(X)Eg(Y)-Eg(X)Ef(Y)+Ef(Y)g(Y) \geq 0$. Since $X$ and $Y$ have the same distribution this means $2Ef(X)g(X)-2Ef(X)Eg(X) \geq 0$. This is what we want to prove.

  • "This means ..." but that is using that X and Y were independent. X and X aren't independent? – OneGapLater Aug 24 '19 at 06:08
  • I am using independence only for the second and third terms. Of course, $X$ and $X$ are not independent. Note that I am keeping the first and last terns as they are. – Kavi Rama Murthy Aug 24 '19 at 06:11
  • For the second and third terms, you used independence to get $-Ef(X)Eg(Y) - Eg(X)Ef(Y)$ then you let $Y = X$ didn't you? So the independence step isn't valid since $Ef(X)g(X)$ wouldn't simplify to $Ef(X)Eg(X)$ – OneGapLater Aug 24 '19 at 06:18
  • Once you write $Ef(X)g(Y)$ as $Ef(X)Eg(Y)$ you can write it as $Ef(X)Eg(X)$ also. Here you are not using independence. You are using the fact that $Eg(Y)=Eg(X)$ which is true because $X$ and $Y$ have the same distribution (which implies $g(X)$ and $g(Y)$ have the same distribution, hence the same mean). – Kavi Rama Murthy Aug 24 '19 at 06:29
  • Sorry I'm not sure if I'm comprehending very well. I still think we did use independence because the result that $Ef(X)g(Y) = Ef(X)Eg(Y)$ is valid iff $X$ and $Y$ are independent.

    Aren't we letting $Y = X$ so $Y$ and $X$ are not independent.

    – OneGapLater Aug 24 '19 at 06:31
  • I understand that you get $Ef(X)Eg(X)$ because once we simplify the second term from $Ef(X)g(Y)$ to $Ef(X)Eg(Y) (\star)$, then as $X$ and $Y$ are identical distributed, $Eg(Y) = Eg(X)$. So I see how $Ef(X)Eg(Y)$ becomes $Ef(X)Eg(X)$ if $X$ and $Y$ are identically distributed. However, I do not see how this is valid as $(\star)$ did assume independence. – OneGapLater Aug 24 '19 at 07:16
  • $Y$ here is an independent copy of $X$. For such $X$ and $Y$, $$ \mathbb{E}((f(X) - f(Y))(g(X)-g(Y))) \geq 0. $$ Then expanding the RHS and using the fact that $X$ and $Y$ have the same distribution imply the result. –  Aug 24 '19 at 07:25
  • @d.k.o. we can just do that? So $Cov(f(X), g(X))$ is equal to $Cov(f(X), g(Y))$ if $Y$ is a copy of $X$? What's different to saying $Y$ is same distirbution as $X$?
    I thought that we can't do this because $X$ and $Y$ will take different values if $Y$ is just a copy, but we're looking at $f(X)$ and $g(X)$, so whatever value $X$ takes, "$X$ also takes that value".
    – OneGapLater Aug 24 '19 at 07:30
  • No, they aren't equal. However, for i.i.d. $X$ and $Y$ you know that the second inequality in your post holds. –  Aug 24 '19 at 07:34
  • I feel stupid but it keeps going back to me thinking that you can't set $Y$ to be $X$ because then $X$ and $X$ are not indpendent. – OneGapLater Aug 24 '19 at 07:56
  • 1
    @OneGapLater When we say $EU=EV$ we are not assuming that $U$ and $V$ are equal. Even independent random variables can have the same expectation. Just because I wrote $Ef(X)=Ef(Y)$ you cannot say I was taking $Y=X$. $Ef(X)=Ef(Y)$ is true whenever $f(X)$ and $f(Y)$ have the same distribution (and this is true whenever $X$ and $Y$ have the same distribution). – Kavi Rama Murthy Aug 24 '19 at 11:38