# Suppose X has probability density function f(x)=6x(1-x) for 0<x<1 and 0 otherwise. What is E[X] and Var[X]?

$E \left[X\right] = \frac{1}{2}$ and $V a r \left[X\right\} = \frac{1}{20}$
$E \left[X\right] = {\int}_{0}^{1} 6 {x}^{2} \left(1 - x\right) \mathrm{dx} = \frac{1}{2}$
$E \left[{X}^{2}\right] = {\int}_{0}^{1} 6 {x}^{3} \left(1 - x\right) \mathrm{dx} = \frac{3}{10}$
So $V a r \left[X\right] = E \left[{X}^{2}\right] - {\left(E \left(X\right)\right)}^{2} = \frac{3}{10} - \frac{1}{4} = \frac{1}{20}$