TITLE: Statistics: Could someone show why this exponential pdf integrates into this particular cdf
QUESTION [18 upvotes]: I have the following exponential distribution: 
$$f(\lambda, x) = \begin{cases} \lambda e^{-\lambda x} &\text{if } x \geq 0 \\
0 & \text{if } x&lt0. \end{cases}$$
I need to show that this expression integrates into 
$$F(\lambda, x) = \begin{cases} 1-e^{-\lambda x} &\text{if } x \geq 0 \\
0 & \text{if } x&lt0. \end{cases}$$
I know that the integral of a pdf is equal to one but I'm not sure how it plays out when computing for the cdf. I computed the indefinite integral of $\lambda e^{-\lambda x}$ and got $-e^{-\lambda x} + C$

REPLY [13 votes]: By definition of the cumulative and probability density functions,
$$F(\lambda,x):= \int_{-\infty}^x f(\lambda,u)du$$
Thus, by elementary calculus, for $x\le 0$ we have $F=0$ and for $x>0$,
$$F=\int_{-\infty}^0 0\, du+\int_0^x \lambda e^{-\lambda u}du=[-e^{-\lambda u}]_{0}^{x}=1-e^{-\lambda x}. $$