Is this correct for deriving conditional density?

36 Views Asked by At

Let $X_1, X_2$ be i.i.d. distributed random variables with densities

\begin{align*} f_{X_1}(x_1) &= e^{-x_1} \\ f_{X_2}(x_2) &= e^{-x_2} \end{align*}

Derive the conditional density of $X_1$ given $X_1 + X_2 = y$.

Here's my attempt at a solution:

\begin{align*} f_{(X_1 | X_1 + X_2)}(x|y) &= \frac{f_{(X_1 , X_1 + X_2)}(x,y)}{f_{X_1+X_2}(y)} \\ &= \frac{f_{X_1}(x) f_{X_2}(y-x)}{f_{X_1+X_2}(y)} \\ &= \frac{f_{X_1}(x) f_{X_2}(y-x)}{\int_0^yf_{X_1}(x) f_{X_2}(y-x) dx} \\ &= \frac{e^{-x} e^{-y+x}}{\int_0^y e^{-x} e^{-y+x} dx} \\ &= \frac{1}{\int_0^y dx} \\ &= \frac{1}{y} , y>0\\ \end{align*}

Is this correct?

2

There are 2 best solutions below

2
On

HINT

It can't be what you say at the end since that is not normalized. Your work is mostly right, but you missed a restriction on $x.$

0
On

Affirming spaceisdarkgreen's answer, you are mostly correct, bar some issues with support bounds.

If $X_1,X_2\overset{iid}\sim\mathcal {Exp}(1)$ then their pdf are: $f_{X_1}(x)~=~f_{X_2}(x)~=~e^{-x}\,\mathbf 1_{0\leq x}$.

From that almost everything you wrote follows okay with just a bit of fine tuning.

$$\begin{align}f_{X_1\mid X_1+X_2}(x\mid y) ~&=~\dfrac{f_{X_1}(x)~f_{X_2}(y-x)}{\int_\Bbb R f_{X_1}(s)~f_{X_2}(y-s)\operatorname d s} \\[1ex] &=~\dfrac{e^{-x}\;e^{-y+x}\;\mathbf 1_{(0\leq x)\wedge(0\leq y-x)}}{\int_0^y e^{-s}e^{-y+s}\operatorname d s} \\[3ex]\therefore\quad f_{X_1\mid X_1+X_2}(x\mid y)~&=~\tfrac 1y\mathbf 1_{0\leq x\leq y} \end{align}$$

From which we conclude that the conditional distribution is uniform;$$X_1\mid X_1{+}X_2~\sim~\mathcal U[0;X_1+X_2]$$Which is a fairly classic result that follows for any two independent and identically exponential-distributed random variables with any rate parameter.