Index: The Book of Statistical ProofsGeneral TheoremsProbability theoryCovariance ▷ Partition into expected values

Theorem: Let $X$ and $Y$ be random variables. Then, the covariance of $X$ and $Y$ is equal to the mean of the product of $X$ and $Y$ minus the product of the means of $X$ and $Y$:

\[\label{eq:cov-mean} \mathrm{Cov}(X,Y) = \mathrm{E}(X Y) - \mathrm{E}(X) \mathrm{E}(Y) \; .\]

Proof: The covariance of $X$ and $Y$ is defined as

\[\label{eq:cov} \mathrm{Cov}(X,Y) = \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y]) \right] \; .\]

which, due to the linearity of the expected value, can be rewritten as

\[\label{eq:cov-mean-qed} \begin{split} \mathrm{Cov}(X,Y) &= \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y]) \right] \\ &= \mathrm{E}\left[ X Y - X \, \mathrm{E}(Y) - \mathrm{E}(X) \, Y + \mathrm{E}(X) \mathrm{E}(Y) \right] \\ &= \mathrm{E}(X Y) - \mathrm{E}(X) \mathrm{E}(Y) - \mathrm{E}(X) \mathrm{E}(Y) + \mathrm{E}(X) \mathrm{E}(Y) \\ &= \mathrm{E}(X Y) - \mathrm{E}(X) \mathrm{E}(Y) \; . \end{split}\]
Sources:

Metadata: ID: P118 | shortcut: cov-mean | author: JoramSoch | date: 2020-06-02, 20:50.