[Math] Finding the CDF given a PDF

probability distributionsprobability theory

Let $\alpha$, $\beta$ be two fixed positive constants, and define the density (pdf) $$f(x) = \begin{cases}
\frac{\alpha}{2}e^{\alpha x} & \text{if} x<0\\
\frac{\beta}{2}e^{-\beta x} & \text{if} x\geq 0
\end{cases}$$
Find the cumulative distribution function (cdf) of $X$.

I am blanking on how to do this again I haven't taken a probability theory course for about 5 years now I thought we just integrate for the two different condtions to get the cdf so essentially I would do

$$\int_{-\infty}^{0}f(x) \ \ \ \text{for} \ \ x < 0$$
and $$\int_{0}^{\infty}f(x) \ \ \ \text{for} \ \ x \geq 0$$

If someone could just provide a detailed solution I would greatly appreciate it.

Best Answer

The CDF $F$ is defined by $$F(x) = \int_{-\infty}^{x}f(t)\text{ d}t$$ for every $x$. As long as $x < 0$, $$F(x) = \int_{-\infty}^{x}f(t)\text{ d}t = \int_{-\infty}^{x}\dfrac{\alpha}{2}e^{\alpha t}\text{ d}t\text{.}$$ For $x \geq 0$, $$F(x) = \int_{-\infty}^{x}f(t)\text{ d}t = \int_{-\infty}^{0}\dfrac{\alpha}{2}e^{\alpha t}\text{ d}t + \int_{0}^{x}\dfrac{\beta}{2}e^{-\beta t}\text{ d}t\text{.}$$ I will leave the integration up to you.

Related Question