[Math] Proof of analogue of the Cauchy-Schwarz inequality for random variables

inequalityprobabilityrandom variables

The Cauchy-Schwarz inequality tells us that for two vectors $u$ and $v$ in an inner product space,
$$\lvert (u,v)\rvert \leq \lVert u\rVert \lVert v \rVert$$
with the equality holding iff one vector is a constant multiplier of the other.

Prove the analogue of the Cauchy-Schwarz inequality for random variables:

$$\lvert E[XY]\rvert \leq \sqrt{E[X^2]} \sqrt{E[Y^2]}$$

(Hint: Use the fact that $E[ (\alpha X + Y)^2 ] \geq 0$ for all real (constants) $\alpha$)

Best Answer

Look at the following two expectations:

$$E[(aX+bY)^2]=a^2E[X^2] + b^2E[Y^2] + 2abE[XY] \ge 0$$ $$E[(aX-bY)^2]=a^2E[X^2] + b^2E[Y^2] - 2abE[XY] \ge 0$$

Now let $a^2=E[Y^2]$ and $b^2=E[X^2]$. This gives

$$ 2abE[XY] \ge -2a^2b^2$$ $$ 2abE[XY] \le 2a^2b^2$$

Dividing by $2ab$ results in

$$ -\sqrt{E[X^2]} \sqrt{E[Y^2]} \le E[XY] \le \sqrt{E[X^2]} \sqrt{E[Y^2]}$$ which is equivalent to

$$ |E[XY]| \le \sqrt{E[X^2]} \sqrt{E[Y^2]}$$

Related Question