# Finding the cumulative distribution function

Say you have pdf, $f(x)$ for $x$ in $[a,b]$: $a < x < b$

How do you find the CDF, $P(X < x)$?

-
$F_X(x) = \int_{-\infty}^x f_X(t)\,dt$. – Cm7F7Bb Apr 10 '14 at 13:22
but what are the limits here? are you integrating between negative infinity and b? – Dom Apr 10 '14 at 13:23
For $x$ between $a$ an $b$, the cumulative distribution function $F(x)$ is given by $F(x)=\int_a^x f(t)\,dt$. Also, $F(x)=0$ if $x\le a$ and $f(x)=1$ if $x\ge b$. – André Nicolas Apr 10 '14 at 13:23
$$\Pr[X\le x]=F_X(x)=\int_a^x f(t)\ dt,$$ where $t$ is just a dummy variable. – Tunk-Fey Apr 10 '14 at 13:23
@Dom I'm integrating between negative infinity and $x$. If $f_X(x)=0$ for $x\not\in(a,b)$, then $F_X(x) = \int_a^x f_X(t)\,dt$ for $x\le b$ as others have already mentioned. $F_X(x)=1$ for $x\ge b$. – Cm7F7Bb Apr 10 '14 at 13:25

By definition, $$P(X<x) = \int_{-\infty}^xf(t)dt$$
In your case, of course, you have $f(t)=0$ for $t<a$, meaning that $$P(X<x)=\int_a^xf(t)dt$$ if $x\geq a$ (and, obviously, $0$ if $x<a)$