Expected value: Is $E|X| = |E(X)|$?

87 Views Asked by At

Is the expectation of absolute value equal to the absolute value of the expectation? $E|X| = |E(X)|$ seems intuitively true to me, but I couldn't find it online. I wanted to check whether this is true.

3

There are 3 best solutions below

2
On BEST ANSWER

Not true in general. E.g., let $X$ be the random variable whose value is $-1$ or $+1$, both with probability $1/2$. Then $|X|$ is $+1$ with probability $1$, so $|E(X)|= |0| = 0$ and $E(|X|)=1$.

The only thing you can claim is $|E(X)|\leq E(|X|)$, and it is trivial.

0
On

It is not true in general.

Counter example: Let $X$ take value $+1$ with probability $0.5$ and $-1$ with probability $0.5$.

Then $|X|=1$ so that $\mathbb E|X|=1$.

But $|\mathbb EX|=|0|=0$.

0
On

Let $(\Omega,\mathcal F, \mathbb P)$ be a probability space and let $X$ be a random variable. Then \begin{align*} \mathbb E[X] := \int_{\Omega} X\, d\mathbb P \end{align*} This is the Lebsegue integral of $X$ over the measure space $(\Omega,\mathcal F, \mathbb P)$. Now the answer should be obvious. In general \begin{align*} \int_{\Omega} |X|\, d\mathbb P \neq \left|\int_{\Omega} X\, d\mathbb P\right| \end{align*}