Square of Expectation of Product is Less Than or Equal to Product of Expectation of Squares

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

Let the expectation of $X Y$, $\expect {X Y}$, exist and be finite.

Then:


 * $\paren {\expect {X Y} }^2 \le \expect {X^2} \expect {Y^2}$

Proof
Note that:


 * $\map \Pr {Y^2 \ge 0} = 1$

so we have by Expectation of Non-Negative Random Variable is Non-Negative:


 * $\expect {Y^2} \ge 0$

First, take $\expect {Y^2} > 0$.

Let $Z$ be a random variable with:


 * $Z = X - Y \dfrac {\expect {X Y} } {\expect {Y^2} }$

Note that we have:


 * $\map \Pr {Z^2 \ge 0} = 1$

so again applying Expectation of Non-Negative Random Variable is Non-Negative, we have:


 * $\expect {Z^2} \ge 0$

That is:

We therefore have:


 * $\dfrac {\paren {\expect {X Y} }^2} {\expect {Y^2} } \le \expect {X^2}$

giving:


 * $\paren {\expect {X Y} }^2 \le \expect {X^2} \expect {Y^2}$

as required.

It remains to address the case $\expect {Y^2} = 0$.

Note that since $\map \Pr {Y^2 \ge 0} = 1$, from Condition for Expectation of Non-Negative Random Variable to be Zero we necessarily have:


 * $\map \Pr {Y^2 = 0} = 1$

That is:


 * $\map \Pr {Y = 0} = 1$

This implies that the random variable $X Y$ has:


 * $\map \Pr {X Y = 0} = 1$

From which, we have that:


 * $\map \Pr {X Y \ge 0} = 1$

So, applying Expectation of Non-Negative Random Variable is Non-Negative again we have:


 * $\expect {X Y} = 0$

With that, we have:


 * $\paren {\expect {X Y} }^2 = 0$

and:


 * $\expect {X^2} \expect {Y^2} = 0 \times \expect {Y^2} = 0$

So the inequality:


 * $\paren {\expect {X Y} }^2 \le \expect {X^2} \expect {Y^2}$

also holds in the case $\expect {Y^2} = 0$, completing the proof.