[Math] Expectation of a sum of independent and identical exponential variables

conditional probabilityprobability

Suppose $c>0$. Let $X_i$ be independently and identically distributed exponential variables with parameter $\lambda >0$ and $$S_n=\sum_{i=1}^n X_i.$$ Let $I=\min \{i: X_i >c\}$. How do I show that
$\mathbb{E} [S_{I-1}+c] = \dfrac{e^{\lambda c} -1}{\lambda}$?

I started as:

$S_{I-1}$ follows a Gamma distribution with parameters $(I-1,\lambda)$, where if a random variable $X$ follows a Gamma distribution with parameters $n$ and rate $\lambda$, then
$$f(x)= e^{-\lambda x}\dfrac{{\lambda}^n x^{n-1}}{(n-1)!}.$$

Then I conditioned as follows:

$$\mathbb{E}[S_{I-1}]=\sum_{i=1}^{\infty} \mathbb{E}[S_{I-1}\mid I=i]\mathbb{P}(I=i).$$

Here I'm wondering whether I should sum from $i=2$ instead!

Anyway, I obtained $\mathbb{P}(I=i)=(1-e^{-\lambda c})^{i-1}e^{-\lambda c}$ as $$\mathbb{P}(I=i)=\mathbb{P}(X_1<c, X_2<c, \dots, X_{i-1}<c, X_i>c).$$

I have doubts here also because the way I did it I obtained $\mathbb{E}[S_{I-1}]=\dfrac{e^{\lambda c} -1}{\lambda}$, which is wrong.

Best Answer

You are correct in your assertion that $I$ is a geometric random variable with parameter $e^{-\lambda c}$ and hence expected value $e^{\lambda c}$. But, given the value of $I$, all the $X_i, 1 \leq i < I$, are known to have value $\leq c$, and therefore each such $X_i$ has conditional marginal density function $$f_{X_i \mid I}(x) = \begin{cases}\frac{\lambda e^{-\lambda x}}{1-e^{-\lambda c}}, &0 \leq x \leq c,\\\quad\\ 0,&\text{otherwise}\end{cases}$$ which is just the truncation (and normalization) of the exponential density to the interval $[0,c]$. Hence, the conditional mean is $$\begin{align} E[X_i\mid I] &= \int_0^c \frac{x\lambda e^{-\lambda x}}{1-e^{-\lambda c}}\,\mathrm dx = \frac{1}{1-e^{-\lambda c}}\int_0^cx\lambda e^{-\lambda x} \,\mathrm dx\\ &= \left.\left.\frac{1}{1-e^{-\lambda c}}\right[-xe^{-\lambda x}\biggr|_0^c + \int_0^c e^{-\lambda x} \,\mathrm dx\right]\\ &= \left.\left.\frac{1}{1-e^{-\lambda c}}\right[-ce^{-\lambda c} + \left.\left.\frac{1}{\lambda}\right(1- e^{-\lambda c} \right)\right]\\ &= \frac{1}{\lambda}-\frac{c}{e^{\lambda c}-1} \end{align}$$ which gives $$E[S_{I-1}\mid I] = E\left[\sum_{i=1}^{I-1}X_i\right] = (I-1)\left[\frac{1}{\lambda}-\frac{c}{e^{\lambda c}-1}\right]$$ and $$E[S_{I-1}] = E\left[E[S_{I-1}\mid I]\right] = (e^{\lambda c}-1)\left[\frac{1}{\lambda}-\frac{c}{e^{\lambda c}-1}\right] = \frac{e^{\lambda c}-1}{\lambda} - c.$$

Related Question