Piecewise continuous transformation of a normally distributed random variable Say $U$ is a continuous random variable such that:
$$U \sim N(0, \sigma^2)$$
Another variable $X$ is defined such that $X = g(U)$ where:
$$g(\omega) =
 \begin{cases} 
      \omega - a & \omega\geq a \\
      0 & -a\leq \omega\leq a \\
      \omega + a & \omega\leq a
   \end{cases} $$
How can I find the PDF of $X$?
I've tried to start by saying:
$$F_X(x) = Pr(X \leq x) = Pr(g(U) \leq x)$$
... with the aim of ultimately differentiating the CDF to get the PDF.
However, I don't really know how to proceed from this point onwards, as it is my first time working with a piecewise transformation. How do I solve this problem?
 A: Most likely you mean
$$g(\omega) =
 \begin{cases} 
      \omega - a &\text{ if }\quad \omega\geq a\,; \\
      0 & \text{ if }\quad-a\leq \omega\leq a\,; \\
      \omega + a &\text{ if }\quad \omega\leq \color{red}{-}a\,.
   \end{cases} $$
Depicting this piecewise linear function

shows that
$$
\mathbb P\{g(U)\le x\}=\begin{cases} \mathbb P\{U\le x-a\}&=\Phi(x-a)\,,&\text{ if }\quad x< 0\,;\\
\mathbb P\{U\le a\}&=\Phi(a)&\text{ if }\quad x=0\,;\\
\mathbb P\{U\le x+a\}&=\Phi(x+a)&\text{ if }\quad x>0\,.
\end{cases}
$$
where $\Phi$ is the CDF of the normal distribution with variance $\sigma^2\,.$ The above CDF of $g(U)$ can obviously be simplified to
$$
\mathbb P\{g(U)\le x\}=\begin{cases} \mathbb P\{U\le x-a\}&=\Phi(x-a)\,,&\text{ if }\quad x< 0\,;\\
\mathbb P\{U\le x+a\}&=\Phi(x+a)&\text{ if }\quad x\ge 0\,.
\end{cases}
$$
This CDF is discontinuous with a jump of size $2\Phi(a)-1$ at $x=0\,.$ This happens because all the probability of the normal $U$
between $-a$ and $+a$ gets compressed into the point zero when doing the transformation $g(U)$. In other words, the probability that $g(U)$ is exactly zero is $2\Phi(a)-1\,.$ In contrast, we know that the probability that $U$ is exactly zero is zero because $U$'s normal CDF $\Phi$ is continuous.

