Find $[E(Y^2)]$. When $Y = 3 * X - 5$ and $X$ is distributed in range $[0, 5]$ Need help with exercise.
Random variable $X$ is evenly distributed in range $[0, 5]$. Need to find $E[Y^2]$ when $Y = 3X - 5$
Every hint/tip will be appreciated.
Thank you
Alternative solution
$$E[Y^2] = E[(3X-5)^2] = E[9X^2-30X+25] = 9E[X^2]-30E[X]+25 =9(E[X]^2 + D[X]) - 30 *2.5 +25 =9*(2.5^2 + 25/12) - 75+25 = 25$$
 A: I assume that $X$ is uniformly distributed. The CDF of $X\sim\mathcal{U}(0,5)$ is
$$
F_X(x)=\Pr[X\le x]=\frac{x-0}{5-0}=\frac x5.
$$
Therefore
$$
\begin{align}
\Pr[Y\le y]&=\Pr[3X-5\le y]\\
F_Y(y)&=\Pr[3X\le y+5]\\
&=\Pr\left[X\le \frac{y+5}{3}\right]\\
&=F_X\left(\frac{y+5}{3}\right)\\
&=\frac{y+5}{15}.
\end{align}
$$
The region $0\le x<5$ is corresponding to $-5\le y<10$. Hence $Y\sim\mathcal{U}(-5,10)$. The pdf of $Y$ is
$$
f_Y(y)=\frac1{10-(-5)}=\frac1{15},
$$
then
$$
\begin{align}
\text{E}\left[Y^2\right]&=\int_{-5}^{10} y^2f_Y(y)\ dy\\
&=\frac1{15}\int_{-5}^{10} y^2\ dy\\
&=\frac1{15}\left[\frac13y^3\right]_{-5}^{10}\\
&=\frac1{45}(10^3-(-5)^3)\\
&=\Large\color{blue}{25}.
\end{align}
$$
A: It should be evident that $Y$ is uniformly distributed on $[-5,10]$ since $X$ is uniform on $[0,5]$, hence $3X$ is uniform on $[0,15]$ and thus $3X-5$ is uniform on $[-5,10]$.
Therefore $$EY^{2}=\frac{1}{15}\int_{-5}^{10}y^{2}\;dy=\Bigg[\frac{1}{15}\frac{y^{3}}{3}\Bigg]_{y=-5}^{y=10}=\frac{1}{45}(1000+125)=25.$$
Other methods:
(1) Compute directly the distribution of $Y$ or $Y^{2}$ as in the other answer.
(2) Apply the measure-theoretic change of variable formula as in the comment.
