# 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$
$\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:

 $\ds 0$ $\le$ $\ds \expect {Z^2}$ $\ds$ $=$ $\ds \expect {\paren {X - Y \frac {\expect {X Y} } {\expect {Y^2} } }^2}$ $\ds$ $=$ $\ds \expect {X^2 - 2 X Y \frac {\expect {X Y} } {\expect {Y^2} } + Y^2 \frac {\paren {\expect {X Y} }^2} {\paren {\expect {Y^2} }^2} }$ Square of Sum $\ds$ $=$ $\ds \expect {X^2} - 2 \expect {X Y} \frac {\expect {X Y} } {\expect {Y^2} } + \expect {Y^2} \frac {\paren {\expect {X Y} }^2} {\paren {\expect {Y^2} }^2}$ Expectation is Linear $\ds$ $=$ $\ds \expect {X^2} - \frac {\paren {\expect {X Y} }^2 } {\expect {Y^2} }$

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} = \expect {X^2} \times 0 = 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.

$\blacksquare$