Is this a fair game (three players throw dice)?

3.4k Views Asked by At

I found an interview question online summarized as follows:

Three players A, B, and C are playing a game. A throws three fair 6-sided dice (each one has face values from 1 to 6), while B and C each throws a fair 20-sided die (each one has face values from 1 to 20). Whoever gets a bigger number (or sum of numbers for A) wins the game. Is this a fair game? You can only calculate by hand and have only 10 minutes.

The method I thought of is calculate the probabilities of A wins and B wins respectively, and check whether they are equal. The probability of A wins can be calculated as follows:

$$ P(A>B, A>C)=\sum_{a}P(A>B,A>C|A=a)P(A=a)\\ =\sum_a P(A>B|A=a)P(A>C|A=a)P(A=a) =\sum_a (\frac{a-1}{20})^2P(A=a)\\ =\mathop{\mathbb{E}}[(\frac{A-1}{20})^2]=\frac{1}{400}\mathop{\mathbb{E}}[A^2-2A+1] =\frac{1}{400}(\mathop{\mathbb{E}}[A^2]-2\mathop{\mathbb{E}}[A]+1). $$

If we denote $X_1,X_2,X_3$ as the three 6-sided dice of A, then we have $$ \mathop{\mathbb{E}}[A]=\mathop{\mathbb{E}}[X_1+X_2+X_3]=3\cdot \frac{1+6}{2}=\frac{21}{2}, $$ and $$ \mathop{\mathbb{E}}[A^2]=\mathop{\mathbb{E}}[(X_1+X_2+X_3)^2]=\mathop{\mathbb{E}}[X_1^2+X_2^2+X_3^2+2X_1X_2+2X_1X_3+2X_2X_3]\\ =3\mathop{\mathbb{E}}[X_1^2]+6\mathop{\mathbb{E}}[X_1X_2]=3\mathop{\mathbb{E}}[X_1^2]+6\mathop{\mathbb{E}}[X_1]\mathop{\mathbb{E}}[X_2]\\ =3 \cdot\frac{1}{6}\cdot \frac{6\cdot (6+1)\cdot (6*2+1)}{6}+6\cdot \frac{1+6}{2} \cdot \frac{1+6}{2}=119. $$ Thus $$P(A>B,A>C)=\frac{1}{400}\cdot (119-2\cdot \frac{21}{2}+1)=\frac{99}{400}.$$

However, here comes the problem when I calculate $P(B>A,B>C)$ as follows: $$ P(B>A, B>C)=\sum_{b}P(B>A,B>C|B=b)P(B=b)\\ =\sum_b P(B>A|B=b)P(B>C|B=b)P(B=b) =\sum_b P(B>A|B=b)\cdot \frac{b-1}{20}\cdot P(B=b). $$ I can't find an easy way to calculate $P(B>A|B=b)$ because the probability distribution of $A$ isn't as simple as $B$ or $C$. In fact, for $a$ from $3$ to $18$, $P(A=a)$ is $\frac{1}{216}\{1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1\}$. I can't find a general formula for these values or partial sum of these values. And if you calculate the probability with these values directly, it is very time-consuming and I don't think it is feasible when you are being interviewed. Thus I think there may be some more simple method to solve this problem (maybe by symmetry or whatever). For your convenience, with the help of my computer, I get that $P(B>A,B>C)=\frac{543}{1600}=\frac{135.75}{400}>P(A>B,A>C)$. Anyone has any ideas?

5

There are 5 best solutions below

1
On BEST ANSWER

I can see how you can actually proceed with your own solution (or at least the same idea!) until you reach the conclusion. Still not sure it can be done within 10 min on an interview, though.

The probability for $A$ to win:

$$P(A\text{ wins})=P(A>B>C)+P(A>B=C)+P(A>C>B)$$

The probability for $B$ to win:

$$P(B\text{ wins})=P(B>A>C)+P(B>A=C)+P(B>C>A)$$

Now, because of overall symmetry:

$$P(A>B>C)=P(B>C>A)$$ $$P(A>B=C)=\frac{1}{20}P(A>B)=\frac{1}{20}P(B>A)=P(B>A=C)$$

so we only need to compare the remaining terms: $P(A>C>B)$ and $P(B>A>C)$. You can calculate those in the same way as you have already calculated $P(A>B\land A>C)$:

$$P(A>C>B)=\sum_{a}P(a>C>B)P(A=a)=\frac{1}{400}\sum_{a}\frac{(a-1)(a-2)}{2}P(A=a)=\frac{1}{400}\left[\frac{1}{2}E(A^2)-\frac{3}{2}E(A)+1\right]=\frac{1}{400}\left(\frac{119}{2}-\frac{3}{2}\frac{21}{2}+1\right)=\frac{179}{1600}$$

$$P(B>A>C)=\sum_{a}P(B>a>C)P(A=a)=\frac{1}{400}\sum_{a}(20-a)(a-1)P(A=a)=\frac{1}{400}(-E(A^2)+21E(A)-20)=\frac{1}{400}(-119+21\frac{21}{2}-20)=\frac{163}{800}=\frac{326}{1600}$$

and obviously $P(B>A>C)>P(A>C>B)$, thus $P(B\text{ wins})>P(A\text{wins})$.

Addendum/Check step: We can now additionally calculate $P(A=B)=\frac{1}{20}$ and so $P(A>B)=\frac{1}{2}P(A\ne B)=\frac{19}{40}$ so $P(A>B=C)=\frac{1}{20}P(A>B)=\frac{19}{800}=\frac{38}{1600}$. Thus, $P(A\text{ wins})=\frac{179}{1600}+\frac{38}{1600}+\frac{179}{1600}=\frac{396}{1600}=\frac{99}{400}$, which matches your result. Similarly, $P(B\text{ wins})=\frac{326}{1600}+\frac{38}{1600}+\frac{179}{1600}=\frac{543}{1600}$, which again matches your result.

3
On

By symmetry, $P(B>A, B>C) = P(C>A, C>B)$

$\begin{align}P(B>A, B>C) \cdot 2= 1 &- P(A>B,A>C) \\&- P(A=B=C) \\&- P(A=B, A>C) \\&- P(A=C, A>B) \\&-P(B=C, A<B)\end{align}$

$P(A>B,A>C)=\frac{99}{400}$ as obtained in the question

$P(A=B=C) = \frac1{20}^2 = \frac{1}{400}$

$P(A>B)=\sum\limits_{a}P(A>B|A=a)\cdot P(A=a) =\sum\limits_a (\frac{a-1}{20})\cdot P(A=a) =\frac{1}{20}(\mathop{\mathbb{E}}[A]-1)=\frac{9.5}{20}$

$P(A=C, A>B)= \sum\limits_a P(A=C|A=a)\cdot P(A>B|A=a)\cdot P(A=a)= \frac1{20} \cdot P(A>B) = \frac{9.5}{400}$

Similarly for $P(A=B, A>B)$ and $P(B=C, A<B)$

$P(B>A, B>C) = 0.5* (1 - \frac{99}{400} - \frac1{400} - 3\cdot \frac{9.5}{400}) = \frac{135.75}{400}$

3
On

I would answer that it is clearly not fair and biased against $A$. The expectation values are the same for each player at $10.5$ but $B$ and $C$ have a wider distribution than $A$. As you are looking for the maximum of three numbers, a wider distribution is to your advantage. Let me be another player and give me a coin that says $0$ on one face and $21$ on the other. I win half the time. Similarly, if you give $A$ a one sided die with $10.5$ on it he wins only $\frac 14$ of the time against the two d$20$s. His actual $3$d$6$ is between the one sided die and a d$20$, so he will win less than his share. We were not asked for a specific winning probability for $A$, just whether it was $\frac 13$.

0
On

Here's a way to solve the problem that someone significantly faster at hand computation than I may conceivably carry out in ten minutes.

We are going to show that the probability $P_A$ that $A$ does not lose is strictly less than $\frac{1}{3}$; hence that the game is unfair. Having rolled a $k$, $A$ does not lose if $\max(B,C) \leq k$ or if $\max(B,C) > k$, but $B$ and $C$ are tied. Therefore:

$$ \begin{align} P_A &= \sum_{3 \leq k \leq 18} \Big[\Pr(\max(B,C) \leq k) + \Pr(B = C > k) \Big] \cdot \Pr(A=k) \\ &= \sum_{3 \leq k \leq 18} \frac{k^2 + 20 -k}{20^2} \Pr(A=k) \enspace. \end{align} $$

Knowing that for $3 \leq k \leq 18$, the values of $\Pr(A = k)$ are

$$ 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1 \enspace,$$

all divided by $6^3$, we conclude that $P_A = \frac{257}{800}$, which is approximately $0.3212$. Alternatively, that

$$ \frac{257}{800} = \frac{771}{2400} < \frac{800}{2400} = \frac{1}{3} \enspace. $$

This approach also lends itself to the computation of the probability that $A$ wins:

$$ \sum_{3 \leq k \leq 18} \Pr(\max(B,C) < k) \cdot \Pr(A=k) = \sum_{3 \leq k \leq 18} \frac{(k-1)^2}{20^2} \cdot \Pr(A=k) = \frac{99}{400} \enspace, $$

in agreement with what found by others.

2
On

Inspired by @user8734617 and @GHx, I have found a simple and direct way to calculate $P(B>A, B>C)$ as follows: $$ P(B>A, B>C)=\sum_{a}P(B>a,B>C)P(A=a)\\ =\sum_a \frac{(19+a)(19-(a-1))}{2}\cdot \frac{1}{400}\cdot P(A=a) =\mathop{\mathbb{E}}[\frac{380+A-A^2}{800}]\\ =\frac{1}{800}(-\mathop{\mathbb{E}}[A^2]+\mathop{\mathbb{E}}[A]+380) =\frac{1}{800}\cdot (-119+\frac{21}{2}+380)\\ =\frac{543}{1600}=\frac{135.75}{400}>\frac{99}{400}=P(A>B,A>C). $$