# How to sketch output PDF given the transformation?

Question: Let Random variable $$X$$ with $$PDF$$ = $$f_{X}(x)$$ be the input to device with input output characteristics as shown below then sketch the $$PDF$$ of $$Y$$ i.e, $$f_{Y}(y)$$

My attempt:

for X>0

,$$Y=X+1\implies f_{Y}(y)=f_{X}(y-1)$$

for X<0

,$$Y=X-1\implies f_{Y}(y)=f_{X}(y+1)$$

but at

X=0 there is $$2$$ units jump from $$-1$$ to $$1$$ and derivative of jump discontinuity is impulse so i thought there should be presence of impulse in PDF of Y but i'm not sure about it .

any help in sketching O/P PDF Y will be greatly appreciated, and it is not a homework problem but from local author textbook

$$f_X(x) = \begin{cases} \frac{1}{4} \text{ for } -2 \leq x < 0 \\ \frac{1}{2} \text{ for } 0 \leq x < 1 \\ 0 \text{ otherwise,} \end{cases}$$ but for the edges it remains unclear whether the intervals should or should not include their borders as Dilip pointed out. Now the function $$Y(X)$$ applies an offset of $$\pm 1$$ to any $$X$$ value corresponding to its sign: $$Y(X) = \text{sign}(X) + X$$. Using this, we can write the output PDF as $$f_Y(y) = \begin{cases} \frac{1}{4} \text{ for } -3 \leq x < 1 \\ \frac{1}{2} \text{ for } 1 \leq x < 2 \\ 0 \text{ otherwise.} \end{cases}$$
There is no impulse because there is zero probability mass at $$0$$. As the problem itself shows, it is perfectly all right for a pdf to make sudden jumps in value; note that the graph of $$f_X$$ (yes, I do mean $$X$$, not $$Y$$) jumps in value at $$0$$ and the value of $$f_X(0)$$ cannot be determined from the graph. $$f_X(0)$$ could have value $$\frac 14$$ or $$\frac 12$$ or any value in between (or any nonnegative value for that matter)