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.

  • 2
    $\begingroup$ 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. $\endgroup$
    – whuber
    Commented Mar 16, 2023 at 13:34

1 Answer 1


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.

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

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.