A student makes repeated attempts to solve a problem. Suppose the ith attempt takes time $X_i$ , where $X_i$ are i.i.d. exponential random variables with parameter $\lambda$. Each attempt is successful with probability $p$ (independently for each attempt, and independently of the durations). Use moment generating functions to show that the distribution of the total time before the problem is solved has an exponential distribution, and find its parameter.
I found that the parameter is $p\lambda$. Does anyone have any intuition for why this should be? (if it is correct).
Moment generating functions aren't needed here. First, we need to find the distribution of the sum of $n$ i.i.d. $\mathrm{Expo}(\lambda)$ random variables. Set $S_n = \sum_{i=1}^n X_i$. For $n=1$ we have for $t>0$: $$ f_{S_1}(t) = \frac{(\lambda t)^0}{0!}\lambda e^{-\lambda t}. $$ Now, assuming that $f_{S_n}(t) = \frac{(\lambda t)^{n-1}}{(n-1)!}\lambda e^{-\lambda t}$ for some positive integer $n$, we find by convolution that \begin{align} f_{S_{n+1}}(t) &= f_{S_n}\star f_{X_1}(t)\\ &= \int_{\mathbb R} f_{S_n}(s)f_{X_1}(t-s)\ \mathsf ds\\ &= \int_0^t \frac{(\lambda s)^{n-1}}{(n-1)!}\lambda e^{-\lambda s} \lambda e^{-\lambda (t-s)}\ \mathsf ds\\ &= \lambda^2 e^{-\lambda t}\int_0^t \frac{(\lambda s)^{n-1}}{(n-1)!}\\ &= \lambda^2 e^{-\lambda t}\frac{(\lambda t)^n}{\lambda \cdot n!}\\ &= \frac{(\lambda t)^n}{n!}\lambda e^{-\lambda t}. \end{align} (This is known as the Erlang distribution.)
Let $\{B_i:i=1,2,\ldots\}$ be a sequence of i.i.d. $\mathrm{Ber}(p)$ random variables, independent of the $X_n$. Set $$ \tau = \inf\{i>0: B_i=1\}, $$ then $\tau$ has geometric distribution with parameter $p$, i.e. $$ \mathbb P(\tau = n) = (1-p)^{n-1}p,\ n=1,2,\ldots $$ Let $Y = X_\tau$, then by conditioning on $n$ we may compute the density of $Y$ for $t>0$: \begin{align} f_Y(t) &= \sum_{n=1}^\infty f_{X_1\mid\tau=n}(t)\mathbb P(\tau = n)\\ &= \sum_{n=1}^\infty\frac{(\lambda t)^{n-1}}{(n-1)!}\lambda e^{-\lambda t}(1-p)^{n-1}p\\ &= \lambda p e^{-\lambda t} \sum_{n=0}^\infty \frac{(\lambda t(1-p))^n}{n!}\\ &= \lambda p e^{-\lambda t} e^{\lambda t(1-p)}\\ &= \lambda p e^{-\lambda pt}, \end{align} and hence $Y$ has exponential distribution with parameter $\lambda p$.