# Suppose that X is a continuous random variable whose probability density function is given by: f(x)= k(2x - x^2) for 0 < x < 2; 0 for all other x. What is the value of k, P(X>1), E(X) and Var(X)?

Nov 13, 2016

$k = \frac{3}{4}$
$P \left(x > 1\right) = \frac{1}{2}$
$E \left(X\right) = 1$
$V \left(X\right) = \frac{1}{5}$

#### Explanation:

To find $k$ , we use ${\int}_{0}^{2} f \left(x\right) \mathrm{dx} = {\int}_{0}^{2} k \left(2 x - {x}^{2}\right) \mathrm{dx} = 1$

$\therefore k {\left[2 {x}^{2} / 2 - {x}^{3} / 3\right]}_{0}^{2} = 1$

$k \left(4 - \frac{8}{3}\right) = 1$ $\implies$$\frac{4}{3} k = 1$$\implies$$k = \frac{3}{4}$

To calculate $P \left(x > 1\right)$ , we use $P \left(X > 1\right) = 1 - P \left(0 < x < 1\right)$

$= 1 - {\int}_{0}^{1} \left(\frac{3}{4}\right) \left(2 x - {x}^{2}\right) = 1 - \frac{3}{4} {\left[2 {x}^{2} / 2 - {x}^{3} / 3\right]}_{0}^{1}$

$= 1 - \frac{3}{4} \left(1 - \frac{1}{3}\right) = 1 - \frac{1}{2} = \frac{1}{2}$

To calculate $E \left(X\right)$

$E \left(X\right) = {\int}_{0}^{2} x f \left(x\right) \mathrm{dx} = {\int}_{0}^{2} \left(\frac{3}{4}\right) \left(2 {x}^{2} - {x}^{3}\right) \mathrm{dx}$

$= \frac{3}{4} {\left[2 {x}^{3} / 3 - {x}^{4} / 4\right]}_{0}^{2} = \frac{3}{4} \left(\frac{16}{3} - \frac{16}{4}\right) = \frac{3}{4} \cdot \frac{16}{12} = 1$

To calculate $V \left(X\right)$

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

$E \left({X}^{2}\right) = {\int}_{0}^{2} {x}^{2} f \left(x\right) \mathrm{dx} = {\int}_{0}^{2} \left(\frac{3}{4}\right) \left(2 {x}^{3} - {x}^{4}\right) \mathrm{dx}$

$= \frac{3}{4} {\left[2 {x}^{4} / 4 - {x}^{5} / 5\right]}_{0}^{2} = \frac{3}{4} \left(8 - \frac{32}{5}\right) = \frac{6}{5}$

$\therefore V \left(X\right) = \frac{6}{5} - 1 = \frac{1}{5}$