4

Person A has 5 fair coins and Person B has 4 fair coins. Person A wins only if he flips more heads than B does. What is the probability of A winning? I know how to solve this classic problem but my question is what if the coin is unfair with the probability of getting a head being 1/3. then is the probability of A winning still 1/2?

if we list out the possible outcomes like the following plot, it seems the probability of A winning still 1/2, no matter the coin is fair or not. Here's the plot.

but i found a contradiction in the following part:

consider the first 4 coin tosses first:

p = P(person A has more heads)=P(person B has more heads) they are equal because they are symmetric

P(A and B tossed equal number)=$1-2p$

so the probability that A won is P(person A has more heads)+P(A and B tossed equal number)*P(A tossed head)=$p+(1-2p)*\frac{1}{3}=p+\frac{1}{3}-\frac{2}{3}p=\frac{1}{3}p+\frac{1}{3}$

but since based on the plot this $\frac{1}{3}p+\frac{1}{3}$ should equal $\frac{1}{2}$, therefore we get p is $\frac{1}{2}$, but this gives 1-2p=0, however, 1-2p should be greater than 0 since there's a chance that A B tossed equal in the first 4 tosses, which leads to a contradiction. How should I understand this? is the conclusion that A won is still $\frac{1}{2}$ wrong? what should be the correct answer?

Lucy
  • 41
  • Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to. – José Carlos Santos Nov 02 '24 at 08:26
  • 1
    How can the game be symmetric, as $A$ and $B$ do not play with the same number of coins ? Write $p$ the probability of getting a head, I believe that if $p \to 0$ then all tosses are tails and $A$ certainly loses, while if $p \to 1$, conversely, $A$ is sure to win. – Jean Nov 02 '24 at 08:26
  • Not having analyzed the $p=1/3$ case, but just to point out the obvious: if $f(p)$ is the probability of $A$ (with $5$ coins) getting more heads than $B$ (with $4$ coins), where each coin flip is heads with probability $p$… then $f(0)=0$, and $f(1)=1$. That strongly suggests that $f(1/3)$ is strictly less than $f(1/2)$. – mjqxxxx Nov 02 '24 at 08:32
  • @Jean: Lucy isn’t saying the game is symmetric, only that the game after each has flipped $4$ coins is symmetric. $A$ still gets one more flip… which can change the outcome only if $A$ and $B$ were tied after the first $4+4$ flips. – mjqxxxx Nov 02 '24 at 08:58
  • 1
    @mjqxxxx Fair enough, however, a final result of $1/2$ would imply some kind of symmetry, which is not here. – Jean Nov 02 '24 at 09:01

5 Answers5

2

The plot, to me, seems meaningless… there are an equal number of orange and grey dots, yes, but each dot has a different probability. So what does it prove?

On the other hand, your algebraic analysis is exactly right. Suppose each coin is heads with probability $p$. If the probability of $A$ getting more heads than $B$ with $4$ coins each is $q$ (which can be expressed as a function of $p$), then the probability of $A$ getting more heads than $B$ when they have $5$ and $4$ coins, respectively, is $$f(p)=q+(1-2q)p=p+q(1-2p).$$ So $f(0)=0$, $f(1/2)=1/2$, and $f(1)=1$ (since the second term vanishes in all those cases). But to find $f(1/3)=1/3+q/3$, you actually need to calculate the value of $q$ when $p=1/3$… I don’t think a symmetry argument helps. But since $q$ is certainly greater than $0$ and less than $1/2$, it’s certain that $1/3 < f(1/3) < 1/2$.

mjqxxxx
  • 43,344
  • For what it's worth, the numbers are small enough that $~q~$ can be calculated as $~(1/2) \times (1-x),~$ where $~x~$ is the probability that A and B have the same number of heads. So, $$x = \sum_{k=0}^4 \left{ ~\left[ ~\binom{4}{k} ~\right]^2 \times \left[ ~(1/3)^k ~\right]^2 \times \left[ ~(2/3)^{4-k} ~\right]^2 ~\right}.$$ – user2661923 Nov 02 '24 at 11:11
  • @user2661923: Oh, absolutely. I just wanted to explain why the answer had to be less than $1/2$. But you’re right: taking $q=(1-x)/2$, where $x$ is the probability of an equal number of heads after $4$ flips, gives $f(1/3)=1/2 - x/6$… making it conpletely clear that it’s less than $1/2$. – mjqxxxx Nov 02 '24 at 16:22
1

Personally, since the numbers are small enough, it is routine to simply apply the binomial distribution formula, $~\displaystyle \binom{n}{k} p^k q^{n-k}.$

Let $~p = 1/3, ~q = 1-p.$

For $~k \in \{1,2,3,4,5\}, ~$ let:

  • $f(k)~$ denote the probability that person A has exactly $~k~$ heads.

  • $g(k)~$ denote the probability that person B has less than $~k~$ heads.

Then, the desired computation is

$$\sum_{k=1}^5 [ ~f(k) \times g(k) ~],$$

where

$$f(k) = \binom{5}{k} p^k q^{5-k}, ~~~~g(k) = \sum_{i = 0}^{k-1} \binom{4}{i} p^i q^{4-i}.$$

user2661923
  • 42,303
  • 3
  • 21
  • 46
1

Note that the argument in the answer you linked to relies crucially on the symmetry of the binomial distribution $\ B\left(n,p\right)\ $ for $\ \color{red}{p=\frac{1}{2}}\ :$ \begin{align} P\big(H_A=a\big)&=P\big(H_A=5-a\big)\\ P\big(H_B=b\big)&=P\big(H_B=4-b\big)\ , \end{align} where $\ H_A\ $ and $\ H_B\ $ are the numbers of heads tossed by A and B, respectively. This symmetry no longer holds when $\ p=\frac{1}{3}\ .$ The formula for the probability that A wins if he or she has $\ c_A\ $ coins that land heads with probability $\ p_A\ ,$ and B has $\ c_B\le c_A\ $ coins which land heads with probability $\ p_B\ $ is \begin{align} P(\text{A wins})&=\sum_{b=0}^{c_B}{c_B\choose b}p_B^b(1-p_B)^{c_B-b}\sum_{a=b+1}^{c_A}{c_A\choose a}p_A^a(1-p_A)^{c_A-a}\ . \end{align} Evaluating this formula for $\ c_A=5,c_B=4\ $ and $\ p_A=p_B=\frac{1}{3}\ $ gives $$ P(\text{A wins})=\frac{8881}{19683}<\frac{1}{2}\ . $$

1

The best way is to use the idea in the answer you linked to with suitable modifications.

We survey the situation after each has tossed $4$ coins, and take advantage of the symmetry that exists at this point, just as it did in your linked answer.

For clarity, I shall use the notation $d$ for the probability of a draw after both have tossed $4$ coins

We can compute this probability easily as

$$d= \sum_{0}^4\left[\binom4 k p^k q^{4-k}\right]^2 = \frac{1921}{6561}$$

P(A wins)
= P(A wins by the $4th$ toss) + P(wins after $4th$ toss)

$ =\frac{1-d}2 + \frac13d = \frac12- \frac{d}6$,

and plugging in the value of $d$,
$$P(A\; wins) = \frac12 - \frac16\frac{1921}{6561} = \frac{8881}{19683}$$

0

Let $B\sim\mathcal{Bin}(4,p)$, $C\sim\mathcal{Bin}(4,p)$, $D\sim\mathcal{Bern}(p)$, and $B,C,D$ are mutually independent, with $A=C+D$. That is, $D$ is the extra coin's head count.

Player A wins when their extra coin show tails but the other coins show strictly more heads than has player B, or when their extra coin shows heads and their other coins contain at least as many heads as has player B.

$\qquad\begin{align}\mathsf P(A>B) &= \mathsf P(D=0)\,\mathsf P(C>B)+\mathsf P(D=1)\,\mathsf P(C\geq B)\\[1ex]&=\tfrac 12\mathsf P(D=0)\,(1-\mathsf P(C=B))+\tfrac 12\mathsf P(D=1)\,(1+\mathsf P(C=B))\\[1ex]&=\tfrac 12(1+(\mathsf P(D=1)-\mathsf P(D=0))\,\mathsf P(C=B))\\&=\tfrac 12+(p-\tfrac 12)\sum_{x=0}^4\binom 4x^2p^{2x}(1-p)^{2(4-x)}\\&~~\vdots\end{align}$

Graham Kemp
  • 133,231