7 A random variable \(X\) has probability density function given by
$$f ( x ) = \begin{cases} \frac { k } { x } & 1 \leqslant x \leqslant a
0 & \text { otherwise } \end{cases}$$
where \(k\) and \(a\) are positive constants.
- Show that \(k = \frac { 1 } { \ln a }\).
- Find \(\mathrm { E } ( X )\) in terms of \(a\).
- Find the median of \(X\) in terms of \(a\).