# What is the probability that some event happens before another event?

In the previous question I asked the $\mathbb{P}(X < Y )$ where $X$ is the number of rolls(two dice) it takes to roll a sum of 3 and $Y$ is the the number of rolls it takes to roll a sum of 5. The probability was $\frac{\mathbb{P}(X)}{\mathbb{P}(X)+\mathbb{P}(Y)} = \frac{(2/36)}{(4/36+2/36)} = \frac{1}{3}$. I am not sure why you divide though by $\mathbb{P}(X)$ or $\mathbb{P}(Y)$. Can some one explain this to me intuitively?

-
The probability on 66996 cannot have been P(X)/P(X+Y) since P(X) and P(X+Y) have no meaning (or you should explain which). – Did Sep 26 '11 at 21:06
It's $P(X)+P(Y)$, and I just edited the question to fix it. Although there's still some notational confusion left. – Ilmari Karonen Sep 26 '11 at 21:12
@lord12 Did you read Michael Hardy's answer to your previous question? I thought it was very clear. I do not have the necessary reputation to vote to close, but I think this question should be closed as already having been answered. – Dilip Sarwate Sep 26 '11 at 21:17
You say that P(X+Y)=P(X)+P(Y)... but what is P(X), for example? – Did Sep 26 '11 at 21:18
I don't understand why P(roll a 3 before 5) = Pr(roll a 3|you have rolled a 3 or a 5) since if you have rolled a 5 you are done and you are calculating the probability of of rolling a 3 after a you have rolled a 5. – lord12 Sep 26 '11 at 21:24

## 3 Answers

Let $\mathrm P(n)$ denote the probability that a single die roll gives the result $n$.

Consider the first time a $3$ or a $5$ is rolled. The probability that the result of that roll is $3$, given that we know it's either $3$ or $5$, is $\mathrm P(3)$ out of $\mathrm P(3) + \mathrm P(5)$ — that is to say, $\frac{\mathrm P(3)}{\mathrm P(3) + \mathrm P(5)}$.

There's some notational confusion involved in your question, perhaps prompted by a slight abuse of notation in Thijs Laarhoven's answer to the earlier question. By convention, $\mathrm P(Q)$ (sometimes written as $\mathrm P[Q]$ or $\mathrm{Pr}[Q]$ or in various similar ways by different authors) denotes that probability that the event $Q$ occurs. An event is something that either happens or not, such as "$X < Y$" (where $X$ and $Y$ are random variables) or "the result of the die roll is $3$". An event is not the same as a random variable; in particular, if $X$ is a random variable, the expression $\mathrm P(X)$ is meaningless.

The slight abuse of notation I alluded to is that Thijs was, in effect, using "$3$" as a shorthand for the event "the result of the die roll is $3$" in the expression $\mathrm P(3)$. (I used the same notation in the first part of my answer above.)

A more correct way to express the answer might be to let $N$ be a random variable denoting the outcome of a single die roll. Then the conditional probability that $N = 3$, given that $N \in \{3,5\}$, is

$$\mathrm P(N = 3 \,|\, N \in \{3,5\}) = \frac{\mathrm P(N = 3)}{\mathrm P(N \in \{3,5\})} = \frac{\mathrm P(N = 3)}{\mathrm P(N = 3) + \mathrm P(N = 5)}.$$

In particular, this equals the probability that the first die roll which is either a $3$ or a $5$ is, in fact, a $3$.

-
Thanks for the clarification. I thought the conditional probability was interpreted "Given you have rolled a 3 or a 5 in your previous roll, what is the probability that you have rolled a 3 on this roll". I misinterpreted it as two events happening at different times. – lord12 Sep 26 '11 at 22:03
+1 for the explanations about notations. – Did Sep 27 '11 at 16:08

Imagine you throw a coin on one hand and a dice on the other hand simultaneously. You want to know what is going to happen first: Will you get a head (on the coin) first or will you get a 6 first (on the dice). Intuitively you would say that it is probably easier to get a head first than a 6, because the probability of getting a head is a half but getting a 6 is a sixth. The probability of getting a 6 and a head is 1/2 + 1/6. The probability that you get a head before the 6 is a fraction of that previous probability of getting both, namely (1/2)/[1/2 + 1/6] and similarly the probability of getting a 6 before a head is a fraction of the previous quantity, namely (1/6)/[1/2 + 1/6]. When you add both together, you get 1, because either you get a head first or a 6 first. Hope this is clear.

-
Do you mean the probability of getting a 6 **or** a head is 1/2 + 1/6? – Adina G Jan 15 '13 at 18:59

I believe that the question you asked is a bit different from the question answered. The question you asked was "If $X$ is the number of rolls to get a $3$ and $Y$ is the number of rolls to get a $5$, what is the probability that $X<Y$?"

$P(X=k)=(2/36)(34/36)^{k-1}$ (don't roll a $3$ on the first $k-1$ rolls, then roll a $3$) and $P(Y>k)=(32/36)^k$ (don't roll a $5$ on the first $k$ rolls), so \begin{align} P(X<Y) &=\sum_{k=1}^\infty P(X=k)P(Y>k)\\ &=\sum_{k=1}^\infty(2/36)(34/36)^{k-1}(32/36)^k\\ &=(2/36)(32/36)\sum_{k=0}^\infty(34/36)^k(32/36)^k\\ &=64/1296\frac{1}{1-(34/36)(32/36)}\\ &=4/13 \end{align} The question which was answered was "what is the probability that a $3$ is rolled before a $5$?" That is, "ignoring all other rolls, what is the probability of rolling a $3$ instead of a $5$?". Since the probability of rolling a $3$ is $2/36$ and the probability of rolling a $5$ is $4/36$, the probability of rolling one or the other is $6/36$, and of that event, $2/36$ is rolling the $3$. Thus, given that we rolled either a $3$ or a $5$, the probability that we rolled a $3$ would be $(2/36)/(6/36)=1/3$.

The first answer $(4/13)$ is smaller than $1/3$ since there is a chance that $X=Y$. Performing a similar calculation, we get $P(X=Y)=1/26$. Thus, $P(X\le Y)=9/26$, a bit above $1/3$.

-
Since the events $\{X = k\}$, $k = 1,2, \ldots$ are mutually exclusive events whose union is the sample space, the calculation of $P(X < Y)$ looks suspiciously like a law of total probability calculation. So, instead of $P(Y > k)$, one should use the conditional probability $P(Y > k \mid X = k)$ which is not $(32/36)^k$. Given $X = k$, $3$ did not occur on the first $k-1$ trials but did occur on the $k$-th trial, and so $P(Y > k \mid X = k) = (30/34)^{k-1}$ and $P(X>Y) = \sum_k (2/36)(34/36)^{k-1}(30/34)^{k-1} = \sum_k (2/36)(30/36)^{k-1}$ exactly as in the usual calculation. – Dilip Sarwate Sep 27 '11 at 0:36
@Dilip: $X$ :Roll a pair of dice until you get a $3$ and count how many rolls that took. $Y$: Roll a pair of dice until you get a $5$ and count how many rolls that took. What is the probability that $X<Y$? $P(Y>k)$ is independent of what $X$ was. This is the difference in the questions I was trying to elucidate. – robjohn Sep 27 '11 at 0:57
Actually what the OP asked previously is "If two dice are rolled repeatedly, and X is the number of tosses until 3 is rolled, and Y is the number of tosses until a 5 is rolled, what is the probability(X<Y)?" to which he accepted the standard interpretation via the series sum, and here he was asking for an intuitive explanation for the $P(A)/[P(A) + P(B)]$ formula which he also accepted as the right answer. – Dilip Sarwate Sep 27 '11 at 2:26
@Dilip: But the question as stated here is different. From the way the OP stated this question, I could pretty much tell what the previous question was (given the answer from that problem). – robjohn Sep 27 '11 at 2:33