# Conditional expectation involving some complications around exponential random variables

Here is my problem. Consider four independent exponential distributions $X^A_1$, $X^B_1$, $X^A_2$, $X^B_2$ where $X^A_1$ and $X^B_1$ are $\exp(\lambda_1)$ and $X^A_2$ and $X^B_2$ are $\exp(\lambda_2)$.

There is another random variable $\mu$ where $\mu=\mu^G$ when $X_1=X^A_1+X^B_1 < X_2=X^A_2+X^B_2$ and $\mu=\mu^B$ otherwise.

In this setup, I'd like to calculate $E[e^{-rX_1}\mu]$.

The approach I've taken is use

$E[e^{-rX}\mu]=E[e^{-rX}\mu^G|X_1<X_2]P(X_1<X_2)+E[e^{-rX}\mu^B|X_1>X_2]P(X_1>X_2)$,

and since $X_1$ and $X_2$ follow gamma distribution with (2,$\lambda_1$) and (2,$\lambda_2$), respectively, I calculated the density function $f_Y(y)$ where $Y=X_1-X_2$. And it is easy to show

$$f_{{X_1},Y}(x_1,y)=f_{X_1}(x_1)f_{X_2}(x_1-y),$$

and from this point, I obtained the conditional density $f_{X_1}(x_1|Y=y)$ and tried to calculated the conditional expectation.

But, I ended up with having a complicated form in the integrand when calculating the conditional expectation $E[e^{-rX}\mu^G|X_1<X_2]$, and probably I could proceed further, but I'd like to ask you if there is an easier way to get $E[e^{-rX}\mu]$ without calculating all the density functions. Thank you very much!

• Yes there is. Forgetting the lambda parameters, note that $P(X_2>x)=(x+1)e^{-x}$ hence $$E(e^{-rX_1};X_2>X_1)=E(e^{-rX_1}(X_1+1)e^{-X_1})$$ and one can compute the RHS since the PDF of $X_1$ is known. Finally, $E(e^{-rX_1})$ is known for the same reason and the identity $$E(e^{-rX_1}\mu)=(\mu^G-\mu^B)E(e^{-rX_1};X_2>X_1)+\mu^BE(e^{-rX_1})$$ allows to conclude. – Did Jul 13 '15 at 22:10
• No. Be aware that $$E(X;A)=E(X\mathbf 1_A)=\int_AXdP=E(X\mid A)P(A).$$ – Did Jul 14 '15 at 8:52
• Oh I misunderstood your notation. I thought you meant conditional expectation by it. Now things are clear! – ykdec Jul 14 '15 at 15:56
• One more clarification: the first equality follows from the independence of $X_1$ and $X_2$, and so, its joint density is the product of each. Is this correct? – ykdec Jul 14 '15 at 15:59
• Yes it is.   – Did Jul 14 '15 at 16:01