Covariance as Expectation of Product minus Product of Expectations

From ProofWiki
Jump to navigation Jump to search


Let $X$ and $Y$ be random variables.

Let the expectations of $X$ and $Y$ exist and be finite.

Then the covariance of $X$ and $Y$ is given by:

$\cov {X, Y} = \expect {X Y} - \expect X \expect Y$


\(\ds \cov {X, Y}\) \(=\) \(\ds \expect {\paren {X - \expect X} \paren {Y - \expect Y} }\) Definition of Covariance
\(\ds \) \(=\) \(\ds \expect {X Y - X \expect Y - Y \expect X + \expect X \expect Y}\)
\(\ds \) \(=\) \(\ds \expect {X Y} - \expect Y \expect X - \expect Y \expect X + \expect X \expect Y\) Expectation is Linear, Expectation of Constant
\(\ds \) \(=\) \(\ds \expect {X Y} - \expect X \expect Y\)