Short version: When solving for the pdf of a function of a continuous random variable(say, $Y=X^2$), why can't you just plug in inverse of that($\pm\sqrt{x}$) into the pdf of the RV? Why do you have to start from the cdf of the $Y$, substitute $Y$ with $X^2$, and differentiate that to get the pdf?
The point of this question is regarding the intermediate step involved.
- Why is it not allowed to simple plug-in to the pdf of RV?
- why is necessary and also justified to do so involving the cdf?
Long version : Let's say you have a random variable $X$ and a function of the random variable, $g(X)$ (such as $Y=X^2$). You are interested in finding the pdf of $Y$, i.e. $f_Y(y)$.
Usually, to do this, you have to start with the cdf of $Y$ first, and differentiate that to get a pdf of it. For example,
$$F_Y(y)=P(Y\le y)$$ and here you substitute $Y$ with $X^2$:
$$P(Y=X^2 \le y)=2F_X (\sqrt{y})-1$$
and you you differentiate this to get pdf of $Y$ $$d(2F_X(\sqrt{y})-1)/dy=f_Y(y)$$
My question is : WHY? why not just solving for $$f_X(\pm\sqrt{y})$$ what is wrong with this approach? and why is it justified to use cdf to solve this?
Please explain this in a layman's term since clearly I am a novice in statistics