I have a random variable, X, with pdf f(x)=1/4 for $-1
PDF of a function of a random variable integrates to 1.5 instead of 1
-
0Did you leave out the rest of this question? – 2017-02-28
-
1@MarkFischler: He tried to write inequalities without using MathJax, and the Markdown parser ate most of the question. – 2017-02-28
-
2OP, even by a cursory glance _something_ must be wrong with your PDF for $Y$ -- the probability density ought to drop suddenly by a factor of $2$ at $Y=1$, because at $Y>1$ there will be no contribution from the squares of negative $X$s anymore. – 2017-02-28
2 Answers
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
Integrating $f_Y$ does give $1$ as it should.
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}$$