# Distribution of a Random variable bounded by another random variable

Suppose that $X$ and $Y$ are independent exponential r.v.'s with parameters $\lambda$ and $\mu$. If $X$ is bounded by $Y$, how do I find the expression of $P(X<x)$?

Regarding this question, I have some doubts on the format of the probability. I can take it as a conditional probability $P(X<x|X<Y)=\frac{P(X<x\,\cap\, X<Y)}{P(X<Y)}$. In this case, how to compute $P(X<x\cap X<Y)$?

On the other hand, I think I can also write as $P(X<Y<x)$ (or some other forms?), which one is correct? If this one is correct, then how to compute it?

Edit 1: adding the background of the question.

Assume there are $N+1$ objects, and each object has an arrival process. The first $N$ of them arrive with rate $\lambda_i,~i=\{1,2,...,N\}$, and the last one arrive with rate $\mu$. Let $X_i$ denote the inter-arrival times of the first $N$ objects, and let $Y$ denote the inter-arrival time for the $N+1$-th object. All the inter-arrival times are exponentially distributed.

Question: think of the situation that there are at least $C$ distinct ($C$ is a constant) objects arrive before the $N+1$-th object arrives. If this case happens, find the shortest time duration $\tau$, during which exactly $C$ distinct objects arrive.

Extra info: By definition, $\tau$ is a random variable, but current research has verified that it can be regarded as a constant.

My analysis: for an object $i$ that belongs to the $C$ objects, its inter-arrival time $X_i$ must be smaller than $Y$, and I need to find out its distribution function $F_i(x)=P_i(X_i<x|X_i<Y)$ (which must be different from its original distribution function). Then define an indicator function $I_i$, $I_i=1$ if $X_i$ is smaller than $\tau$, otherwise $I_i=0$, so we have $\sum_{i=1}^N I_i=C$. Taking average on both sides, we get $\sum_{i=1}^N E[I_i]=\sum_{i=1}^N P(X_i<\tau|X_i<Y) = C$. If I have the expression for $P(X_i<\tau|X_i<Y) = C$, maybe I can get $\tau$.

Note that the above analysis uses the memoryless property of a Poisson process. Please correct me if I am wrong.

• @drhab Do you mind take a look? Sep 3, 2017 at 9:08
• There is something unclear. You know $X \sim \mathrm{Exp}(\lambda)$, $Y \sim \mathrm{Exp}(\mu)$, and $X \perp Y$. Is it possible that $X<Y$? (At the end you should write $P(X<\min(Y,x))$.) Sep 3, 2017 at 9:15
• @PaoloLeonetti I have the same condition as this question, math.stackexchange.com/questions/882579/… Perhaps I should say "when $X$ is smaller than $Y$, ..."? Sep 3, 2017 at 9:28
• That question is different. It assumes that $X\perp Y$ and ask $P(x<X<Y)$. Here, instead, you assume $X\perp Y$ and $P(X<Y)=1$. Sep 3, 2017 at 9:31
• @PaoloLeonetti Yes, you are right. I need to edit the question. Sep 3, 2017 at 9:32

$$P(X<Y,X>x)=\int_x^\infty P(Y>t)\lambda e^{-\lambda t}\mathrm dt\\ =\int_x^\infty e^{-\mu t}\lambda e^{-\lambda t}\mathrm dt=\frac{\lambda}{\lambda+\mu}e^{-(\lambda+\mu)x}.$$ And $$P(X<Y)=\int_{0}^\infty P(Y>t)\lambda e^{-\lambda t}\mathrm dt=\frac{\lambda}{\lambda+\mu},$$ hence: $$P(X>x|X<Y)=e^{-(\lambda+\mu)x}.$$

Another way of looking at the problem is based on the fact that the exponential probability distribution is memoryless, meaning that: $$P(X>y|X>x)=P(X>y-x) 1(y-x\geq 0)+1(y-x< 0) \\=e^{-\lambda(y-x)}1(y-x\geq 0)+1(y-x< 0).$$ So $$P(X>Y|X>x)=E(e^{-\lambda(Y-x)}1(Y-x\geq 0)+1(Y-x< 0))\\ =(1-e^{-\mu x})+e^{\lambda x}\int_x e^{-\lambda t}\mu e^{-\mu t}\mathrm dt\\ =1-\frac{\lambda}{\lambda+\mu}e^{-\mu x}.$$ Using this you can again arrive at the same result.

• By the first method, I can get that $P(X<x|X<Y)=1-e^{-(\lambda+\mu)x}$. But I cannot derive this through your second method. Sep 3, 2017 at 11:52
• In the second method, you get $P(Y>X|X>x)=1-P(X>Y|X>x)$. So $P(X<Y|X>x)=\frac{\lambda}{\lambda+\mu}e^{-\mu x}$. See that $P(X>x)=e^{-\lambda x}$. Use both of them to get the exact expression as the first method. Sep 3, 2017 at 12:07
• Would you please take a look at my follow-up question: math.stackexchange.com/questions/2416284/… Sep 4, 2017 at 12:02

Not an answer but too much for a comment.

$P(X<x)$ is an expression for the probability that $X<x$, period!

It is a real number in $[0,1]$ and completely unsensitive for circumstantial conditions. The formulation "If $X$ is bounded by $Y$" gives the impression that you are after the probability that $X<x$ under condition that $X<Y$.

If so then - as you stated allready - you are after $P(X<x\mid X<Y)$ which asks for calculation of $P(X<x\wedge X<Y)$ and $P(X<Y)$.

The expression $P(X<Y<x)$ stands for something different. In the first place you are not working under the condition $X<Y$ anymore (it wipes away the words "if $X$ is bounded by $Y$") and secondly next to $X<Y$ you are also demanding that $Y<x$ (so that consequently also $X<x$).

Main question: conditional or not? Can you clarify (e.g. by saying something about the source of the problem)?

• I bet the question would be just "Evaluate $P(X<\min(x,Y))$", which is what has been done by Arash. Sep 3, 2017 at 9:34
• @PaoloLeonetti From earlyer interaction with the OP I concluded that the OP does not know himself what he is after. Also he is most probably unfamiliar with $\perp$ in this context. Sep 3, 2017 at 9:40
• I have added the background of the question, please take a look. I also provided my own analysis, where $X<Y$ is used as a condition, but I am not sure if it is correct.Thanks for your kind help. Sep 3, 2017 at 10:26