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?
Aren't we letting $Y = X$ so $Y$ and $X$ are not independent.
– OneGapLater Aug 24 '19 at 06:31I 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