2 The continuous random variable \(X\) takes values in the interval \(0 \leqslant x \leqslant 3\) only with probability density function f . The graph of \(y = \mathrm { f } ( x )\) consists of the two line segments shown in the diagram.
\includegraphics[max width=\textwidth, alt={}, center]{4a6d94a2-66e1-449a-ac0e-1fbada74bb3b-2_524_1287_950_429}
- Show that \(a = \frac { 2 } { 3 }\).
- Find the equations of the two line segments.
- Hence write down the probability density function of \(X\).
- Find \(\mathrm { E } ( X )\).