Consider an urn containing red, blue and green balls (the situation is the same illustrated in this 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!

  • 1
    $\begingroup$ Suppose the first ball drawn is green, the second is red, and the third is blue. Then $X=Y=3$. So no, it is not the case that $P(Y-X\geq 1)=1$. More generally, $X<Y$ if the first green ball drawn comes when a red ball and a blue ball have already been drawn, and otherwise $X=Y$. I would suggest that math.stackexchange.com is a better place than mathoverflow for sorting out this kind of difficulty. $\endgroup$ – James Martin Dec 4 '18 at 10:45
  • $\begingroup$ @JamesMartin I see. Thank you for your answer. Any suggestion how to evaluate $P(Y-X\geq 1)$ ? $\endgroup$ – Andrea Prunotto Dec 4 '18 at 11:46

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.

  • $\begingroup$ Thanks a lot Iosif! Your answer, and the explicit calculations are really helpful! $\endgroup$ – Andrea Prunotto Dec 4 '18 at 14:41
  • $\begingroup$ I wonder if it possible to put somehow together this post and the linked one: the aim would be to find $E[Y-X]=\sum_{k=?}^{\infty}P(Y-K>k)=E[Y]-E[X]$, where the latter terms are the ones you showed in the previous post. The relation $E[Y-X]=E[Y]-E[X]$ should hold for the linearity of the expected value. What do you think? $\endgroup$ – Andrea Prunotto Dec 5 '18 at 5:39
  • $\begingroup$ By the way, it is really surprising to me that $P(Y-X\geq 1)$ does not depend on $p_3$, i .e. on the number of green balls! $\endgroup$ – Andrea Prunotto Dec 5 '18 at 6:03
  • 1
    $\begingroup$ (i) I have added the expression for $P(Y-X>k)$ and the corresponding expression for $E(Y-X)$. (ii) I would not say that $P(Y-X\ge1)$ does not depend on $p_3$, since it depends on $p_1,p_2$, whereas $p_3=1-p_1-p_2$. $\endgroup$ – Iosif Pinelis Dec 5 '18 at 16:41
  • $\begingroup$ I see. Wonderful. Thanks a lot, again! Everything works now! $\endgroup$ – Andrea Prunotto Dec 5 '18 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.