# What is the variance of X if it has the following probability density function?: f(x) = { 3x2 if -1 < x < 1; 0 otherwise}

Mar 16, 2016

$V a r = {\sigma}^{2} = \int {\left(x - \mu\right)}^{2} f \left(x\right) \mathrm{dx}$ which cann be written as:
${\sigma}^{2} = \int {x}^{2} f \left(x\right) \mathrm{dx} - 2 {\mu}^{2} + {\mu}^{2} = \int {x}^{2} f \left(x\right) \mathrm{dx} - {\mu}^{2}$

${\sigma}_{0}^{2} = 3 {\int}_{-} {1}^{1} {x}^{4} \mathrm{dx} = \frac{3}{5} {\left[{x}^{5}\right]}_{-} {1}^{1} = \frac{6}{5}$

#### Explanation:

I am assuming that question meant to say
$f \left(x\right) = 3 {x}^{2} \text{ for " -1 < x < 1; 0 " otherwise}$
Find the variance?
$V a r = {\sigma}^{2} = \int {\left(x - \mu\right)}^{2} f \left(x\right) \mathrm{dx}$
Expand:
${\sigma}^{2} = \int {x}^{2} f \left(x\right) \mathrm{dx} - 2 \mu {\cancel{\int x f \left(x\right) \mathrm{dx}}}^{\mu} + {\mu}^{2} {\cancel{\int f \left(x\right) \mathrm{dx}}}^{1}$
${\sigma}^{2} = \int {x}^{2} f \left(x\right) \mathrm{dx} - 2 {\mu}^{2} + {\mu}^{2} = \int {x}^{2} f \left(x\right) \mathrm{dx} - {\mu}^{2}$

substitute
${\sigma}^{2} = 3 {\int}_{-} {1}^{1} {x}^{2} \cdot {x}^{2} \mathrm{dx} - {\mu}^{2} = {\sigma}_{0}^{2} + {\mu}^{2}$
Where, ${\sigma}_{0}^{2} = 3 {\int}_{-} {1}^{1} {x}^{4} \mathrm{dx}$ and $\mu = 3 {\int}_{-} {1}^{1} {x}^{3} \mathrm{dx}$
So let's calculate ${\sigma}_{0}^{2} \text{ and } \mu$
by symmetry $\mu = 0$ let see:
$\mu = 3 {\int}_{-} {1}^{1} {x}^{3} \mathrm{dx} = {\left[\frac{3}{4} {x}^{4}\right]}_{-} {1}^{1} = \frac{3}{4} \left[1 - 1\right]$
${\sigma}_{0}^{2} = 3 {\int}_{-} {1}^{1} {x}^{4} \mathrm{dx} = \frac{3}{5} {\left[{x}^{5}\right]}_{-} {1}^{1} = \frac{6}{5}$