5 The continuous random variable \(X\) has a triangular distribution with probability density function given by
$$f ( x ) = \left\{ \begin{array} { l r }
1 + x & - 1 \leqslant x \leqslant 0
1 - x & 0 \leqslant x \leqslant 1
0 & \text { otherwise }
\end{array} \right.$$
- Show that, for \(0 \leqslant a \leqslant 1\),
$$\mathrm { P } ( | X | \leqslant a ) = 2 a - a ^ { 2 } .$$
The random variable \(Y\) is given by \(Y = X ^ { 2 }\).
- Express \(\mathrm { P } ( Y \leqslant y )\) in terms of \(y\), for \(0 \leqslant y \leqslant 1\), and hence show that the probability density function of \(Y\) is given by
$$g ( y ) = \frac { 1 } { \sqrt { } y } - 1 , \quad \text { for } 0 < y \leqslant 1 .$$
- Use the probability density function of \(Y\) to find \(\mathrm { E } ( Y )\), and show how the value of \(\mathrm { E } ( Y )\) may also be obtained directly using the probability density function of \(X\).
- Find \(\mathrm { E } ( \sqrt { } Y )\).