Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

first: are these equality true ? $$|E[Y]-E[X]|=|E[Y]|-|E[X]|.$$ $$|E[Y]-E[X]|^2=|E[Y]|^2-|E[X]|^2$$

second: what is result of this relation:


where the $\mu =\sum_{i=1}^{3}(p_i.X_i)$

share|cite|improve this question
For the first question, it have nothing to do with expectations (just deal with real numbers). – Davide Giraudo Jun 15 '12 at 21:19
up vote 0 down vote accepted

"What is the result?" is a bit vague. In some contexts it would be a request for a simplification; Henry's answer seems to treat it as a request for the name of a concept (the variance). Maybe it could also be a request for an alternative expression that might be computationally more tractable. If that last, there's this bit of algebra: $$ \begin{align} & {}\quad p_1(X_1-\mu)^2 + p_2(X_2-\mu) ^2+ p_3(X_3-\mu)^2 \\[10pt] & = p_1(X_1^2-2X_1\mu + \mu^2) + p_2(X_2^2-2X_2\mu + \mu^2) + p_3(X_3^2-2X_3\mu + \mu^2) \\[10pt] & = p_1 X_1^2 + p_2 X_2^2 + p_3 X_3^2 -2\mu(p_1 X_1+p_2 X_2+p_3 X_3) + (p_1+p_2+p_3)\mu^2 \\[10pt] & = \left(p_1 X_1^2 + p_2 X_2^2 + p_3 X_3^2\right) -\left(2\mu\cdot \mu\right) + \left(1\cdot\mu^2\right) \\[10pt] & = \left(p_1 X_1^2 + p_2 X_2^2 + p_3 X_3^2\right) - \mu^2. \end{align} $$

Thus, the expected value of the square, minus the square of the expected value equals the variance.

share|cite|improve this answer

On the first, no: If $Y=1$ and $X=-1$ then the left hand side is positive while the right hand side is zero.

On the second, it looks slightly as if you might be thinking of a random variable $X$ where $\Pr(X=x_i)=p_i$, where $\sum p_i = 1$, $\sum p_i x_i= \mu$ the mean of $X$, and $\sum p_i (x_i-\mu)^2= \sigma^2$ the variance of $X$. But perhaps you intend something else.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.