standard deviation of piecewise function

318 Views Asked by At

Let $X$ be a random variable, with probability density function

$f(x)= \begin{array}{cc} \{ & \begin{array}{cc} \frac{3}{4}(1-x^2) & -1\leq x\leq 1 \\ 0 & \text{otherwise} \end{array} \end{array} $

What is the standard deviation of $X$? I only know how to find standard deviation of set of point, how do I find it of a function? I am preparing for the GRE subject and have not taken probability before. The answer is $\frac{\sqrt{5}}{5}$. Is it just $x$ times the function integrated from $-1$ to $1$?