Function of random variable: Two ways to find the pdf

78 Views Asked by At

Suppose $X$ is a r.v with pdf $f_X(x)$. Let $Y = g(X)$. To find the pdf of $Y$ - $f_Y(y)$. I use one of two ways and I assume g to be a monotonically increasing function.

Method I

first using the standard change of variable in integration

Since, $dy = g'(x)dx$

$f_X(x) dx = f_X(g^{-1}(y)) \frac{dy}{g'(g^{-1}(y))}$. From this I infer that

(1) $f_Y(y) = \frac{f_X(g^{-1}(y))}{g'(g^{-1}(y))}$

Method II

Consider the distribution function of $Y$, $F_{Y}(x)$

$F_{Y}(y) = \mathbb{P}(Y < y) = \mathbb{P}(X < g^{-1}(y)) = F_{X}(g^{-1}(y))$

Now to find pdf of $Y$. I differentiate the distribution function with respect to y and get,

(2) $\frac{d}{dy} F_{Y}(y) = f_{Y}(y) = f_{X}(g^{-1}(y)).\frac{d}{dy}g^{-1}(y)$

Q1) My question is that even for monotonically increasing function where method II is applicable (1) and (2) seem to differ. Why?

Q2) Does Method I always yield the right answer for any type of function?