Suppose \(X\) and \(Y\) are i.i.d. random variables and \(f\) and \(g\) are nondecreasing, bounded and measurable functions on \(\mathbb {R}\).
(a) Prove that \[ \mathbb {E}[(f(X)-f(Y))(g(X)-g(Y))]\geq 0. \]
(b) Conclude that \(f(X)\) and \(g(X)\) are always positively correlated; i.e., \[ \mathbb {E}[f(X)g(X)]\geq \mathbb {E}[f(X)]\cdot \mathbb {E}[g(X)]. \]