1
$\begingroup$

Title says it all: if $X$ is a $\pm 1$-valued random variable with mean $\mu$, 'why' is $\mathbf{E}[|X - \mu|] = \mathbf{E}[|X-\mu|^2]$? Obviously one can do a couple of lines of trivial algebra to verify it, but is there a simple-to-state reason? Something you can say to make me say, "Oh yeah, of course" without any calculation?

Thanks!

1 Answers 1

3

If $x=\pm1$ and $|\mu|\leqslant1$, $\mathrm{sgn}(x-\mu)=x$ hence $$|x-\mu|=x\cdot(x-\mu)=(x-\mu)^2+\mu\cdot(x-\mu). $$ Thus, $|X-\mu|=(X-\mu)^2+\mu\cdot(X-\mu)$ almost surely. Since $\mathrm E(X-\mu)=0$, this yields $\mathrm E(|X-\mu|)=\mathrm E((X-\mu)^2)$.

  • 0
    I like this answer. Here is another one I thought of (sorry to give answers to my own questions):2012-09-06
  • 1
    It's ultimately similar to your answer. Let $X'$ be a copy of $X$. Then $\mathbf{E}[|X-\mu|] = \mathbf{E}[|X - \mathbf{E}[X']|]$. Fix an outcome $x$ of $X$. Inside the outer expectation we have $|x - \mathbf{E}[X']| = |\mathbf{E}[x - X']|$. Recalling that $x, X' \in \{-1,1\}$ it's clear that $\mathbf{E}[x - X']$ is, up to sign, equal to $2\Pr[X' \neq x]$. Hence we deduce the overall quantity is $2\Pr[X \neq X']$. But of course $\mathbf{Var}[X] = (1/2)\mathbf{E}[(X-X')^2]$, and using the fact that $X, X'$ have range $\{-1,1\}$, this is also clearly equal to $2\Pr[X \neq X']$.2012-09-06
  • 1
    In other words, $(X-X')^2=4\mathbf 1_{X\ne X'}$ and $X-\mu=E(X-X'\mid X)=\pm2P(X\ne X'\mid X)$ hence $2E(|X-\mu|)=4P(X\ne X')=E((X-X')^2)=2\sigma^2(X)$. Nice...2012-09-06
  • 0
    Good, I think this is perhaps the most satisfactory phrasing.2012-09-06