# Random variable bounded by another random variable

How to find $\Pr(z<X<Y)$ if $X$ and $Y$ are independent exponential r.v.'s with parameters $\lambda$ and $\mu$

So $x$ is bounded by $z$ and $y$, and y must be go from $z$, (and not from $0$) to infinity, I tried:

$\displaystyle\int_z^{\infty}\mu e^{-\mu y}\int_z^y\lambda e^{-\lambda x}dxdy=\int_z^{\infty}\mu e^{-\mu y}(e^{-\lambda z}-e^{-\lambda y})dy$

$\displaystyle=e^{-\lambda z}\int_z^{\infty}\mu e^{-\mu y}dy-\int_z^{\infty}\mu e^{-y(\lambda+\mu)}dy=e^{-\lambda z}(-e^{-\mu y}\bigg|_z^{\infty})-(\frac{\mu}{\lambda+\mu}e^{-(\lambda+\mu )y}\bigg|_z^{\infty}$

$\large=e^{-z(\lambda+\mu)}-\frac{\mu}{\mu+\lambda}e^{-z(\lambda+\mu)}=\frac{\lambda}{\lambda+\mu}e^{-z(\lambda+\mu)}$

Is my solution correct ?

Your result is correct. It can be done more efficiently by: $$P\left\{ z<X<Y\right\} =\int_{z}^{\infty}f_{X}\left(x\right)P\left\{ z<X<Y\mid X=x\right\} dx=\lambda\int_{z}^{\infty}e^{-\lambda x}e^{-\mu x}dx=\frac{\lambda}{\lambda+\mu}e^{-\left(\lambda+\mu\right)z}$$
• $P(z<X<Y|X=x)$ looks a bit more complicated, do you consider here only the case $\{X<Y\}$, since $x$ goes from $z$, thus $\{z<X\}$ holds automatically and use $\int_x^\infty\mu e^{-\mu y}=e^{-\mu y}$ ? Jul 30, 2014 at 13:48
• For every $x$ that satisfies $x>z$ we have $P\left\{ z<X<Y\mid X=x\right\} =P\left\{ z<x<Y\right\} =P\left\{ x<Y\right\} =e^{-\mu x}$. Jul 30, 2014 at 13:55
• One warning might be on its place: the independence of $X$ and $Y$ plays a role here. Things would have been different if e.g. $X=Y$. Jul 30, 2014 at 14:01
• Given conditions unchanged, how to compute $P(X<z<Y)$? Sep 2, 2017 at 15:41