[Math] Random Variable absolute value distribution (PDF and CDF)

probabilityprobability distributionsrandom variables

X has a Uniform distribution $U(0,1)$.
I have to find the distribution of the variable $U =|X-1/3|$.

This is what i can get so far :

$F(U) \;{= P\{U < u\} \\ = P\{| X-1/3 | < u\} \\ \ddots}$

I know that i shall get something like $P\{-(U-1/3) < X < U -1/3\}$.
Could anyone explain how to get the PDF and the CDF for this problem and explain how can i easily change this absolute values for other problems ( other examples $Z=1-|X|,~~G=|X|-1$ etc..).

Best Answer

$U$ takes values in $[0,2/3]$, so we will be done if we compute the CDF $F_U(u)$ for $u \in (0,2/3)$.

Your first steps are good: \begin{align} F_U(u) &= P(U \le u) \\ &= P(|X-1/3| \le u) \\ &= P(1/3 - u \le X \le 1/3+u). \end{align}

Then, recall the definition of the uniform distribution: $P(a \le X \le b) = b-a$ whenever $0 \le a < b \le 1$.

Can you finish? You will need to handle the cases $0 \le u \le 1/3$ and $1/3 \le u \le 2/3$ separately.

Related Question