For every random vector \((X,Y)\) in \(\mathbf {R}^2\) we can define a function \(\mathcal {Q}\) of two variables as follows: \[ \mathcal {Q}(a,b):=\Prob \{X>a,\ Y>b\}-\Prob \{X>a\}\Prob \{Y>b\}. \]
(a) Suppose \(f,g:\mathbf {R}\to \mathbf {R}\) are bounded and have integrable, bounded, and continuous derivatives. Then prove that \[ \E [f(X)g(Y)]-\E [f(X)]\E [g(Y)] = \iint _{\mathbf {R}^2}\mathcal {Q}(a,b)f'(a)g'(b)\,da\,db. \]
(b) Suppose \(\mathcal {Q}(a,b)\geq 0\) for all \(a,b\in \mathbf {R}\). Prove that if \(X\) and \(Y\) have two finite moments, then \(\operatorname {Cov}(X,Y)\geq 0\) and there exists a finite constant \(\alpha \), depending only on \(f\) and \(g\), such that \[ |\E [f(X)g(Y)]-\E [f(X)]\E [g(Y)]|\leq \alpha \operatorname {Cov}(X,Y). \]
[In other words, if \(\mathcal {Q}\geq 0\) and \(X\) and \(Y\) have a small covariance, then \(X\) and \(Y\) are almost independent.]