## Rolling dice

You and I play a game. We each have 1 die. I win if I roll a 4. You win if you roll a 5. If I go first, what is the probability that I win?

Some quick remarks:

• the game is over when I roll a 4 or when you roll a 5. Until that happens, the game is played ad infinitum.
• the game is played in rounds. At each round, I roll the die, and only then you roll the die. If I get a 4, I win the game and you don’t get to roll your die.
• the probability that I win is the same as the probability that you lose. And vice-versa.
• if you go first, the probability that I win is different (of course).
• note that there are two dice! However, since we roll the dice in a non-simultaneous manner, we actually only need one die. I can borrow yours, or lend you mine.

__________

Related:

Hat-tip: Nuclear Phynance

Tags: ,

### 6 Responses to “Rolling dice”

1. mja Says:

Here’s another solution that also gives 6/11 as the answer:

Let’s solve for probability p, the chance that “I” (first player) win. Since all games eventually produce a winner (a.s.), the probability that the second player wins is then 1-p.

I have a 1/6 chance of winning on the first toss. Otherwise (5/6 chance), we are playing the same game but now I am player 2, so I have 1-p chance of winning. Algebraically,

p = 1/6 + 5/6 (1-p)
11p/6 = 1
p = 6/11

I remember solving problems like this when playing Axis and Allies, a favorite strategy game during my middle and high school years. (Very similar situations would occur with e.g. submarine battles, for those who know the game; obviously you didn’t have to solve them algebraically to enjoy the game, but I was kind of obsessed.) At first I used brute force approaches, but eventually I hit on the fact that all you need to do is compute the relative probabilities of you winning and me winning before you get back to square one. So, just taking one iteration, you find that the probability player 1 wins is 1/6 or 6/36. The probability that player 2 wins is 5/36. And the probability that you find yourself in the same situation that you started in is 25/36… but you can ignore that and just look at the relative odds (6 to 5 in favor of player 1).

This approach generalizes to the case of more than two outcomes (e.g. allowing ties). The proof for any given outcome A works like this:

Let p(A) be the probability that you eventually end up in outcome A.
Let p(A1) be the probability that you end up in outcome A on the first “iteration”, defined as the minimum number of rolls after which the game has either terminated or you are in an equivalent situation as you were at the beginning.
Let q be the probability that the game didn’t terminate on the first iteration. Then q = 1 – p(A1) – p(B1) – p(C1) – … for all the possible outcomes.
Following the above outline, you get an equation that looks like this:

p(A) = p(A1) + p(A)q
p(A) = p(A1) / (1-q)
p(A) = p(A1) / (p(A1) + p(B1) + p(C1) + …) or in other words, once you know the relative chance of a given outcome on the first iteration, you know the odds of that outcome overall.

Anyway thanks for reminding me of all the fun I had in those days.

2. Shubhendu Trivedi Says:

We can define the following events:

$E$ = you winning (person A) by getting a 4

$F$ = I winning (person B) by getting a 5

Therefore:

$\mathbb{P} [E] = 1 / 6$

$\mathbb{P} [F] = 1 / 6$

You win if you throw a four in the 1st, or 3rd or 5th throws. Your probability of throwing a 4 in 1st throw is $\mathbb{P} [E] = 1 / 6$. You get the third throw if you fail in your first and I fail in the second throw respectively. Therefore, the probability of you winning in the third throw is

$\mathbb{P} [\bar{E} \cap \bar{F} \cap E] = \left(\frac{5}{6}\right)^2 \frac{1}{6}$

Similarly, the probability of you winning in the 5th throw is

$\mathbb{P} [\bar{E} \cap \bar{F} \cap \bar{E} \cap \bar{F} \cap E] = \left(\frac{5}{6}\right)^4 \frac{1}{6}$

Hence probability of you (A) winning is

$\displaystyle \frac{1}{6} + \left(\frac{5}{6}\right)^2 \frac{1}{6} + \left(\frac{5}{6}\right)^4 \frac{1}{6} + \dots = \frac{1}{6} \left(\frac{1}{1 - \frac{25}{36}}\right) = \frac{6}{11}$

Co-problems:

1) I roll the die first. You roll second. We keep going till someone wins. I win if “A happens” and you win if “B happens”. What are all possible events A and B, such that the game is fair (both of us win with equal probability)?

2) What are the expected lengths of the games in each case?

3) Can you come up with a game with expected length infinity but such that it ends almost surely?

• Rod Carvalho Says:

1) For starters, let us say that players A and B perform each some sort of Bernoulli experiment where the probabilities of “success” are $p, q \in [0,1]$, respectively. This is more general than throwing dice, and this abstraction helps us focus on the essential. The probablity that player A wins is

$\mathbb{P}[\text{A wins}] = p + (1-p) (1-q) p + (1-p)^2 (1-q)^2 p + \ldots$

which is a geometric series with ratio $r = (1-p) (1-q)$, and hence we obtain

$\mathbb{P}[\text{A wins}] = \displaystyle \sum_{k=0}^{\infty} p r^k = \displaystyle \frac{p}{1- (1-p)(1-q)}$,

and $\mathbb{P}[\text{B wins}] = 1 - \mathbb{P}[\text{A wins}]$, or course. We would like the game to be fair, i.e., $\mathbb{P}[\text{A wins}] = \mathbb{P}[\text{B wins}]$, which leads to

$\displaystyle\frac{p}{1-p} = q$.

If $p = \frac{1}{6}$, we obtain that $q = \frac{1}{5}$ for the game to be fair. This probability is not translated into “events” involving tossing dice. However, if $p = \frac{1}{3}$, we obtain that $q = \frac{1}{2}$, and now the events are easy to devise: A will toss the die and win if he gets a 4 or a 5, while B will win if he gets a 4, 5, or 6 (for instance).

I will continue my reply tomorrow. I am kind of sleepy right now…