1

What I have got is the following:

Given: $E[(X-Y)^2]=0 \Rightarrow X=Y \ where \ X,Y\in\mathbb{R}$

$$ E[(X-Y)^2]=0 \Rightarrow Var(X-Y)+E^2[X-Y]=0 $$ Since both terms are non-negative: $$ E^2[X-Y]\geq0 \ , \ Var(X-Y)\geq0 \\ Var(X-Y) =0, E[X]=E[Y] $$

And a random variable with zero variance is a constant. $$ X-Y = c, E[c]=0 \Rightarrow c=0 \Rightarrow X=Y $$

Is there anything wrong with the statement?

Edit: where $c$ is a constant.

Avraham
  • 3,237
  • 7
    $\mathsf{E}[(X-Y)^2]=0$ implies that $X-Y=0$ a.s. directly. –  Dec 27 '21 at 11:14
  • care to elaborate? – shaiel cohen Dec 27 '21 at 11:41
  • A nonnegative r.v. with zero mean can't be positive with positive probability, so must be almost surely $0$. Your last statement looks wrong though. – nejimban Dec 27 '21 at 11:42
  • so the statement is correct, I just made it too complicated, thx. – shaiel cohen Dec 27 '21 at 11:47
  • 1
    https://math.stackexchange.com/questions/897876/a-nonnegative-random-variable-has-zero-expectation-if-and-only-if-it-is-zero-alm –  Dec 27 '21 at 12:09
  • @nejimban my last statement is since I showed $X-Y$ is a constant (0 variance) and I have shown that $E[X-Y]=0$, therefore, $X-Y=0$ because the expectation of a constant is the constant. – shaiel cohen Dec 27 '21 at 12:44

1 Answers1

1

By the property of non-degeneracy, we have $$\operatorname{E}\left[(X-Y)^2\right]=0\implies (X-Y)^2\overset{a\ s}=0$$ Now we can proceed as follows $$\begin{aligned}(X-Y)^2&\overset{a\ s}=0\\ X-Y&\overset{a\ s}=0\\ X&\overset{a\ s}=Y\end{aligned}$$ Note that $X\overset{a\ s}=Y$ means that $X$ and $Y$ are equal almost surely, if and only if, the probability that $X$ and $Y$ are different is zero.

k170
  • 9,045
  • when you write "By the property of non-degeneracy" you mean since, nonnegative r.v. with zero mean can't be positive with positive probability, so must be almost surely 0?

    if so I think it is more informative to add that.

    – shaiel cohen Dec 31 '21 at 13:34