Expectation of Absolute Deviation From Mean Consider a random variable $X$ and $E[|X|] < 1$. Hence, its expectation $E[X]$ exists. 
Let us denote $\mu_X := E[X]$ for notational simplicity. The absolute deviation from the mean is $|X-\mu_X|$,
and its expectation is denoted as $d_X := E [|X-\mu_X|]$
a) Show that $d_X ≤ \sigma_X$, where $\sigma_X$ denotes the standard deviation. 
b) Let $X$ be a Gaussian random variable. Derive $d_X$ in terms of $\sigma_X$. 
c) Let the PDF of $X$, $f_X(t)$, is proportional to $e^{-\lambda|t|}, \lambda>0$ . Derive $d_X$ in terms of $\sigma_X$.
I found this question very confusing. From what I learned at class $E[X-\mu_X]=0$. How come in this question it is not equal to $0$ ?
 A: $E[X-\mu_X]$ is $0$ but $d_X=E|X-\mu_X|$ is not $0$ unless $X$ is a constant. 
Part a) is an immediate apllication of Holder's / C-S inequality: $E|X-\mu_X| \leq \sqrt {E(X-\mu_X)^{2}}=\sqrt {var (X)} =\sigma_X$.
For b) let $Y=\frac {X-\mu_X} {\sigma_X}$ Then $Y \sim N(0,1)$ so $d_X=E|X-\mu_X|=\sigma_X E|Y|$. You can calculate $E|Y|$ from the formula $E|Y| =\int_{\mathbb R} |x|\frac 1 {\sqrt {2 \pi}} e^{-x^{2}/2} dx$. [$E|Y|=\frac 2 {\sqrt {2\pi}}$]. 
c) $f_X(t)=\frac  {\lambda} 2 e^{-\lambda |t|}$. [The constant is derived using the fact that $f_X$ integrates to $1$]. Note that $\mu_X=0$ in this case. Hence $d_X=\frac  {\lambda} 2 \int |t|e^{-\lambda |t|}dt=\frac 1 {\lambda}$.  I will let you evaluate this integral.  
The variance $\sigma_X$ in this case $\frac 2 {\lambda^{2}}$. 
[This is standard. You can prove it using integration by parts]. Hence $\sigma_X=2d_X^{2}$ or $d_X=\sqrt {\sigma_X/ 2}$
A: a) $\left|\dfrac{x-\mu_X}{\sigma_X}\right|=\sqrt{\left(\dfrac{x-\mu_X}{\sigma_X}\right)^2}$ and by convexity of the square root, the sum is smaller.
b) $\dfrac1{\sqrt{2\pi}\sigma_X}\displaystyle\int_{-\infty}^\infty|x-\mu_X|e^{-(x-\mu_X)^2/2\sigma_X^2}dx=\dfrac{\sigma_X}{\sqrt{2\pi}}\displaystyle\int_{-\infty}^\infty|x|e^{-x^2/2}dx=\dfrac{2\sigma_X}{\sqrt{2\pi}}$
c) $\dfrac{\displaystyle\int_{-\infty}^\infty|x|^2e^{-\lambda|x|}dx}{\displaystyle\int_{-\infty}^\infty e^{-\lambda|x|}dx}=\dfrac2{\lambda^2}$.
