Domain of the probability density function - Change of variables formula

122 Views Asked by At

I've a random variable $X$ with the following PDF:

$$ f_X(x) = \begin{cases} \mid x \mid \, \cos(x^2) & \text{if } x \in \left[ - \sqrt{\frac{\pi}{2}}, \, \sqrt{\frac{\pi}{2}} \right] \\ 0 & \text{otherwise} \end{cases} $$

The goal is to evaluate the PDF of the r. v. $Y = X^2$. I applyed the change of variables' formula and I got:

$$ f_Y(y) = \begin{cases} \cos(y) & \text{if } y??? \\ 0 & \text{otherwise} \end{cases} $$

How can I get the domain of the $f_Y(y)$?

1

There are 1 best solutions below

2
On

You have that

$$ F_Y(c)=\Pr [Y\leqslant c]=\Pr [X^2\leqslant c]=\begin{cases} \Pr [|X|\leqslant \sqrt{c}],&c\geqslant 0\\ 0,&\text{ otherwise } \end{cases} $$

Now, for $c\geqslant 0$ you have that

$$ \Pr [|X|\leqslant \sqrt{c}]=\Pr [X\in[-\sqrt{c},\sqrt{c}]]=\int_{-\sqrt{c}}^{\sqrt{c}}f_X(t)\,d t\\ \therefore\quad f_Y(c)=F'_Y(c)=\begin{cases} \frac{d}{d c}\int_{-\sqrt{c}}^{\sqrt{c}}f_X(t)\,d t,&0\leqslant c\leqslant \pi/2\\ 0,&\text{ otherwise } \end{cases} $$ because if $c>\pi/2$ then the integral $\int_{-\sqrt{c}}^{\sqrt{c}}f_X(t)\,d t$ will be constant. Then, finally, we find that

$$ \begin{align*} f_Y(c)&=\begin{cases} f_X(\sqrt{c})\frac1{2\sqrt{c}}-f_X(-\sqrt{c})\frac1{-2\sqrt{c}},&0< c\leqslant \pi/2\\ 0,&\text{ otherwise } \end{cases}\\ &=\begin{cases} \cos (c),&0< c\leqslant \pi/2\\ 0,&\text{ otherwise } \end{cases}\\ &=\mathbf{1}_{(0,\pi/2]}(c)\cos (c) \end{align*} $$

Note: observe that $F_Y$ is not differentiable at $c=0$, however it doesn't matter the value we choose for $f_Y$ at this point as it doesn't change the value of $F_Y$. In a measure theoretic setting we says that any $f_Y$ such that $F_Y(c)=\int_{-\infty }^c f_Y(t)\,d t$ is a density of $Y$. In general densities are classes of integrable functions, functions that are equal "almost everywhere" respect to the Lebesgue measure.