[Math] CDF of Function of a Random Variable

probabilityprobability distributionsuniform distribution

This question is pretty basic but I am still having trouble understanding it. This is the question, verbatim, from my textbook:

"If $X$ is a random variable that is uniformly distributed between $-1$ and $1$, find the PDF of $\sqrt{|X|}$".

Because $X$ is uniformly distributed, we know it's CDF and PDF:

  • PDF $= \begin{cases} \frac{1}{2} & -1\leq x \leq 1 \\ 0 & \text{o.w.} \end{cases}$
  • CDF $= \begin{cases} 0 & x \leq -1 \\ \frac{x+1}{2} & -1 \leq x \leq 1 \\ 1 & x \geq 1 \end{cases}$

Also, we define another random variable $Y = \sqrt{|X|}$.

With these things established first, we then can do a little work:

  • $F_Y(y) = \mathbb{P}(Y \leq y) = \mathbb{P}(\sqrt{|X|} \leq y) = \mathbb{P}(-y^2 \leq x \leq y^2)$.

This is where I'm stuck. My plan is to calculate the CDF of $Y$ and then differentiate to get the PDF of $Y$. I don't know how to proceed from here. Any advice? Thank you!

Best Answer

Your plan is good. Keep in mind that $Y=\sqrt{|X|}$ will be distributed on $[0,1]$, so we can start by calculating $$ \mathbb P(Y\leq y)=\mathbb P(-y^2\leq X\leq y^2) $$ for $0\leq y\leq 1$. Since $X$ is uniform, the probability comes out to $y^2$. Thus $$ F_Y(y)=\begin{cases} 0,& y\leq 0\\ y^2,& 0\leq y\leq 1\\ 1,& 1\leq y \end{cases} $$ As you said, you get the PDF by differentiating. So the density is $2y$ on the interval $[0,1]$, and $0$ elsewhere.