Let $X$ be a continuous random variable with PDF,
$f_X(x) = \begin{cases} {ax^2} & \text{$0 < x < 2$} \\ 0 & \text{otherwise}\end{cases}$
a) Find $a$.
b) Find the variance of $X$.
c) Find the Cumulative Distribution Function (CDF) of $X$.
For a) I did:
$\int_0^2 ax^2 \ dx = 1$ and got $\frac{3}{8}$ for $a$.
b)
I have the following formulas for expectation and variance respectively:
$\int_{-\infty}^\infty x f(x) \ dx$ and $\int_{-\infty}^\infty (x - E(X))^2 f(x) \ dx$
For $E(X)$, can I simply change the bounds to 0 and 2 and evaluate it like:
$\int_0^2 x \frac{3}{8}x^2 \ dx$? And also change the bounds for the variance formula?
edit: If I do this, I get $\frac{3}{2}$ for the expectation and $\frac{3}{20}$ for the variance.
Part c) I haven't gotten to yet. I'd like to try the first two parts first.
For part c), assuming I did everything correctly, which format is correct?
$F_X(x) = \begin{cases} {0} & \text{$x \leq 0$} \\ {\frac{x^3}{8}} & \text{$0 < x < 2$} \\ 1 & \text{$x \geq 2$}\end{cases}$
or
$F_X(x) = \begin{cases} {0} & \text{$x \leq 0$} \\ {\frac{1}{8}} & \text{$x = 1$} \\ 1 & \text{$x \geq 2$}\end{cases}$