Can we show that $E\|X-Y\|^2 \leq E\|X-Z\|^2 + E\|Z-Y\|^2$ Let $X,Y,Z$ be some random elements on some Hilbert space $(H,\langle\cdot,\cdot\rangle)$. Can we show that $$E\|X-Y\|^2 \leq E\|X-Z\|^2 + E\|Z-Y\|^2$$
I can clearly see that $$E\|X-Y\|^2 \leq 2E\|X-Z\|^2 + 2E\|Z-Y\|^2$$ due to the parallelogram law.
My attempt: $$E\|X-Y\|^2 = E\|X-Z\|^2 + E\|Z-Y\|^2 + 2\langle X-Z,Z-Y\rangle$$
So I need to show that the last term is negative.
 A: In general, the inequality
$$\mathbb{E}\|X-Y\|^2 \leq \mathbb{E}\|X-Z\|^2 + \mathbb{E}\|Z-Y\|^2$$
does not hold. Simply consider arbitrary $X$, $Z := \frac{1}{2} X$ and $Y = \frac{1}{4}X$. Then
$$\mathbb{E}\|X-Y\|^2 = \frac{9}{16} \mathbb{E}\|X\|^2$$
whereas
$$\mathbb{E}\|X-Z\|^2 + \mathbb{E}\|Z-Y\|^2 = \left( \frac{1}{4} + \frac{1}{16} \right) \mathbb{E}\|X\|^2.$$

On the other hand, it is not difficult to see that
$$\sqrt{\mathbb{E}\|X-Y\|^2} \leq \sqrt{\mathbb{E}\|X-Z\|^2} + \sqrt{\mathbb{E}\|Z-Y\|^2}. $$
This follows from the fact that
$$p(X) := \sqrt{\mathbb{E}\|X\|^2}$$
defines a norm on $H$ (it is a composition of two norms) and, in particular, $p$ satisfies the triangle inequality.
A: First notice the inner product with random variables is $\langle X, Y\rangle=E(XY)$ and recall that $\|X-Y\|^{2}=\langle X-Y,X-Y\rangle=E((X-Y)(X-Y))=E(X^{2})-2E(XY)+E(Y^{2})$
Thus when you write $$E\|X-Y\|^{2}=E\left(E(X^{2})-2E(XY)+E(Y^{2})\right)=E(X^{2})-2E(XY)+E(Y^{2})=\|X-Y\|^{2}$$
So you can simply this and ask if (also i think you meant to write it in the way that implies the triangle inequaitly) 
$$\|X-Y\| \leq \|X-Z\| + \|Z-Y\|$$
Well this is can be proved by proving the triangle inequality, where proofs for this with inner products spaces are general proofs, since the inner product in these proofs just rely on some simple properties that $\langle X, Y\rangle=E(XY)$ follows. That is the beauty of generalized defintitions and proofs
