Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)$? Also, if $Z$ is the number of rolls until a $10$ is rolled, what the probability$(X < Y < Z)$?

Is $P(X < Y) = \sum_{n=2}^{\infty}\sum_{k=1}^{\infty}((32/36)^{(n-1)}(4/36)-(34/36)^{(k-1)}(2/36)]$?

share|cite|improve this question
Is it assumed that $X$, $Y$ and $Z$ are independent ? – Sasha Sep 23 '11 at 16:50
Yes X Y and Z are independent as the dice are balanced – lord12 Sep 23 '11 at 16:50
No, $X$, $Y$ and $Z$ are not independent. For example, if $X = 1$ then $Y \ne 1$ and $Z \ne 1$. – Robert Israel Sep 23 '11 at 18:40
It's not clear whether "a 3 is rolled" is referring to a 3 coming up on at least one of the two dice, or the sum of the two being 3. But since "a 10 is rolled" can only refer to the sum, I guess we can assume the 3 and 5 are also referring to the sum. – Robert Israel Sep 23 '11 at 18:43
@Robert: Those were my thoughts too. But also notice that the first line says "until 3 is rolled" and not "until a 3 is rolled". So I suppose this indeed refers to the sum being 3, rather than one of them being 3. – TMM Sep 23 '11 at 18:47
up vote 5 down vote accepted

(a) $P(X<Y)$

Suppose $q = P(3 \text{ before } 5)$. When will we see a $3$ before we see a $5$? That is if we first see a $3$ on the first roll (we are done), or if we don't see a $3$ or a $5$ on the first roll and then see a $3$ before a $5$ after that. In other words:

$$q = P(3) \cdot 1 + P(5) \cdot 0 + P(\text{neither } 3 \text{ nor } 5) \cdot q$$

Since we know that $P(3) = \frac{2}{36}$, $P(5) = \frac{4}{36}$ we get $P(\text{neither } 3 \text{ nor } 5) = 1 - \frac{2}{36} - \frac{4}{36} = \frac{30}{36}$, so

$$q = \frac{2}{36} + \frac{30}{36} q \quad \Longleftrightarrow \quad q = \frac{1}{3}$$

Note that we can also rewrite the first equation as

$$q = P(3) \cdot 1 + P(5) \cdot 0 + P(\text{neither } 3 \text{ nor } 5) \cdot q \quad \Longleftrightarrow \quad q = \frac{P(3)}{P(3) + P(5)} = \frac{P(3)}{P(3 \text{ or } 5)} = P(3\ |\ 3 \text{ or } 5)$$

This is in accordance with a comment made by Dilip: We can simply ignore all throws which are neither a $3$ or a $5$, as they are irrelevant. Then the probability of seeing a $3$ first is simply the conditional probability of throwing a $3$, given that it's either a $3$ or a $5$.

(b) $P(X<Y<Z)$

We can use the same approach as above. First, let us ignore all throws which are not $3$, $5$ or $10$. We now need that the first event is a $3$, which happens with probability

$$P(X<Y,X<Z) = \frac{P(X)}{P(X \text{ or } Y \text{ or } Z)} = \frac{P(X)}{P(X) + P(Y) + P(Z)} = \frac{2}{2+4+3} = \frac{2}{9}$$

Now if this happens, we only need that in all successive events of $3,5,10$ we first see some number of $3$s, and then see a $5$ (and not a $10$ yet). But that means that after this first event, we can again ignore all events $X$, and look at the first throw resulting in either a $5$ or a $10$. Then

$$P(Y<Z | X<Y,X<Z) = \frac{P(Y)}{P(Y \text{ or } Z)} = \frac{P(Y)}{P(Y)+P(Z)} = \frac{4}{4+3} = \frac{4}{7}$$

So the combined probability is then

$$P(X<Y<Z) = P(X<Y,X<Z) \cdot P(Y<Z | X<Y, X<Z) = \frac{2}{9} \cdot \frac{4}{7} = \frac{8}{63}$$

share|cite|improve this answer

Following on from @Thijs analysis, which is actually a tool called "first step analysis", we can get the probability that $P(X<Y<Z)$. So we have to wait until one of these events happens. $P(X)=\frac{2}{36}$ $P(Y)=\frac{4}{36}$ $P(Z)=\frac{3}{36}$. So we have probability of $\frac{27}{36}$ of achieving "nothing" each trial, and effectively going back to the first step.

So at effective trial one, if $X$ occurs we have success, if $Y$ or $Z$ occurs, we have failure.

$$P(X<Y<Z)=\frac{2}{36}P(X<Y<Z|X<Y,Z)+\frac{3}{36}P(X<Y<Z|Z<X,Y)$$ $$+\frac{4}{36}P(X<Y<Z|Y<X,Z)+\frac{27}{36}P(X<Y<Z)$$

The middle two probabilities are zero, and the first is simply $P(Y<Z)$, and applying first step analysis again we have


Plugging back into the previous equation and solving we get


share|cite|improve this answer
Nice, your follow-up is more in line with my previous analysis than my own follow-up! :) – TMM Sep 23 '11 at 18:37

Here's a simpler way than one involving infinite series (such as that posted by Sasha). Roll a die until you get either a 3 or a 5. What's the probability that it's a 3? It's just the conditional probability of getting a 3, given that you've got either a 3 or a 5: $$ \Pr(W=3\mid W=3\text{ or }W=5) = \frac{\Pr(W=3)}{\Pr(W=3\text{ or }W=5)} = \frac{2/36}{6/36}= \frac13. $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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