[tex]f_X(x)=\begin{cases}0.5\sin x&\text{for }0\le x\le\pi\\0&\text{otherwise}\end{cases}[/tex]
a. The mean of [tex]X[/tex] is
[tex]E[X]=\displaystyle\int_{-\infty}^\infty xf_X(x)\,\mathrm dx=\frac12\int_0^\pi x\sin x\,\mathrm dx=\frac\pi2[/tex]
Recall that the variance of a random variable [tex]X[/tex] is
[tex]\mathrm{Var}[X]=E[(X-E[X])^2]=E[X^2]-E[X]^2[/tex]
We have
[tex]E[X^2]=\displaystyle\int_{-\infty}^\infty x^2f_X(x)\,\mathrm dx=\frac12\int_0^\pi x^2\sin x\,\mathrm dx=\frac{\pi^2-4}2[/tex]
so that
[tex]\mathrm{Var}[X]=\dfrac{\pi^2-4}2-\dfrac{\pi^2}4=\dfrac{\pi^2-8}4[/tex]
and the standard deviation is
[tex]\sqrt{\mathrm{Var}[X]}=\dfrac{\sqrt{\pi^2-8}}2[/tex]
b.
[tex]X=0\implies Y=-\dfrac{\pi^3}8[/tex]
[tex]X=\pi\implies Y=\pi+\dfrac{\pi^3}8[/tex]