# Calculating a Cumulative Distribution Function (CDF)

Let $Z$ be a continuous random variable with probability density function:

$$f_Z(z) = \begin{cases} \gamma(1 + z^2) & \mbox{ if } -2 < z < 1, \\ 0 & \mbox{ otherwise} \end{cases}$$

a) For what $γ$ is this possible?
b) Find the cumulative distribution function of $Z$.

• For question a do you know what a probability distribution is and the requirements? for question b do you know what a cumulative distribution is and the integral/summation involved? – Chinny84 Dec 14 '16 at 15:47
• I know that to solve part b I need to solve the integral from negative infinity to z of fZ(z), but I don't know how to solve part a, which is why I am stuck. – Monil Dec 14 '16 at 15:53
• Hint: which value should the integral of the PDF have over all domain? – Jesús Ros Dec 14 '16 at 15:55
• I'm sorry, I still don't understand how to do it. – Monil Dec 14 '16 at 16:02
• If $f_Z(z)$ is a PDF, which is the value of $P[-\infty<z<\infty]=\int_{-\infty}^{\infty}f_Z(z)dz$? Or in other words, which is the probability that $z$ lies between $(-\infty,\infty)$? – Jesús Ros Dec 14 '16 at 16:04

## 1 Answer

Thanks to @gunbl4s2 for explaining how to get to the answer.

$a)$ $$\int_{-∞}^∞\ f_Z(z)\ dz\ = 1$$ $$\int_{-2}^1\ γ(1 + z^2)\ dz= 1$$ $$γ(z + \frac{z^3}3)\ |_{-2}^1\ = 1$$ $$γ\ = \frac16$$

$b)$ $$F_Z(z)\ =\ \int_{-2}^z\ f_Z(z)\ dz$$ $$F_Z(z) = \int_{-2}^z\ \frac16(1 + z^2)\ dz$$ $$F_Z(z) = \frac16(z + \frac{z^3}3) |_{-2}^z$$ $$F_Z(z) = \frac16[(z + 2) + (\frac{z^3 + 8}3)]$$

• Notice that $F_Z(-2) = 0$ and $F_Z(1) = 1.$ That's as it must be. Do you you understand why I made sure of that? Guessing that you do. (+1) – BruceET Dec 15 '16 at 6:44