Probability density function of a Random Variable Y

density functionprobabilityprobability distributions

I'm having some troubles trying to find the PDF of the random variable

$Y=\begin{cases}
X & \mbox{if } 0\leq X\leq1\\
3-X & \mbox{if } 1\leq X\leq2\\
3 & \mbox{other case }
\end{cases}$

and i know that the PDF of $X$ is

$f_{X}(x)=\begin{cases}
\frac{1}{9}x^2 & \mbox{if } 0\leq x\leq3\\
0 & \mbox{other case }
\end{cases}$

I tried the change of variable theorem for PDF'S but $f_{Y}(y)$ doesn't satisfies the conditions of a PDF. Any help or idea will be really helpfull.

Best Answer

Just break it into the three cases. Use the transformation theorem for the first two and the third one is a discrete case.

Case 1: $Y=X, 0<X<1$. We got $s(y)=x=y$ and $\bigg|\frac{d}{dy}s(y)\bigg|=1$ so $f(y)=\frac 19 y^2,0<y<1$

Case 2: $Y=3-X, 1<X<2$ We got $s(y)=x=3-y$ and $\bigg|\frac d{dy}s(y)\bigg|=1$ so $f(y)=\frac 19(3-y)^2, 1<y<2$

Case 3: Just put $Y=3$ with probability $\int_2^3\frac 19x^2dx=\frac {19}{27}$.

Together:

$$g(y)=\begin{cases}\frac 19 y^2&:&0<y<1\\ \frac 19(3-y)^2&:&1<y<2\\\tfrac{19}{27}\delta_3(y)&:&\text{elsewhere}\end{cases}$$

with mixed discrete and continuous parts.


$\delta_3(y)$ is the dirac delta function with the property $\int_{-\infty}^\infty \delta_3(y)\mathrm d y=1$ but $\forall y~(y\neq 3\to\delta_3(y)=0)$. In a probability density function it represents that there is a massive discontinuity.

Related Question