Density of $Y = X^2$

131 Views Asked by At

If $f_X(x) = \left\{ \begin{array}{l} \frac{2}{3}x, & \text{if $x \in [-1, 2] $}.\\ 0, & \text{otherwise.} \end{array} \right.$
What would be the pdf for $Y = X^2$?

I'm thinking $F_Y(y) = P(Y \leq y) = P(X^2 \leq y) = P(-\sqrt{y} \leq X \leq \sqrt{y}) = F_X(\sqrt{y}) - F_X(-\sqrt{y})$. And $F_X (x)= \frac{1}{3}x^2$. So $F_Y(y) = \frac{1}{3}y - \frac{1}{3}y = 0$. But this looks weird and I don't know what is wrong. Could anybody help? Thanks!

2

There are 2 best solutions below

6
On BEST ANSWER

First of all the cdf of $X$ is

$$F_X(x)=\begin{cases} 0, \ x<-1 \\ \frac13 x^2-\frac13, \ -1\leq x \leq 2 \\ 1, \ x>2 \end{cases}$$.

  • For $x\in [-1,1]$ we have $F_Y(y) = F_X(\sqrt{y}) - F_X(-\sqrt{y})$. The roots of $y$ are $\sqrt{y}$ and $-\sqrt{y}$. So you was almost right and it has no effect on the final result.

    Then we have $F_Y(y)=\frac13 \left(\sqrt{y}\right)^2-\frac13-(\frac13 \left(-\sqrt{y}\right)^2-\frac13)=0$

  • For $x\in (1,2]$ we have indeed $y\in (1,4]$. Then indeed

    $$F_Y(y)=F(X^2<y)=F(X\leq y^{1/2})=\frac13y-\frac13$$

Therefore the cdf of $Y$ is

$$F_Y(y)=\begin{cases} 0, \ y\leq 1 \\ \frac13 y-\frac13, \ 1< y \leq 4 \\ 1, \ y>4 \end{cases}$$.

0
On

It is not possible to find the density of $Y$ since $f_X$ is not a valid density. Indeed, for, say, $x=-1/2$, you would have $f_X(-1/2) = -1/3$, which is a contradiction because a density function cannot be negative.

In addition, using $x=0$ in (see @callculus42's answer) $F_X$ we would have $F_X(0) = -1/3$ which is again a contradiction.