TITLE: Transformed probability distribution function (non-continuous transformation)
QUESTION [5 upvotes]: Let 
$$
F_X(x) = \left\{
\begin{array}{ll}
\frac{1}{3}e^x & x < 0\\
1 - \frac{1}{2}e^{-x} & x \geq 0
\end{array}
\right .
$$
What is the distribution of $Y = F(X)$?
I have a hard time using common-known results due to the discontinuity and lack of inverse of $F$. I'm not looking for an answer but rather a general method to solve such problems. Thanks.

REPLY [2 votes]: Let's explore the CDF method. The first step is to find the CDF of $Y$ in terms of the CDF of $X$. Let's start for $x < 0$:
\begin{align}
F_Y(y) &= P(Y \leq y)\\
&= P\left(\frac{1}{3}e^{X}\leq y\right)\qquad X < 0\\ 
&= P(X\leq \text{log}(3y))\\
&= F_X(\text{log}(3y))\\
&= \frac{1}{3}e^{\text{log}(3y)}\\
&= y \qquad0\leq y < \frac{1}{3}
\end{align}
For $x\geq 0$:
\begin{align}
F_Y(y) &= P(Y \leq y)\\
&= P\left(1-\frac{1}{2}e^{-X}\leq y\right)\qquad X \geq 0\\ 
&= P\left(X\leq \text{log}\left(\frac{1}{2(1-y)}\right)\right)\\
&= F_X\left(\text{log}\left(\frac{1}{2(1-y)}\right)\right)\\
&= 1-\frac{1}{2}e^{-\left(\text{log}\left(\frac{1}{2(1-y)}\right)\right)}\\
&= y \qquad \frac{1}{2}\leq y\leq 1
\end{align}
Now, if you want to get the PDF of $Y$, you derive its CDF to get
$$f_Y(y) = 1 \qquad \forall y \in S=\left\{\left[0,\frac{1}{3}\right)\cup \left(\frac{1}{2},1\right]\right\}$$
Since the area under $f_Y(y)$ is not 1, we are evidently missing something. In order to understand what's going on, let's analyze $F_X(x)$. We note that there is a discontinuity in $x=0$ because $F_X(0^-) = \frac{1}{3}\neq \frac{1}{2} = F_X(0^+)$. This happens because $X$ is a mixed random variable that is discrete at $X=0$ and continuous everywhere else. Moreover, $P(X=0) = F_X(0^+) - F_X(0^-) = \frac{1}{6}$. This mixed nature is naturally inherited by $Y$, being discrete at $y=\frac{1}{2}$ when $x=0$ and continuous in $S$. Therefore, the partial probability density function of $Y$ for the continuous part is $f_Y(y)$, and the partial probability density function for the discrete part is $p_Y(y) = \frac{1}{6}$ for $y=\frac{1}{2}$.
Notation note: $\displaystyle F_X(0^+) = \lim_{x\to0^+} F_X(x)$ and $\displaystyle F_X(0^-) = \lim_{x\to0^-} F_X(x)$.