# 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.

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

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

$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:

$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.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 4, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}