# Thread: going from distribution to density function

1. ## going from distribution to density function

Suppose that a random variable
X has distribution function

F
(x):

1-(1+x)exp(-x) - (x > 0)

0 - (
x <0)

(a) Find the density function of
X.

(b) Find the mean and variance of X.

Could anyone please go through this in steps please. I know the theory but havn't seen a practical example. Thanks alot!

2. Here is the first part

1)
To find the dessity function, differenciate the distribution function.

$\displaystyle f(x) = \frac{dF}{dx} = 0 - \left( 1*e^{-x} + (-1)e^{-x}(1+x) \right)$

$\displaystyle f(x) = \frac{dF}{dx} = 0 - \left( e^{-x} + (-1-x)e^{-x} \right)$

$\displaystyle f(x) = \frac{dF}{dx} = -e^{-x} + (1+x)e^{-x} \right)$

provided that x>0

f(x) = 0 otherwise.

b)

To find the mean of x, do the integral:

$\displaystyle E(X) = \int_0^\infty x * f(x)$

can you post as much as you can do?

3. I've got up to that point before. I managed to get same answer as you for part a)
but my answer for part b) always seems over complicated. I get a lot of complicated integrating and with the answer i get, it's always equal to 0.
I'm not sure what i'm doing wrong.