# Conditional Probability for Exponential Random Variables (Density Function and Distribution Function)

Let $X$ and $Y$ be random variables and let $\lambda \in (0,\infty)$. Show that, if $X$ and $Y-X$ are independent exponential random variables of parameter $\lambda$, then $Y$ has density $\lambda^2 y e^{-\lambda y}$ on $(0,\infty)$ and, for all $x \ge 0$, almost surely, $$\mathbb{P}(X \le x | Y ) = (x/Y) \land 1.$$ Show that the converse holds.

I can do the first part of the first part, ie showing the density. I'm stuck on the next part, however. If it weren't a show that, I wouldn't be stuck... just would have the wrong answer! My workings are as follows:

Let $Z = Y - X \sim \text{Exp}(\lambda)$, independent of $X \sim \text{Exp}(\lambda)$. Then $X = Y - (Y - X) = Y - Z$, so $$\mathbb{P}(X \le x | Y) = \mathbb{P}(Y-Z\le x | Y) = \mathbb{P}(Z \ge Y - x |Y) \\ = 1 - (1 - e^{-\lambda[ (Y-x) \lor 0 ]}) = e^{-\lambda[ (Y-x) \lor 0 ]} = e^{-\lambda(Y-x)} \land 1.$$

However, this is clearly wrong, since it is not the same (or really that similar, except for the minimum in there) as the thing I need to be showing that it's equal (a.s.) to! I think that the issue is the equality at the start of the second line (moving from the first to the second line).

I'd like to find the density for the random variable that is the left hand side, but I'm not sure how to do this.

I've also had an attempt at the converse, but with no luck. If someone could point me in the right direction for the first part, then hopefully that will help me to do the converse (just from having a better idea as to how to do these things).

As a final note, this is an example sheet question for my course, "Advanced Probability" -- it's in the chapter on that's mostly on conditional expectation. This question is here to help me to learn. If I just wanted the answer, I'd wait until the supervision / example class. Instead I'd like to learn from it, so please no spoilers! If I could have a couple of minor pointers, then I'd hope to be able to do the rest! Also, if anyone can think of a better title, please go ahead and change it (but please use proper capitalisation, ie title capitalisation, not sentence capitalisation, haha!).

• What is exactly $(x/Y) \land 1$ in $\mathbb{P}(X \le x | Y ) = (x/Y) \land 1$? – zoli Oct 14 '15 at 21:11
• $m \land n = \min\{m,n\}$ and $m \lor n = \max\{m,n\}$. Sorry, this is fairly standard notation, but perhaps not universal, so I should have clarified this. I'll update the question later. – Sam OT Oct 14 '15 at 22:04

Let $X$ and $Z$ be iid, $X \sim \mathcal{E}\left(\lambda\right)$ and $Z \sim \mathcal{E}\left(\lambda\right)$. Furthermore, let $Y = X + Z$.

The pdf of $Y$ at a positive argument $y$ follows as convolution: $$f_Y(y) = \int_0^y f_X\left(x\right) f_Z(y-x) \mathrm{d}x = \int_0^y \lambda \mathrm{e}^{- \lambda x} \cdot \lambda \mathrm{e}^{-\lambda \left(y-x\right)} \mathrm{d}x = \lambda^2 y \mathrm{e}^{- \lambda y}$$

We can find the joint density $f_{X,Y}\left(x,y\right)$ by considering an arbitrary bounded support positive valued function $h(x,y)$. Then $$\mathrm{E}\left(h\left(X,Y\right)\right) = \mathrm{E}\left(h\left(X,X + Z\right)\right) = \int_0^\infty \int_0^\infty h(x,x+z) f_X(x) f_Z(z) \mathrm{d}x \mathrm{d}z$$ Making a change of variable $x + z = y$: $$\mathrm{E}\left(h\left(X,Y\right)\right) = \int_0^\infty \int_x^\infty h(x,y) f_X(x) f_Z(y-x) \mathrm{d}x \mathrm{d}y$$ and interchanging the order of integration, warranted by Tonelli's theorem: $$\mathrm{E}\left(h\left(X,Y\right)\right) = \int_0^\infty \int_0^x h(x,y) f_X(x) f_Z(y-x) \mathrm{d}y \mathrm{d}x$$ Hence $$f_{X,Y}\left(x,y\right) = \begin{cases} f_{X}\left(x\right) f_Z\left(y-x\right) & y > x > 0\cr 0 & \mathrm{otherwise} \end{cases} = \begin{cases} \lambda^2 \exp\left(-\lambda y\right) & y > x > 0\cr 0 & \mathrm{otherwise} \end{cases}$$

Therefore, the conditional density $f_{X\mid Y}\left(x \mid y\right)$ for $y>0$: $$f_{X\mid Y}\left(x \mid y\right) = \frac{f_{X,Y}\left(x,y\right)}{f_Y\left(y\right)} = \begin{cases} 1/y & y > x > 0\cr 0 & \mathrm{otherwise} \end{cases}$$ That is for $x > 0$ $$\Pr\left(X \leqslant x \mid Y=y\right) = F_{X \mid Y}\left(x \mid y\right) = \int_0^x f_{X\mid Y}\left(u \mid y\right) \mathrm{d}u = \begin{cases} x/y & y > x > 0\cr 0 & x \leqslant 0 \cr 1 & x \geqslant y \end{cases}$$

Now to the converse.

Clearly $(X, X+Z) \stackrel{d}{=} \left(U Y, Y\right)$, where $U$ is standard uniform random variable, independent of $Y$. Hence we need to show that $(X, Z) \stackrel{d}{=} \left(U Y, \left(1-U\right) Y \right)$ are independent and identically distributed.

For $x>0$ and $z>0$ $$F^c_{X,Z}\left(x,z\right) = \Pr\left(U Y > x, (1-U)Y > z \right) = \Pr \left( Y > x + z, x < U Y < Y - z \right)$$ Using the law of total expectation: $$\begin{eqnarray} F^c_{X,Z}\left(x,z\right) &=& \mathbb{E}\left( \Pr\left(Y > x + z, x < U Y < Y - z \mid Y \right) \right) \\ &=& \mathbb{E}\left( [ Y > x + z ] \left(\frac{Y-z}{Y} - \frac{x}{Y}\right) \right) \\ &=& \int_{x+z}^\infty \left(1-\frac{x+z}{y}\right) f_Y\left(y\right) \mathrm{d}y \\ &=& \int_{x+z}^\infty \left(1-\frac{x+z}{y}\right)\lambda^2 y \mathrm{e}^{-\lambda y} \mathrm{d}y \\ &=& \lambda^2 \int_{x+z}^\infty \left(y-x-z\right) \mathrm{e}^{-\lambda y} \mathrm{d}y = \exp\left(-\lambda x\right) \cdot \exp\left(-\lambda z\right) \end{eqnarray}$$ Hence the pdf $$f_{X,Z}\left(x,z\right) = \frac{\partial^2}{\partial x\partial z} F^c_{X,Z}\left(x,z\right) = \left(\lambda \mathrm{e}^{-\lambda x} 1_{x > 0}\right) \cdot \left(\lambda \mathrm{e}^{-\lambda z} 1_{z > 0}\right)$$ that is $X$ and $Z$ are iid from $\mathcal{E}\left(\lambda\right)$.

• I understand the first way, thank you. As to the converse, you first "clearly" statement I have no idea about. Obviously $Y = X + Z$ (by definition), so that's fine, but I have no idea why $X$ and $UY$ have the same distribution. (I realise that it's a joint distribution, but since $Y$ actually equals $X+Z$, I think we need $X$ and $UY$ to have the same distribution?) – Sam OT Oct 15 '15 at 14:13
• Because we showed that $X \mid Y$ is uniform, right? That means that $X$ and $U Y$ are equal in law. – Sasha Oct 15 '15 at 14:37
• Ah, of course; this bit, yeah? $$f_{X\mid Y}\left(x \mid y\right) = \frac{f_{X,Y}\left(x,y\right)}{f_Y\left(y\right)} = \begin{cases} 1/y & y > x > 0\cr 0 & \mathrm{otherwise} \end{cases}$$ I didn't actually realise that saying $X \mid Y$ is uniform means that $X =^d UY$. Just to make sure that I'm 100% on that, I'll show it explicitly. – Sam OT Oct 15 '15 at 14:42
• Finally, by $U$ is uniform, what set are you meaning for it to be on? Would it be $U \sim \text{Uni}(0,Y)$.? – Sam OT Oct 15 '15 at 14:48
• Actually, that can't be right as you've said that it's independent of $Y$... – Sam OT Oct 15 '15 at 15:04