Obtain $P\left( \sum_{i=1}^{k} Y_{i}Given that $X$ is an exponential random variable with parameter $\lambda$ and $ Y_{i}$ are independent and identically distributed exponential random variables with parameter $\beta$. Given that X and $ Y_{i}$ are also independent, I want to obtain $$P\left( \sum_{i=1}^{k}  Y_{i}<X<\sum_{i=1}^{k+1} Y_{i}\right)$$
What I know is that the sum of independent exponential distributions follows a Gamma distribution. I tried to go from there and do conditional expectations to find the probability but I got stuck.
Any suggestions??
 A: Conidtion on the $Y_i$'s. The required probability is  $E(P(X<\sum\limits_{i=1}^{k+1}Y_i|(Y_i))-P(X<\sum\limits_{i=1}^{k}Y_i)|(Y_i))=E[e^{-\lambda\sum\limits_{i=1}^{k}Y_i} (1-e^{-\lambda Y_{k+1}})]$. You know the distributios of $Y_{K+1}$ and $\sum\limits_{i=1}^{k}Y_i$ and these two r.v.'s are independent. Can you finish?
A: The first thing would be to condition on $X$. Then we need to evaluate
$$P(S_{k+1} \ge x) - P(S_k \ge x)$$
for any real number $x$. While you could proceed to directly evaluate this, a nice shortcut would be to observe that this is the same as a Poisson process $N(t)$, with parameter $\beta$, equal to $k$ for $t=x$. Therefore we have
$$P(S_{k+1} \ge x) - P(S_k \ge x) = P(N(x) = k) = \frac{(\beta x)^ke^{-\beta x}}{k!}$$
At this stage, you would want to evaluate an integral
$$\int_{x=0}^\infty\frac{(\beta x)^ke^{-\beta x}}{k!}\lambda e^{-\lambda x}dx = \lambda\frac{\beta^k}{k!}\int_{x=0}^\infty x^ke^{-(\beta + \lambda) x} dx$$.
From here you could use integration by parts, obtain a recursion etc. Or you could read off the kth moment of exponential distribution with parameter $\beta + \lambda$ and use that to get your answer.
