# Finding a CDF from a PDF

If we have a probability density function given by $f(y)=\frac{a}{y^2}$ where $0<a\leq y$, how do we find F(y)?

-
The cumulative distribution function is in principle defined for all $y$. So a complete answer would be $F(y)=0$ if $y <a$, and $F(y)=1-\frac{y}{a}$ if $y \ge a$. Depending on the mood of the grader, leaving out the uninteresting part $F(y)=0$ if $y<a$ might lose you a mark. –  André Nicolas Feb 28 '12 at 19:57
$F(y)\neq 1-\frac{y}{a}$ but $1-\frac{a}{y}$ . –  Aang Jul 7 '12 at 7:01

The cumulative distribution function is defined as:

$$F(y)=\int_{-\infty}^yf(u)\ du$$

So for your probability density function:

$$F(y)=\int_{a}^y\frac{a}{u^2}\ du=[-\frac{a}{u}]_a^y=1-\frac{a}{y}$$

-
...if $y\geqslant a$ and $F(y)=0$ otherwise. –  Did Feb 28 '12 at 19:54
@DidierPiau Yeah,you're right! –  chemeng Feb 28 '12 at 19:57
Thanks! But I don't understand how $F(y)=1-\frac{a}{y}$. The way I did it originally, (but it didn't make sense, which is why this question is up) I had $\int_0^\infty \frac{a}{y^2}=\frac{-a}{y}$ –  johnnymath Feb 28 '12 at 21:40
@johnnymath Shouldn't you be substituting limit values $0$ and $\infty$ in the transition from $\int_0^\infty \frac{1}{y^2}$ to $-\frac{a}{y}$? –  Dilip Sarwate Feb 28 '12 at 21:43