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.
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.