(a) Let $X_{1}, X_{2}, \ldots$ be a sequence of independent exponential random variables, each with mean 1 . Given a positive real number $k$, let $N$ be defined by
$$
N=\min \left\{n: \sum_{i=1}^{n} X_{\imath}>k\right\}
$$
That is, $N$ is the smallest number for which the sum of the first $N$ of the $X_{i}$ is larger than $k$. Determine $\mathbf{E}[N]$.
(b) Let $X_{1}, X_{2}, \ldots$ be a sequence of independent uniform random variables on the interval $(0,1)$. Given a positive real number $k$ with $0<k<1$, let $N$ be defined by
$$
N=\min \left\{n: \prod_{i=1}^{n} X_{i}<k\right\}
$$
That is, $N$ is the smallest number for which the product of the first $N$ of the $X_{l}$ is smaller than $k$. Determine $\mathbf{E}[N]$. (Hint: You may find Exercise $8.9$ helpful.)