Given a coin with unknown bias, but we know the probability of even and odd are equal, is it fair

probability

I see from this link that if we have a fair coin and toss it 100 times, the probability that we get odd number of heads is equal to even number of heads.
How about the converse? Given a coin with unknown bias, but we know when tossing 100 times, the probability that we get odd number of heads is equal to even number of heads, is it true that it must be fair? I write out the explicit formula for 4 and 6, and plot it on desmos, it is a monotone decreasing function from 0 to 1/2 and monotone increasing function from 1/2 to 1, so I guess it is also true for 100 coins. Is it the case?

Best Answer

Let $O(n)$ and $E(n)$ be the probability to get odd number and even number of heads from $n$ throws. Also let $p$ be the probability to get head from a throw. We have the following relations:

$$ \begin{aligned} O(n) &= O(n-1)\cdot(1-p)+E(n-1)\cdot p \\ E(n) &= E(n-1)\cdot (1-p) + O(n-1)\cdot p \end{aligned} $$

Thus we have the following:

$$ O(n)=E(n) \implies (1-2p)\cdot O(n-1) =(1-2p)\cdot E(n-1) $$

The implication trivially holds for $p=\frac{1}{2}$. Now let's assume $p\neq\frac{1}{2}$ to see if any other $p$ satisfy the implication. From this assumption, $1-2p\neq 0$ so the implication becomes the following:

$$ O(n)=E(n) \implies O(n-1)=E(n-1) \implies ... \implies O(1)=E(1) $$

However, $O(1)=p$ and $E(1)=1-p$ so in the end we again end up with $p=\frac{1}{2}$.

Related Question