# Understanding the CDF of the Exponential from the PDF?

I was trying to get the CDF of the exponential through the pdf. I know that the relationship between the pdf and the cdf is that the pdf is the derivative $\lambda \exp(-\lambda x)$. But I don't quite understand how the CDF is then $1 - \exp(-\lambda x)$.

When I tried to find the cdf I only put it as $\exp(-\lambda x)$. My guess is that this has something to do with the bounds of integration that I'm overlooking. Thank you for any help you can give!

• Obviously $x\to\exp(-\lambda x)$ cannot be a CDF (even when limited to positive $x$), because either it decreases (for $\lambda \gt 0$), blows up (for $\lambda \lt 0$), or is forever constant, none of which are possible for any CDF (except an atom at $0$, which is unhelpful). Moreover, when you checked your work you should have found that $\frac{d}{dx}\exp(-\lambda x) = -\lambda\exp(-\lambda x)$ has the wrong sign. – whuber May 5 '16 at 18:33

The pdf is the derivative of the CDF, not the other way around. If you want to find the CDF, you integrate the pdf. You might have made the mistake when evaluating $\exp(0)$ and when accounting for a negative sign.

If $X \sim Exp(\lambda)$. \begin{align*} P(X \leq x) & = \int_0^{x} \lambda\exp(-\lambda y) \, dy\\ & = \lambda \int_{0}^{x}\exp(-\lambda y) \, dy\\ & = \dfrac{\lambda}{\lambda} \left[ -\exp(-\lambda x) \right]^{x}_{0}\\ & = \exp(0) - \exp(-\lambda x)\\ & = 1 - \exp(-\lambda x). \end{align*}