Finding the PDF of X^2 Given the PDF of X: Two Methods

1k Views Asked by At

I have a homework question which asks:

Let X be a random variable with PDF

$$ f(x) = \frac{1}{2}(1+x), for -1 < x <1 $$

Find the PDF of the random variable Y = X^2

So, my understanding was that I could take the PDF of X, integrate with respect to X (to find the CDF) then differentiate with respect to Y to get the PDF of Y. OR I could use the change of variables formula. I tried both, but I keep getting different answers, and I don't know which method I am failing to understand. (Hopefully not both).

Integrating then differentiating:

$$ \int_{-x}^{x} \frac{1}{2}(1+x) dx = \frac{1}{2}[x+\frac{x^2}{2}]^{x}_{-x} = \frac{2x}{2} = x $$ $$ \frac{d}{dy} x = \frac{d}{dy} \sqrt{y} = \frac{1}{2}y^{-1/2} = \frac{1}{2\sqrt{y}} $$

Change of variables: $$ f_Y(y) = f_X(x)|\frac{\partial x}{\partial y}|; \frac{\partial x}{\partial y} = \frac{\partial y}{\partial x}^{-1} $$ $$ \frac{\partial y}{\partial x} x^2 = 2x; (\frac{\partial y}{\partial x})^{-1} = \frac{1}{2x} $$ $$ f_Y(y) = \frac{1}{2}(1+x)\frac{1}{2x} = \frac{1}{2}(1+\sqrt{y})\frac{1}{2\sqrt{y}} = \frac{1+\sqrt{y}}{4\sqrt{y}} $$

I have tried to look at similar problems (including this one). I seem able to do both methods when following an example, but here at least one is clearly wrong.

I am also not sure about how to identify the support of Y once I have its PDF. I would appreciate any guidance.

1

There are 1 best solutions below

0
On

I didn't check your calculations because they were overly complicated and inconsistent (you used $x$ for both the limits and integrating variable. Here is a nice and correct approach.

$Y = y$ if and only if $X \in \{-\sqrt{y}, \sqrt{y}\}.$ Therefore, $\mathbf{P}(Y \leq y) = \mathbf{P}(-\sqrt{y} \leq X \leq \sqrt{y}) =\sqrt{y}$ (the last equality can be seen instantaneously by noting $1$ is even and $x$ is odd). Then $f_Y(y) = \dfrac{1}{2 \sqrt{y}}$ for $y \in (0, 1).$