Help on Expected Value of a probability density function

128 Views Asked by At

The Problem: Consider the family of distributions with density $f(x) = \frac{1}{2\theta} exp[-\frac{|x|}{\theta}] , x \in (-\infty, \infty)$. Compute $E(|x|)$.

The Attempt: I was going to examine the cases when x is positive and when x is negative. When $x>0$, then $E(X) = \int_{0}^{\infty} x \frac{1}{2\theta} exp[-\frac{x}{\theta}] dx$. I am actually having a hard time integrating this function. Can you guys give some hints on how to solve this problem. Please do not work on the problem completely.

Thank you very much!

2

There are 2 best solutions below

0
On

Since $|X| = X\mathsf 1_{\{X\geqslant0\}} -X\mathsf 1_{\{X<0\}}$, it follows that $$ \mathbb E[|X|] = \int_0^\infty xf(x)\ \mathsf dx + \int_{-\infty}^0 xf(-x)\ \mathsf dx.$$ Since $f$ is an even function $f(x)=f(-x)$ for all $x$, the above simplifies to \begin{align} 2\int_0^\infty xf(x)\ \mathsf dx &=2\int_0^\infty\frac1{2\theta} x e^{-\frac x\theta}\ \mathsf dx\\ &=\int_0^\infty \frac1\theta x e^{-\frac x\theta}\ \mathsf dx\\ &=\theta. \end{align}

0
On

You start with a Laplace (or double exponential distribution) symmetric about $0$. Taking the absolute value turns it into an exponential distribution

Taking the absolute value of a distribution symmetric about $0$ has the effect of doubling the density on the positive values, so your calculation should be

$$E\left[|X|\right]=\int_{0}^{\infty} x \frac{1}{\theta} \exp\left(-\frac{x}{\theta}\right) dx$$

Integration by parts with $u=x$ and $dv=\frac 1\theta \exp\left(-\frac{x}{\theta}\right) dx$ should then lead you to $$\left. -x\exp\left(-\frac{x}{\theta}\right) \right|_0^\infty + \int_{0}^{\infty} \exp\left(-\frac{x}{\theta}\right) dx$$

$$=\left. -x\exp\left(-\frac{x}{\theta}\right) \right|_0^\infty -\left. {\theta} \exp\left(-\frac{x}{\theta}\right) \right|_0^\infty$$

which is (apart from the factor of $2$) is what you have in a comment. This is $[0-0]-[0-\theta]=\theta$ as you might have predicted from an exponential distribution with rate parameter $\frac1\theta$