6 A function f is defined by
$$f ( x ) = \begin{cases} \frac { 3 x ^ { 2 } } { a ^ { 3 } } & 0 \leqslant x \leqslant a
0 & \text { otherwise } \end{cases}$$
where \(a\) is a constant.
- Show that f is a probability density function for all positive values of \(a\).
The random variable \(X\) has probability density function f and the median of \(X\) is 2 . - Show that \(a = 2.52\), correct to 3 significant figures.
- Find \(\mathrm { E } ( X )\).