# Thread: Continuous Random Variable and Density Function

1. ## Continuous Random Variable and Density Function

Let X be a continuous random variable with density function f(x)=.5e^-abs(x) for x in all real numbers. Find EX and var(y)

I got 0 for both values and im not sure if i did this right.... Can anyone help?

Thanks!!!

2. Originally Posted by clipperdude21
Let X be a continuous random variable with density function f(x)=.5e^-abs(x) for x in all real numbers. Find EX and var(y)

I got 0 for both values and im not sure if i did this right.... Can anyone help?

Thanks!!!
$\displaystyle f(x) = \frac{1}{2}e^{-|x|}$
so,
$\displaystyle E[X] = \int_R xf(x)dx = \int_{-\infty}^0 \frac{1}{2}xe^{x}dx + \int_{0}^{\infty} \frac{1}{2}xe^{-x}dx$

if this is what you did, probably you are right..

3. thats what i set it up as but somehow im second guessing my calculus i integrated it and got .5E^x(x-1) and -.5e^-x(x+1) for the other and i didnt know if i did that right...

4. Originally Posted by clipperdude21
thats what i set it up as but somehow im second guessing my calculus i integrated it and got .5E^x(x-1) and -.5e^-x(x+1) for the other and i didnt know if i did that right...
can you show your complete solution?

5. Originally Posted by CaptainBlack
If that is what you did it does integrate to 0, but is wrong, you should have had:

$\displaystyle E[X] = \int_R xf(x)dx = \int_{-\infty}^0 \frac{1}{2}xe^{-x}dx + \int_{0}^{\infty} \frac{1}{2}xe^{-x}dx$

which does not integrate up to 0.

RonL
notice that there is an absolute value sign there and by definition,
$\displaystyle |x| = \left\{ {\begin{array}{cc} x&x \geq 0\\ -x&x < 0\\ \end{array}}\right.$

or i just had a wrong interpretation?

6. Originally Posted by kalagota
notice that there is an absolute value sign there and by definition,
$\displaystyle |x| = \left\{ {\begin{array}{cc} x&x \geq 0\\ -x&x < 0\\ \end{array}}\right.$

or i just had a wrong interpretation?