# PDF transformation for y=|x|

Suppose I have the random variable X with a pdf: $$f(x)=exp(-(x+1)) u(x+1)$$ where u is the unit step function; such that u = 0 for x<-1 and u=1 for x>-1

$$y= |x|$$

for $$-1 otherwise y=0

I need to find the PDF and the CDF for the variable y.

My trial is: First y possible values are between 0 and 1. Second is we have 2 values of x for each y.

Thus, using the fundamental theorm: PDF of y = f(x1)/|dy/dx1| + f(x2)/|dy/dx2|

where x1 is between -1 and 0 and x2 is between 0 and 1

so $$f(y)= - exp(-(-y+1)) u(-y+1) + exp(-(y+1)) u(y+1)$$

For the CDF of y: $$F(Y)=P(Y

Can you please comment on my solution and correct it if mistaken?

• At the end you seem to conflate $F$ with $f.$ Certainly there's no general closed form formula for $F$ in terms of $f,$ because you have't stipulated anything about $u.$ – whuber Mar 3 '19 at 21:57
• Ops! Just edited my question. u is the unit step function – HaneenSu Mar 3 '19 at 22:25
• So does $u(x+1) =1$ when $x \gt -1$ and $u(x+1) =0$ when $x \lt -1$? – Henry Mar 3 '19 at 22:28
• Yes, exactly, I edited the question to clarify that – HaneenSu Mar 3 '19 at 22:30
• If $X$ has a drifted exponential distribution on $(-1,\infty)$ why do you restrict $Y=|X|$ to be supported on $(-1,1)$? – Xi'an Mar 4 '19 at 6:42