# Continuous Random Variable and Density Function

• Nov 1st 2007, 09:37 PM
clipperdude21
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?

http://www.mathhelpforum.com/math-he...c/progress.gif Thanks!!!
• Nov 1st 2007, 10:07 PM
kalagota
Quote:

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?

http://www.mathhelpforum.com/math-he...c/progress.gif Thanks!!!

$f(x) = \frac{1}{2}e^{-|x|}$
so,
$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..
• Nov 1st 2007, 11:09 PM
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...
• Nov 2nd 2007, 12:04 AM
kalagota
Quote:

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?
• Nov 2nd 2007, 06:28 AM
kalagota
Quote:

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

$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,
$|x| = \left\{ {\begin{array}{cc}
x&x \geq 0\\
-x&x < 0\\
\end{array}}\right.
$

or i just had a wrong interpretation?
• Nov 2nd 2007, 06:50 AM
CaptainBlack
Quote:

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

or i just had a wrong interpretation?