# Finding 'a' and variance of PDF, and CDF of PDF.

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}$

• Yep, it seems to be correct as far as I can tell... – Hiten Oct 1 '17 at 18:00
• When setting up the integral in part c), is it okay that my lower bound is 0 although the interval doesn't include 0? – Hello Oct 1 '17 at 18:05
• While dealing with continuous random variables, there’s a very useful fact that P(X=a) = 0 no matter what a is, as long as your probability is spread over a region and not just at one point. Thus P(X=0)=0 and adding 0 to a number doesn’t change anything, therefore your integral should still give the right answer – Hiten Oct 1 '17 at 18:09
• I updated the OP with a question (at the bottom)! – Hello Oct 1 '17 at 18:15
• The first one is correct – Hiten Oct 1 '17 at 18:17