Let $X\thicksim\text{Uniform}[-1,2]$. Show that $Y=(X-1)^2$ is absolutely continuous and find its density.

probabilityprobability distributions

Let $X$ be a uniform random variable on $[-1,2]$. Show that $Y=(X-1)^2$ is absolutely continuous and find its density.

Here is what I have so far:

By hypothesis
$$f_{X}(x)= \begin{cases} & 1/3\,\,\,\,\,\,\text{if}\,\,\,x\in[-1,2] \\
& 0 \,\,\,\,\,\,\,\,\,\,\,\,\text{otherwise.}
\end{cases}$$

Now we observe that
\begin{align*}
F_{Y}(y)= P(Y\leq y) & = P((X-1)^2\leq y) \\
& = P(X\leq \sqrt{y}+1) \\
& = F_{X}(\sqrt{y}+1) \\
& = \frac{\sqrt{y}+2}{3},
\end{align*}

where I used that $(X-1)^2$ is monotonic in the interval we are working.

Now we can differentiate the above to find the PDF of $Y$. We get the following
$$\large f_{Y}(y)= \begin{cases}
& \frac{1}{6y^{1/2}}\,\,\,\,\,\,\,\text{if}\,\,\,y\in [0,9] \\
& 0 \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{otherwise.}
\end{cases}$$


Am I on the right track, or do I need to divide the problem into cases, depending on the value of $y$?

Thank you for your time and appreciate any feedback.

Best Answer

The function $X\mapsto (1-X)^2$ is not monotonic over the domain of $[-1;2]$.

The support for $X$ will be folded.   $[-1;1)\mapsto (0;4]$ and $[1;2]\mapsto[0;1]$.

Thus your probability density function will be defined piecewise, and have the form:

$$f_Y(y)=\begin{cases}\text{something}&:&0\leq y\leq 1\\\text{otherthing}&:& 1\lt y\leq 4\\0&:&\text{elsewhere}\end{cases}$$

Start here:

$$\begin{align}\mathsf P(Y\leq y) &= \mathsf P((1-X)^2\leq y)\\[1ex]&=\mathsf P(-\surd y\leq (X-1)\leq \surd y)\\[1ex]&=\mathsf P((1-\surd y)\leq X\leq (1+\surd y))\\[1ex]&= F_X(1+\surd y)-F_X(1-\surd y)\end{align}$$