Consider an urn containing red, blue and green balls (the situation is the same illustrated in [this](https://mathoverflow.net/q/316277/124302) post).


Let $X$ be the non-negative, integer-valued random variable defined as the number of trials (of one ball at a time, with replacement) in correspondence of which we get at least one red ball, and at least one blue ball (event $E\_X$), and $Y$ the non-negative, integer-valued random variable defined as the number of trials in correspondence of which we get at least one red ball, and at least one blue ball, and at least one green ball (event $E\_Y$).



> 
> How to evalute $P(Y-X\geq 1)$?
> 
> 
> 


My attempt:


I tried this: $P(Y-X\geq 1)=1-P(Y-X<1)=1-P(Y<X+1)$, but then I met this problem: How can it be $Y<X+1$? The event $E\_Y$ can occur only if the event $E\_X$ has already occurred, and this should have happened *at least one trial before* the occurrence of the event $E\_Y$. Does this mean that $P(Y-X\geq 1)=1$? Also this is not convincing, because it can happen that the event $E\_X$ occurred, but the event $E\_Y$ not (yet).


Thanks for your help!



A problem related to the comparison of two integer-valued random variables
As in the linked answer, for each $j=1,2,3$, let $p\_j$ denote the probability of getting a red, blue, green ball (respectively) in one trial. 
For $x=0,1,\dots$ and $j=1,2,3$, let $N\_{x,j}$ denote the number of trials with outcome $j$ among the first $x$ trials. 


Note that $X\ge2$. 
For $x=2,3,\dots$
\begin{equation}
 P(X=x<Y)=p\_{x,1}+p\_{x,2}, 
\end{equation}
where 
\begin{equation}
 p\_{x,1}:=P(N\_{x-1,1}>0,N\_{x-1,2}=0,N\_{x-1,3}=0,N\_{x,2}>0)=p\_1^{x-1}p\_2 
\end{equation}
and 
\begin{equation}
 p\_{x,2}:=P(N\_{x-1,1}=0,N\_{x-1,2}>0,N\_{x-1,3}=0,N\_{x,1}>0)=p\_2^{x-1}p\_1. 
\end{equation}
Hence,
\begin{equation}
 P(Y-X\ge1)=\sum\_{x=2}^\infty P(X=x<Y)=\frac{p\_1p\_2}{1-p\_1}+\frac{p\_1p\_2}{1-p\_2}\le p\_1+p\_2\le1, 
\end{equation}
with strict inequalities if $p\_3>0$. 


**Added in response to comment by the OP:** More generally, for $x=2,3,\dots$ and $k=0,1,\dots$, 
\begin{equation}
 P(X=x,Y>x+k)=(p\_1^{x-1}p\_2+p\_2^{x-1}p\_1)(1-p\_3)^k, 
\end{equation}
whence 
\begin{equation}
 P(Y-X>k)=\sum\_{x=2}^\infty P(X=x,Y>x+k)=\Big(\frac{p\_1p\_2}{1-p\_1}+\frac{p\_1p\_2}{1-p\_2}\Big)(1-p\_3)^k
\end{equation}
and hence 
\begin{equation}
 E(Y-X)=\sum\_{k=0}^\infty P(Y-X>k)=\Big(\frac{p\_1p\_2}{1-p\_1}+\frac{p\_1p\_2}{1-p\_2}\Big)\frac1{p\_3},
\end{equation}
which agrees with the expressions for $EX$ and $EY$ in the linked post.


