# Sign of Correlation between $X$ and $f(X)$ for strictly monotonic $f$

This question is a follow up to this question.

Suppose $$f$$ is strictly increasing. Can we say

$$\text{Cov}(X,f(X))\geq 0?$$

Ben's answer on the aforementioned linked post can be extended to show the result holds for $$f(x)$$ concave and $$g(x):=xf(x)$$ convex. This post seems to suggest the desired inequality for the general case using a pictorial interpretation of covariance as expected signed area, but a formal proof would be delightful.

• Using my characterization of covariance at stats.stackexchange.com/a/18200/919, the result is immediate: there's nothing left to show, because when $f$ is increasing, all relevant signed rectangle areas are either zero or positive, QED. It is a simple matter of mathematical technique to translate that into a formal proof.
– whuber
Commented Mar 16, 2023 at 13:34

Let $$f$$ be strictly increasing. Then

$$\operatorname{Cov}(X, f(X)) =\mathbb E[Xf(X) ]-\mathbb E[X]\mathbb E[f(X) ]=\mathbb E[(X-\mathbb E[X])(f(X) -f(\mathbb E[X]))].\tag 1\label 1$$

Now $$X\gtreqless\mathbb E[X]\implies f(X) \gtreqless f(\mathbb E[X])\tag 2.\label 2$$

Use both $$\eqref 1,\eqref 2,$$ to check your claimed result.

• I agree with 2 but I don't agree with 1. Why is $f(E[X])$ written in place of $E[f(X)]$? Commented Mar 16, 2023 at 12:19
• $\mathbb E[(X-\mathbb E[X])(f(X) -f(\mathbb E[X]))]= \mathbb E[(X-\mathbb E[X])(f(X) -\mathbb E[f(X) ]-(f(\mathbb E[X])-\mathbb E[f(X) ]))]=\mathbb E[(X-\mathbb E[X])(f(X) -\mathbb E[f(X) ])]-(f(\mathbb E[X])-\mathbb E[f(X) ])\mathbb E[X-\mathbb E[X]]$ @Golden_Ratio Commented Mar 16, 2023 at 13:27
• @User1865345 Ah that makes sense, many thanks!! Commented Mar 16, 2023 at 13:40