The question is as follows:

You roll two fair dice over and over. Let $A$ be the event you see two even sums. Let $B$ be the event you see a sum of $7$ four times. What is the probability that event $A$ occurs before event $B$?

I know that for mutually exclusive events with independent trials, the probability that event $E$ occurs before event $F$ is $$\frac{\mathbb{P}(E)}{\mathbb{P}(E) + \mathbb{P}(F)}.$$ I tried using this formula, but I ran into a problem. I calculated $$\mathbb{P}(A)=\frac{1}{2}\cdot \frac{1}{2}=\frac{1}{4} \ \ \ \ \text{and} \ \ \ \ \mathbb{P}(B)=\left ( \frac{1}{6} \right )^4=\frac{1}{1296}.$$ However, I then realized that these probabilites are the events that two even sums occur $\textit{in a row},$ and similarly for my $\mathbb{P}(B).$

Does anyone have any suggestions on how to figure this out, or even if this formula is the one I should be using?

Thanks in advance!

Edit: I know there is a geometric distribution involved.

  • 2
    If it helps approach the problem, A occurs before B is usually just a less obvious way to say A occurs without B – Lord Farquaad Oct 16 at 12:54
up vote 4 down vote accepted

Since neither A nor B cares about odd sums that aren't 7, we'll just reroll in those cases and thus we can ignore the probability of those sums occurring.

Thus we're left with 7 in addition to the 6 even sums ($2,4,6,8,10,12$).

The probabilities of these are respectively $6/36$ and $(1+3+5+5+3+1)/36 = 18/36$.

Divide the probabilities of each of these by the sum of both probabilities, to get $P(7)$ and $P(even)$ such that $P(7) + P(even) = 1$ (this is $P(7) = \frac{1}{4}$ and $P(even) = \frac{3}{4}$).

Now, as bobajob pointed out, the probability of A occurring before B is the complement of the probability of B occurring before A.

$P(2\ even\ before\ 4\ sevens) = 1-P(4\ sevens\ before\ 2\ even)$

To have 4 sums of seven before 2 even sums, there can be at most 1 even sum before the 4th seven sum.

Thus we have the following possible sequences:

$ 7\ 7\ 7\ 7$
$ 7\ 7\ 7\ even\ 7$
$ 7\ 7\ even\ 7\ 7$
$ 7\ even\ 7\ 7\ 7$
$ even\ 7\ 7\ 7\ 7$

Each of the above occurs with the following probability:

$ P(7) * P(7) * P(7) * P(7) = P(7)^4$
$ P(7) * P(7) * P(7) * P(even) * P(7) = P(even) * P(7)^4$
$ P(7) * P(7) * P(even) * P(7) * P(7) = P(even) * P(7)^4$
$ P(7) * P(even) * P(7) * P(7) * P(7) = P(even) * P(7)^4$
$ P(even) * P(7) * P(7) * P(7) * P(7) = P(even) * P(7)^4$

Then we have:

$P(2\ even\ before\ 4\ sevens) = 1-P(4\ sevens\ before\ 2\ even)$

$= 1 - P(7)^4 - 4 * P(even) * P(7)^4$

$= 1 - (\frac{1}{4})^4 - 4 * \frac{3}{4} * (\frac{1}{4})^4$

$= 0.984375$

Alternative method

The probability we want will just be the probability of getting 0-3 sums equal to 7 before getting 2 even sums.

$P(2\ even\ before\ 4\ sevens) = \sum_{i=0}^3P(i\ sevens\ before\ 2\ even)$

Since one even sum will need to be at the end, we can simply consider all possible positions of the other even sum.

Taking as an example $i=3$ (3 7 sums before 2 even sums), we'll have the following possible order of events:

$ 7\ 7\ 7\ even\ even$
$ 7\ 7\ even\ 7\ even$
$ 7\ even\ 7\ 7\ even$
$ even\ 7\ 7\ 7\ even$

The amount of these we have is simply $i + 1$.

Each of the above occurs with probability $P(even)^2 * P(7)^i$:

$ P(7) * P(7) * P(7) * P(even) * P(even) = P(even)^2 * P(7)^3$
$ P(7) * P(7) * P(even) * P(7) * P(even) = P(even)^2 * P(7)^3$
$ P(7) * P(even) * P(7) * P(7) * P(even) = P(even)^2 * P(7)^3$
$ P(even) * P(7) * P(7) * P(7) * P(even) = P(even)^2 * P(7)^3$

Thus we have:

$P(i\ sevens\ before\ 2\ even) = (i+1) * P(even)^2 * P(7)^i$

This gives us:

$P(2\ even\ before\ 4\ sevens) = \sum_{i=0}^3(i+1) * P(even)^2 * P(7)^i$

$= P(even)^2 * (1 + 2*P(7) + 3*P(7)^2 + 4*P(7)^3)$

$= (\frac{3}{4})^2 * (1 + 2*\frac{1}{4} + 3*(\frac{1}{4})^2 + 4*(\frac{1}{4})^3)$

$= 0.984375$


More generally, the positions of the even sums above will be a multiset permutation and one can come up with general expression for the probability of M events X occurring before N events Y, but that's a bit beyond the scope of this question.

  • 1
    Nice approach. Would it not be easier to calculate the probability of event $B$ occurring before $A$ and then take the complement though? ($i$ would just be 0 or 1...) – bobajob Oct 16 at 10:41
  • @bobajob Good point, edited. – Dukeling Oct 16 at 11:53
  • 1
    "Since neither A nor B cares about odd sums that aren't 7" Yes, they do. A sum of 2 followed by a sum of 3 followed by a sum of 4 does not constitute an instance of A, while a sum of 2 followed by a sum of 4 does. – Acccumulation Oct 16 at 15:20
  • 1
    After rereading the question, I likely misunderstood it; I thought it was two even sums in a row. – Acccumulation Oct 16 at 15:30

I would do a Markov chain with the states being the number of even rolls/the number of seven rolls. Work backwards starting from the state that you have seen one even roll and three $7$s. What is the chance that A comes first from there?

You have two Bernoulli processes,$S_A$ and $S_B$, and you are asked about the probability that the 2nd arrival in $S_A$ process occurs before the 4th arrival in $S_B$ process. PMF of the time of $k$-th arrival in a Bernoulli process with probability of success $p$ is $$p_{X_k}(t)=\binom{t-1}{k-1}p^k(1-p)^{t-k}, \ t=k,k+1,\ldots$$


PS: the events "sum is even" and "sum is 7" are dependent, and it makes the question tricky indeed, and the trick is, as Dukeling explained, is to ignore odd sums not equal to $7$; then the (conditional) probability of getting the sum of $7$ is $\frac{6}{36-12}=\frac{1}{4}$. Now the complement of the event of interest is the event that the 4th arrival in the Bernoulli process with $p=1/4$ occurs at time $4$ or $5$, and its probability is equal to $$\binom{3}{3}p^4+\binom{4}{3}p^4(1-p)=p^4(1+4(1-p))=\frac{1}{64}$$ and the final answer is $$1-\frac{1}{64}=\frac{63}{64}$$

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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