# How to find cumulative probability density function given the probability density function?

Given probability density function

$$f(x) = \begin{cases} 3x^2 &\mbox{for } 0 < x \le1 \\ 0 & \mbox{otherwise } \end{cases}$$

Show that the cumulative probability density function $F$ corresponding to $f$ is given by $$F(x) = \begin{cases} 0 &\mbox{for } x<0 \ \\ x^3 & \mbox{for }0 \leq x \le1 \\1 & \mbox{for }x>1 \end{cases}$$

I know that the probability density function of a random variable $X$ is given by $$f(x)=f_X(x)=\frac{d}{dx}F(x)$$ , but that's about it. Help appreciated, thanks!

• Differentiate $F$ or integrate $f$ and see what happens. – user251257 Nov 2 '17 at 9:03
• @user251257 I understand that $\int 3x^2dx =x^3+C$, but here there are lots of 'pieces' and boundaries which i don't understand. – Programmer Nov 2 '17 at 9:07
• Terminology correction: it is called the cumulative distribution function, not density. – Nap D. Lover Nov 2 '17 at 11:49

## 1 Answer

The CDF at $x$ is just given by the integration of the PDF from $-\infty$ to $x$. If you want justification, you can look at this answer.

Now, with this information, it is pretty easy to divide $F(x)$ and perform piecewise integration to get your answer.