# What are the mean and standard deviation of the probability density function given by p(x)=k(1-xe^(x) ) for  x in [0,3], in terms of k, with k being a constant such that the cumulative density across the range of x is equal to 1?

Feb 14, 2016

a) Mean: $\mu \approx 2.46$
b) Standard Deviation: $\sigma \approx .425$

#### Explanation:

The recipe is:

$\textcolor{red}{\text{Step 1}}$
Determine the function pdf, p(x) such that:
$P \left(x\right) = {\int}_{{x}_{1}}^{{x}_{2}} p \left(x\right) \mathrm{dx} = 1 \text{ over } \left[{x}_{1} , {x}_{2}\right]$ Normalization
1 = kint_(0)^(3)(1-xe^x)dx = k(x-(1-x)e^x); k=1/(2(1-e^3))
so your pdf is p(x) = 1/(2(1-e^3)) (1-xe^x); [0, 3]

$\textcolor{red}{\text{Step 1}}$
Determine the mean $\mu$ and standard deviation $\sigma$
a) Mean:
$\mu = \frac{1}{2 - 2 {e}^{3}} {\int}_{0}^{3} x \left(1 - x {e}^{x}\right) \mathrm{dx} = \frac{1}{2 - 2 {e}^{3}} \left[\frac{x}{2} - \left({x}^{2} - 2 x + 2\right)\right]$
$\mu = \frac{10 {e}^{3} - 13}{4 {e}^{3} - 4} \approx 2.46$
b) var: ${\sigma}^{2} = \frac{1}{2 - 2 {e}^{3}} {\int}_{0}^{\pi} {\left(x - 2.4607\right)}^{2} \left(1 - x {e}^{x}\right) = .187$
$\sigma = .425$