I have a random variable, X, with pdf f(x)=1/4 for $-1<x<3$. My new random variable, Y, is Y = X^2. I have computed the pdf of Y, f(y)=1/(4sqrt(y)). The range for Y should be $0<y<9$, but when I integrate the pdf of Y over this range, I get 1.5 which is greater than 1. What am I doing wrong? Shouldn't the area under the pdf curve give the total probability within the given interval? If the entire range for y is 0 to 9, then if I integrate over this range, then I should get a probability=1...
PDF of a function of a random variable integrates to 1.5 instead of 1
56 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
Your transformation folds the support of $X : \color{blue}{[-1;0)\cup[0;1]}\cup(1;3]$ onto the support for $X^2 : \color{blue}{[0;1]}\cup(1;9]$. Intuitively speaking the first part of the destination receives contribution from two parts of the source, while the second part receives only one part of the source.
Thus since for all $y\in(1;9]$ we have $f_{X}(-\sqrt{y})=0$ then $$\begin{align}f_{X^2}(y) ~&=~ \dfrac 1{2\sqrt{y}}f_X(-\sqrt y)\mathbf 1_{y\in[0;9]}+\dfrac 1{2\sqrt{y}}f_X(+\sqrt{y})\mathbf 1_{y\in[0;9]}\\[1ex] &=~ \dfrac 1{2\sqrt{y}}f_X(-\sqrt y)\mathbf 1_{y\in(0;1]}+\dfrac 1{2\sqrt{y}}f_X(+\sqrt{y})\mathbf 1_{y\in[0;1]}+\dfrac 1{2\sqrt{y}}f_X(\sqrt{y})\mathbf 1_{y\in(1;9]}+0\\[1ex] &=~ \frac 1{4\sqrt y} \mathbf 1_{y\in(0;1]}+\frac 1{8\sqrt y}\mathbf 1_{y\in (1;9]\cup\{0\}}\end{align}$$
The range for $Y$ is indeed the interval $[0,9]$.
If $x \in [0,1]$ then
\begin{align} \mathbb{P}[Y\leq x] &= \mathbb{P}[X^2\leq x] \\ &= \mathbb{P}[-\sqrt{x}\leq X\leq\sqrt{x}] \\ &= \frac{\sqrt{x}}{2} \end{align}
If $x\in[1,9]$ then \begin{align} \mathbb{P}[Y\leq x] &= \mathbb{P}[X^2\leq x] \\ &= \mathbb{P}[-\sqrt{x}\leq X\leq\sqrt{x}] \\ &= \mathbb{P}[-1\leq X\leq\sqrt{x}] \\ &= \frac{\sqrt{x}+1}{4} \end{align}
Hence by differentiating we obtain $$ f_Y(x) = \begin{cases} 0,&x<0,\\\frac{1}{4\sqrt{x}},&0<x<1,\\\frac{1}{8\sqrt{x}},&1<x<9,\\0,&x>9\end{cases} $$
Integrating $f_Y$ does give $1$ as it should.