Calculating Density Function and Conditional Expectation of Independent Exponential Random Variables

probabilityprobability distributionsrandom variablesstatistics

I am currently studying probability and statistics and I came across a problem involving exponential random variables that I'm having trouble with. I have some understanding of exponential distributions and random variables, but this particular problem has left me stumped.

Here's the problem:

Let $X$ and $Y$ be independent exponential random variables with parameters $\lambda_1$ and $\lambda_2$ respectively, where $0<\lambda_1<\lambda_2$.

(i) Calculate the density function of $X+Y$
(ii) Calculate the conditional expectation of $X$ given that $X+Y=a$, where $a>0$

My Attempt:

For the first part, I know that the sum of two independent exponential random variables follows a gamma distribution. However, I'm unsure how to apply this knowledge to find the density function of $X+Y$.

For the second part, I understand that the conditional expectation $E[X|X+Y=a]$ is the expected value of $X$ given that the sum of $X$ and $Y$ is $a$. But I'm not sure how to proceed with the calculation.

Background:

I am familiar with the basics of probability, statistics, and exponential distributions. I have previously worked with problems involving exponential random variables, but this is the first time I've encountered a problem that involves the sum of two such variables and conditional expectation.

Any help or guidance would be greatly appreciated. Thank you in advance!

Best Answer

A note on how to "derive" the convolution formula (it is not the most general version). Let $X,Y$ be independent random variables with continuous densities $f_X, f_Y$. Using conditional expectation, we get $$\mathbb P(X+Y\leq t) =\int_{\mathbb R}\mathbb P(X\leq t-y)f_Y(y)\,dy =\int_{\mathbb R}F_X(t-y)f_Y(y)\,dy.$$ One can then use Leibniz's formula for derivation of integrals and we get $$f_{X+Y}(t) =\frac{d}{dt}\mathbb P(X+Y\leq t) =\frac{d}{dt}\int_{\mathbb R}F_X(t-y)f_Y(y)\,dy\\ =\int_{\mathbb R}\Big(\frac{\partial}{\partial t}F_X(t-y)\Big)f_Y(y)\,dy =\int_{\mathbb R}f_X(t-y)f_Y(y)\,dy.$$

Now, since for exponential distribution, the density is $f(t)=\lambda \exp(-\lambda t)\mathbb 1_{t\geq0}$, we have for $t\in\mathbb R^+$ $$ \begin{align*} f_{X+Y}(t) &=\int_{\mathbb R}f_X(t-y)f_Y(y)\,dy =\lambda_1\lambda_2\int_{\mathbb R}e^{-\lambda_1(t-y)}e^{-\lambda_2y}\mathbb 1_{0\leq y\leq t}\,dy\\ &=\lambda_1\lambda_2e^{-\lambda_1 t}\int_{0}^te^{-(\lambda_2-\lambda_1)y}\,dy =\frac{\lambda_1\lambda_2}{\lambda_2-\lambda_1}\Big(e^{-\lambda_1t}-e^{-\lambda_2t}\Big)\\ &\xrightarrow{\lambda_1\rightarrow\lambda_2}\lambda^2 t\exp(-\lambda t). \end{align*}$$

Remember: The sum of two independent exponential random variables with the same parameter is Gamma-distributed. This is not the case here.


For the second exercise: You need an expression for $f_{X|X+Y=a}(x)$. But $$\begin{align*} f_{X|X+Y}(x|a) &=\frac{f_{X,X+Y}(x,a)}{f_{X+Y}(a)} =\frac{f_{X+Y,X}(a,x)}{f_X(x)}\frac{f_X(x)}{f_{X+Y}(a)}\\ &=f_{X+Y|X}(a|x)\frac{f_X(x)}{f_{X+Y}(a)} =f_{Y}(a-x)\frac{f_X(x)}{f_{X+Y}(a)}\\ &=\lambda_1\lambda_2\,\frac{e^{-\lambda_2(a-x)}\,e^{-\lambda_1 x}}{\frac{\lambda_1\lambda_2}{\lambda_2-\lambda_1}\Big(e^{-\lambda_1 a}-e^{-\lambda_2 a}\Big)}\\ &=(\lambda_2-\lambda_1)\frac{e^{-\lambda_2 a}}{e^{-\lambda_1 a}-e^{-\lambda_2 a}}e^{(\lambda_2-\lambda_1)x} \xrightarrow{\lambda_1\rightarrow\lambda_2}\frac{1}{a}. \end{align*}$$ Taking the expected value is now easy (Note, that the conditional distribution is defined on the finite interval [0,a]). We thus get $$ \begin{align*} \mathbb E(X\,|\,X+Y=a) &=\int_0^ax\,f_{X|X+Y}(x|a)\,dx\\ &=\frac{a\,e^{a\lambda_2}}{e^{a\lambda_2}-e^{a\lambda_1}}+\frac{1}{\lambda_1-\lambda_2} \xrightarrow{\lambda_1\rightarrow\lambda_2}\frac{a}{2} \end{align*}$$

Finally, the above is the general answer.

Sanity Check: For $\lambda_1=\lambda_2$, the sum is Erlang distributed, the conditional distribution ist the uniform distribution on [0,a], and the expectation thus a/2.

NOTE: I let you struggle with all integrals and the check whether the densities are actually densities. I did use wolfram alpha for most of the integration and checkup. After all, this problem is a lot more involved than i remembered...

Related Question