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

Feb 10, 2017

Mean: $\mu = k \left(1 - \frac{2}{e}\right)$
Std Dev: $\sigma = \sqrt{k \left(2 - \frac{5}{e}\right) - {\left(k \left(1 - \frac{2}{e}\right)\right)}^{2}}$

Explanation:

Let $X$ be some random variable with the probability density function $p$ Integration by parts is needed but I have just quoted the integral result:

The mean is given by;

$E \left(X\right) = {\int}_{D} \setminus x p \left(x\right) \setminus \mathrm{dx}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = {\int}_{0}^{1} x k {e}^{- x} \setminus \mathrm{dx}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = k \setminus {\int}_{0}^{1} x {e}^{- x} \setminus \mathrm{dx}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = k {\left[- \left(x + 1\right) {e}^{- x}\right]}_{0}^{1}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = - k {\left[\left(x + 1\right) {e}^{- x}\right]}_{0}^{1}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = - k \left(2 {e}^{- 1} - {e}^{0}\right)$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = k \left(1 - \frac{2}{e}\right)$

And, the Variance is given by

$V a r \left(X\right) = E \left({X}^{2}\right) - {E}^{2} \left(X\right)$

We can calculate, $E \left({X}^{2}\right)$, again integration by parts is required bu the result is just quoted:

$E \left({X}^{2}\right) = {\int}_{D} \setminus {x}^{2} p \left(x\right) \setminus \mathrm{dx}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = k \setminus {\int}_{0}^{1} {x}^{2} {e}^{- x} \setminus \mathrm{dx}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = k {\left[- \left({x}^{2} + 2 x + 2\right) {e}^{- x}\right]}_{0}^{1}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = - k {\left[\left({x}^{2} + 2 x + 2\right) {e}^{- x}\right]}_{0}^{1}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = - k \left(5 {e}^{- 1} - 2 {e}^{0}\right]$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = k \left(2 - \frac{5}{e}\right)$

And so the standard deviation is given by

${\sigma}^{2} = k \left(2 - \frac{5}{e}\right) - {\left(k \left(1 - \frac{2}{e}\right)\right)}^{2}$

Incidental, As $p \left(x\right)$ represents a probability density function over $\left[0 , 1\right]$ then:

${\int}_{0}^{1} \setminus p \left(x\right) \setminus \mathrm{dx} = 1$
$\therefore {\int}_{0}^{1} \setminus k {e}^{- x} \setminus \mathrm{dx} = 1$
$\therefore {\left[\frac{k {e}^{- x}}{- 1}\right]}_{0}^{1} = 1$
$\therefore - k {\left[\left({e}^{- x}\right)\right]}_{0}^{1} = 1$
$\therefore - k \left(\frac{1}{e} - {e}^{0}\right) = 1$
$\therefore k \left(1 - \frac{1}{e}\right) = 1$
$\therefore k = \frac{1}{1 - \frac{1}{e}}$
$\therefore k = \frac{e}{e - 1}$

And so the probability density function is

$p \left(x\right) = \frac{e}{e - 1} {e}^{- x}$