6 The probability density function of the continuous random variable \(X\) is given by
\(f ( x ) = \begin{cases} 2 ( 1 + a x ) & 0 \leqslant x \leqslant 1 , 0 & \text { otherwise } , \end{cases}\)
where \(a\) is a constant.
Show that \(a = - 1\).
Find the cumulative distribution function of \(X\).
Find \(\mathrm { P } ( X < 0.5 )\).
Show that \(\mathrm { E } ( X )\) is greater than the median of \(X\).