= Solution
For <random variables> with finite second <moments>, their <covariance> is
$$
\boxed{\operatorname{cov}(X,Y)=\mathbb E\big[(X-\mathbb EX)(Y-\mathbb EY)\big]=\mathbb E[XY]-\mathbb EX\,\mathbb EY.}
$$
The <Cauchy-Schwarz inequality> ensures the product is integrable under this hypothesis. More generally the definition works whenever the displayed <expectations> exist. Assertions about arbitrary <random variables> below are understood on this domain: without suitable moments a <covariance> need not be defined at all.
Back to article page