Answer
$a) $
$$ \rho(\theta) = \left\{
\begin{array}{ll}
\frac{1}{\pi} & 0 \le \theta \le\pi \\
0 & \text{otherwise} \\
\end{array}
\right.$$
$b) $
$$\langle \theta \rangle = \frac{\pi}{2}$$
$$\langle \theta^2 \rangle = \frac{\pi^2}{3}$$
$$\sigma = \frac{\pi}{2\sqrt{3}}$$
$c) $
$$\langle \sin(\theta) \rangle = \frac{2}{\pi} $$
$$\langle \cos(\theta) \rangle = 0 $$
$$\langle \cos^2(\theta) \rangle = \frac{1}{2}$$
Work Step by Step
$a) $
$\because \text{It is equally likely that the pin can come to rest at any}$
$\text{angle between 0 and }\pi.$
$\therefore \text{The probability density }\rho(\theta) \text{ is independent of }\theta$
$$\int_{-\infty}^{\infty}\rho(\theta)d\theta = 1$$
$$\rho(\theta) = 0 \text{ for }\theta<0 \text{ and }\theta>\pi$$
$$\therefore \int_{0}^{\pi}\rho(\theta)d\theta = 1$$
$$\therefore \rho(\theta)\int_{0}^{\pi}d\theta = 1$$
$$\rho(\theta) = \frac{1}{\pi} \text{ for } 0\le\theta\le\pi$$
$$ \therefore \rho(\theta) = \left\{
\begin{array}{ll}
\frac{1}{\pi} & 0 \le \theta \le\pi \\
0 & \text{otherwise} \\
\end{array}
\right.$$
$\text{Graph is enclosed in the image below}$
$b)$
$$\langle \theta \rangle = \int_0^{\pi} \theta \rho(\theta) d\theta$$
$$\langle \theta \rangle = \int_0^{\pi} \theta \frac{1}{\pi} d\theta$$
$$\langle \theta \rangle = \frac{1}{\pi}\left[ \frac{\theta^2}{2}\right]_0^{\pi}$$
$$\langle \theta \rangle = \frac{\pi}{2}$$
$$\langle \theta^2 \rangle = \int_0^{\pi} \theta^2 \rho(\theta) d\theta$$
$$\langle \theta^2 \rangle = \int_0^{\pi} \theta^2 \frac{1}{\pi} d\theta$$
$$\langle \theta^2 \rangle = \frac{1}{\pi}\left[ \frac{\theta^3}{3}\right]_0^{\pi}$$
$$\langle \theta^2 \rangle = \frac{\pi^2}{3}$$
$$\sigma^2 = \langle\theta^2\rangle - {\langle \theta \rangle}^2$$
$$\sigma^2 = \frac{\pi^2}{3} - {(\frac{\pi}{2})}^2$$
$$\sigma^2 = \frac{\pi^2}{3} - \frac{\pi^2}{4}$$
$$\sigma^2 = \frac{\pi^2}{12}$$
$$\sigma = \frac{\pi}{2\sqrt{3}}$$
$c)$
$$\langle \sin(\theta) \rangle = \int_0^{\pi} \sin(\theta)\rho(\theta)d\theta = \frac{1}{\pi}\left[-\cos \theta \right]_0^{\pi} = \frac{2}{\pi}$$
$$\langle \cos(\theta) \rangle = \int_0^{\pi} \cos(\theta)\rho(\theta)d\theta = \frac{1}{\pi}\left[\sin \theta \right]_0^{\pi} = 0$$
$$\langle \cos^2(\theta) \rangle = \int_0^{\pi} \cos^2(\theta)\rho(\theta)d\theta = \frac{1}{\pi}\int_0^{\pi} \left[\frac{1-\cos2\theta}{2}\right] d\theta = \frac{1}{\pi}\left[\sin \theta \right]_0^{\pi} = 0$$
$$\langle \cos^2(\theta) \rangle = \frac{1}{2}$$