Derive Cauchy-Bunyakovsky by taking expected value In my notes, it is said that taking expectation on both sides of this inequality $$|\frac{XY}{\sqrt{\mathbb{E}X^2\mathbb{E}Y^2}}|\le\frac{1}{2}\left(\frac{X^2}{\mathbb{E}X^2}+\frac{Y^2}{\mathbb{E}Y^2}\right)$$ can lead to the Cauchy-Bunyakovxky (Schwarz) inequality $$\mathbb{E}|XY|\le\sqrt{\mathbb{E}X^2\mathbb{E}Y^2}$$ I am not really good at taking expected values, may anyone guide me how to go about it?
Note: I am familiar with the linearity and monotonicity of expected values, what I am unsure about is the derivation that leads to the inequality, especially when dealing with double expectation.
Thanks.
 A: You can simplify your inequality as follows, for the left side:
$|\frac {XY}{\sqrt{EX^{2}EY^{2}}}|=\frac {|XY|}{\sqrt{EX^{2}EY^{2}}}$
for the right side, take the expectation:
$\frac{1}{2}E\left( \frac{X^2}{EX^2}+\frac{Y^2}{EY^2}\right)= \frac{1}{2} E \left( \frac{X^2 EY^2+X^2 EY^2}{EY^2 EX^2} \right)$
Now, $E(X^2 EY^2+X^2 EY^2)=2*EX^2EY^2 $ using the fact that $E(EY^2)=E(Y^2)$ 
Plug in and you get the result.
A: Hint. All you need to know here is that expected value is linear, i.e. for arbitrary random variables $X,Y$ and all $a,b\in \mathbb{R}$ $$\mathbb{E}(aX+bY)=a\mathbb{E}X +b\mathbb{E}Y.$$
Is this a fact you are familiar with?

Monotonicity is also important. Once you have $X\le Y$, then you also know that $\mathbb{E}X\le\mathbb{E}Y.$ This is exactly the case you are dealing with. For now, you have that one random variable (namely $\frac{\vert XY\vert}{\sqrt{\mathbb{E}X^2\mathbb{E}Y^2}}$) is not greater than the other. If you take the expected value of both sides then the inequality will remain true. It will be essentially the Cauchy-Schwarz you are looking for.
