# Calculate the expected value of a random variable bounded by two independent exponential random variables

Let $X$ and $Y$ be independent exponential random variables, $E[X]=5$ and $E[Y]=8$. Define a random random varible $I$ by $$I=\begin{cases} 1 \quad \text{if } X \le Y \\ 2 \quad \text{if } X > Y \end{cases}$$ What is $E[I]$? How do I calculate the mean and variance of $min(X,Y)$?

-
$\mathbf{E}I=1 \cdot P(X \leq Y) + 2 \cdot P(X>Y) = P(X-Y<0) + 2 P(X-Y)>0$ so you have to look at the distribution of RV $Z=X-Y$ –  Alex Oct 17 '12 at 3:04

Write $X \sim \mathrm{Exp}(c_1)$ and $Y \sim \mathrm{Exp}(c_2)$. From the condition, we have $c_1 = \frac{1}{5}$ and $c_2 = \frac{1}{8}$. Then by brutal force,

\begin{align*} \Bbb{P}(X \leq Y) &= \int_{0}^{\infty} \left( \int_{0}^{y} c_1 \exp\{-c_1 x\} \, dx \right) c_2 \exp\{-c_2 y\}\, dy \\ &= \int_{0}^{\infty} (1 - \exp\{-c_1 y\}) c_2 \exp\{-c_2y\}\, dy \\ &= \int_{0}^{\infty} c_2(\exp\{-c_2y\} - \exp\{-(c_1+c_2)y\}) \, dy \\ &= \left[ \exp\{-c_2 y\} - \frac{c_2}{c_1+c_2} \exp\{-(c_1+c_2)y\} \right]_{0}^{\infty} \\ &= \frac{c_1}{c_1 + c_2} = \frac{8}{13}. \end{align*}

Therefore the expectation is

$$\Bbb{E}[I] = 1 \cdot \Bbb{P}(X \leq Y) + 2 \cdot (1 - \Bbb{P}(X \leq Y)) = \frac{18}{13}.$$

In case of $\min \{ X, Y \}$, observe that

$$\Bbb{P}(\min \{ X, Y \} > t) = \Bbb{P}(X > t, Y > t) = \Bbb{P}(X > t)\Bbb{P}(Y > t) = \exp\{-c_1 t\}\exp\{-c_2 t\}.$$

Thus the CDF $F$ of $\min \{ X, Y \}$ is given by

$$F(x) = \Bbb{P}(\min \{ X, Y \} \leq x) = 1 - \exp\{-(c_1 + c_2) x\}.$$

That is, $\min \{ X, Y \}$ is an exponential random variable of parameter $c_1 + c_2$, and both the expectation and the variance follows easily.

-
$X$ and $Y$ can't have the same parameter: for $X$ it is $\frac{1}{5}$, for $Y \ \frac{1}{8}$ –  Alex Oct 17 '12 at 3:44
@Alex, I completely missed that condition. Thanks. –  Sangchul Lee Oct 17 '12 at 5:59