Find the Fake Coin

In front of you are two identical-looking coins, one of which is fair, the other of which comes up Heads 75% of the time. You choose one coin at random and flip it twice, yielding HT .

You will be permitted to perform one more flip, of whichever coin you please, after which you will be asked to guess which coin is the unfair one. Assuming that you choose optimally—that is, you choose which coin to flip so as to maximize the likelihood of eventually identifying the unfair coin—the probability that you will correctly identify the unfair coin can be expressed as m n \frac{m}{n} , where m and n are positive coprime integers. Find m + n m+n .


The answer is 23.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

5 solutions

Matt Enlow
Dec 28, 2013

Let's call the coin I've flipped A , and the other coin B . Based on the results of my flipping so far, the probability that A is the unfair coin is given by Bayes' Theorem (I've "pre-cancelled" all the prior probabilities that A or B is unfair, since they're both 1 2 \frac{1}{2} ):

3 4 1 4 3 4 1 4 + 1 2 1 2 = 3 7 \frac{\frac{3}{4}\cdot\frac{1}{4}}{\frac{3}{4}\cdot\frac{1}{4}+\frac{1}{2}\cdot\frac{1}{2}}=\frac{3}{7}

There are four possible "endgame" scenarios:

1. I flip A again and get H . In this case, the probability that A is unfair is

3 4 1 4 3 4 3 4 1 4 3 4 + 1 2 1 2 1 2 = 9 17 , \frac{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{3}{4}}{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{3}{4}+\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{2}}=\frac{9}{17},

so I would choose A as being the unfair one, with probability 9 17 \frac{9}{17} .

2. I flip A again and get T . In this case, the probability that A is unfair is

3 4 1 4 1 4 3 4 1 4 1 4 + 1 2 1 2 1 2 = 3 11 \frac{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{1}{4}}{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{1}{4}+\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{2}}=\frac{3}{11}

so I would choose B as being the unfair one, with probability 8 11 \frac{8}{11} .

3. I flip B and get H . In this case, the probability that A is unfair is

3 4 1 4 1 2 3 4 1 4 1 2 + 1 2 1 2 3 4 = 1 3 \frac{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{1}{2}}{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{1}{2}+\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{3}{4}}=\frac{1}{3}

so I would choose B as being the unfair one, with probability 2 3 \frac{2}{3} .

4. I flip B and get T . In this case, the probability that A is unfair is

3 4 1 4 1 2 3 4 1 4 1 2 + 1 2 1 2 1 4 = 3 5 \frac{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{1}{2}}{\frac{3}{4}\cdot\frac{1}{4}\cdot\frac{1}{2}+\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{4}}=\frac{3}{5}

so I would choose A as being the unfair one, with probability 3 5 \frac{3}{5} .

Since there is a 3 7 \frac{3}{7} chance that A is unfair, the probability that it will come up H if I flip it is 3 7 3 4 + 4 7 1 2 = 17 28 \frac{3}{7}\cdot\frac{3}{4}+\frac{4}{7}\cdot\frac{1}{2}=\frac{17}{28} . So the probability that I would correctly guess the unfair coin is

17 28 9 17 + 11 28 8 11 = 17 28 . \frac{17}{28}\cdot\frac{9}{17}+\frac{11}{28}\cdot\frac{8}{11}=\frac{17}{28}.

If I were to flip B instead, the probability that I would get H is 3 7 1 2 + 4 7 3 4 = 9 14 \frac{3}{7}\cdot\frac{1}{2}+\frac{4}{7}\cdot\frac{3}{4}=\frac{9}{14} . So the probability that I would correctly guess the unfair coin is

9 14 2 3 + 5 14 3 5 = 9 14 . \frac{9}{14}\cdot\frac{2}{3}+\frac{5}{14}\cdot\frac{3}{5}=\frac{9}{14}.

Since 9 14 > 17 28 \frac{9}{14}>\frac{17}{28} , I should flip B for my final flip, and I will have a 9 14 \frac{9}{14} chance of correctly identifying the unfair coin, so the answer is 9 + 14 = 23 9+14=\boxed{23} .

I almost had the same solution as you, but instead of getting the probability that A is unfair, provided the 2 flips come up as HT, (which is 3/7), I assumed that it was 50-50. I would most surely have gotten it right if I spotted that one mistake in my calculations :(

Carl Araya - 7 years, 5 months ago

Log in to reply

Man....I made the same mistake too...

Xuming Liang - 7 years, 4 months ago

Awesome question... Realised the following variation of law of total probability:

P(A|B) = P(A|B,C)P(C|B) + P(A|B,C')P(C'|B)

Anurag Poddar - 7 years, 3 months ago

Hey bhagwaan XD great solution

anukool srivastava - 4 years, 5 months ago
Daniel Liu
Dec 28, 2013

We first calculate the probability that the coin flipped in the beginning is the real coin or not.

The probability that the real coin gets the sequence HT is 1 2 1 2 = 1 4 = 4 16 \dfrac{1}{2}\cdot \dfrac{1}{2}=\dfrac{1}{4}=\dfrac{4}{16} .

The probability that the fake coin gets the sequence HT is 3 4 1 4 = 3 16 \dfrac{3}{4}\cdot\dfrac{1}{4}=\dfrac{3}{16} .

Therefore the probability that the coin flipped at the beginning was the real coin is 4 7 \dfrac{4}{7} , and the probability that it as the fake coin is 3 7 \dfrac{3}{7} .

We are not faced with a decision. Should we flip the coin we already flipped, or should we switch to the other coin. Well, let's do casework.

Case 1: Choose same coin. We are again faced with a decision. If it comes up heads, should we pick this coin as the unfair coin or the other coin as the unfair coin? Also, if it comes up tails, which coin should we pick?

To help us in this decision, we can use constructive counting. Let F F be the case where the first coin flipped is the fair coin, and U U the unfair coin. F: 4 7 × 1 2 ( 0 or 1 ) + 1 2 ( 1 or 0 ) U: 3 7 × 3 4 ( 0 or 1 ) + 1 4 ( 1 or 0 ) \begin{array}{l|cr} \text{F: }\dfrac{4}{7}\times & \dfrac{1}{2}(0\text{ or } 1)+ & \dfrac{1}{2}(1\text{ or }0)\\ \text{U: }\dfrac{3}{7}\times & \dfrac{3}{4}(0\text{ or }1)+& \dfrac{1}{4}(1\text{ or }0)\\\end{array} where the 0 or 1 0\text{ or }1 correspond to whether you choose to pick the coin you flipped as the unfair coin or the coin you didn't flip as the unfair coin.

Obviously, maximal probability is achieved in this scenario: F: 4 7 × 1 2 ( 0 ) + 1 2 ( 1 ) U: 3 7 × 3 4 ( 1 ) + 1 4 ( 0 ) \begin{array}{l|cr} \text{F: }\dfrac{4}{7}\times & \dfrac{1}{2}(0)+ & \dfrac{1}{2}(1)\\ \text{U: }\dfrac{3}{7}\times & \dfrac{3}{4}(1)+& \dfrac{1}{4}(0)\\\end{array} which corresponds to choosing the same coin if it comes up heads and the other coin if it comes up tails. This probability is evaluated and we get 17 28 \dfrac{17}{28} . But is this maximal?

Case 2: Choose other coin. This scenario is similar with the first, except that the probability that the coin you flip is the fair one is now 3 7 \dfrac{3}{7} and the coin being the unfair one is now 4 7 \dfrac{4}{7} . F: 3 7 × 1 2 ( 0 or 1 ) + 1 2 ( 1 or 0 ) U: 4 7 × 3 4 ( 0 or 1 ) + 1 4 ( 1 or 0 ) \begin{array}{l|cr} \text{F: }\dfrac{3}{7}\times & \dfrac{1}{2}(0\text{ or } 1)+ & \dfrac{1}{2}(1\text{ or }0)\\ \text{U: }\dfrac{4}{7}\times & \dfrac{3}{4}(0\text{ or }1)+& \dfrac{1}{4}(1\text{ or }0)\\\end{array}

Clearly, maximum is achieved the same way as last case: F: 3 7 × 1 2 ( 0 ) + 1 2 ( 1 ) U: 4 7 × 3 4 ( 1 ) + 1 4 ( 0 ) \begin{array}{l|cr} \text{F: }\dfrac{3}{7}\times & \dfrac{1}{2}(0)+ & \dfrac{1}{2}(1)\\ \text{U: }\dfrac{4}{7}\times & \dfrac{3}{4}(1)+& \dfrac{1}{4}(0)\\\end{array} which corresponds to picking the same coin if it comes up heads and the other coin if it comes up tails. This probability is evaluated and we get 18 28 = 9 14 \dfrac{18}{28}=\dfrac{9}{14} . Since this probability is higher than the last case, and there are no more cases, this must be the maximal, so our final answer is 9 + 14 = 23 9+14=\boxed{23} and we are done. \Box

But there are other cases: using only the new flip, or using only the first two flips, or something like that.

Daniel Chiu - 7 years, 5 months ago

Log in to reply

Yes; however, a quick check can easily disqualify them. The first case cannot do better than break even, and the next case cannot do better than 16 28 \dfrac{16}{28} which is clearly under 18 28 \dfrac{18}{28} . Like you said in your post, intuition makes you use as much information as is given to you.

Daniel Liu - 7 years, 5 months ago

Log in to reply

Well, the first case can actually give 5 8 \dfrac{5}{8} by choosing a random coin.

Daniel Chiu - 7 years, 5 months ago
Nicholas Tomlin
Dec 30, 2013

There is a 1 2 1 2 = 1 4 \frac{1}{2}\cdot \frac{1}{2} = \frac{1}{4} chance that the fair coin will flip HT, and a 3 4 1 4 = 3 16 \frac{3}{4}\cdot \frac{1}{4} = \frac{3}{16} chance that the unfair coin will flip HT.

If the real coin is chosen, switching gives a 1 4 3 4 = 3 16 \frac{1}{4}\cdot\frac{3}{4} = \frac{3}{16} chance of HTH, and a 1 4 1 4 = 1 16 \frac{1}{4}\cdot\frac{1}{4} = \frac{1}{16} chance of HTT. Staying gives equal chances between HTH and HTT.

If the fake coin is chosen, staying gives a 3 16 3 4 = 9 64 \frac{3}{16}\cdot\frac{3}{4} = \frac{9}{64} chance of HTH, and a 3 16 1 4 = 3 64 \frac{3}{16}\cdot\frac{1}{4} = \frac{3}{64} chance of HTT. Switching gives equal chances between HTH and HTT.

Since 3 16 : 1 16 : : 9 64 : 3 64 \frac{3}{16} : \frac{1}{16} :: \frac{9}{64} : \frac{3}{64} , we choose to switch. (Note that we switch because it is more likely that HT came from the real coin than the fake coin.)

Therefore, our chance of identifying the unfair coin is 1 4 3 4 + 3 16 1 2 1 4 + 3 16 = 9 14 \frac{\frac{1}{4}\cdot\frac{3}{4}+\frac{3}{16}\cdot\frac{1}{2}}{\frac{1}{4}+\frac{3}{16}} = \boxed{\frac{9}{14}} .

Daniel Chiu
Dec 28, 2013

The probability the fair coin gives flips HT is 1 4 \frac{1}{4} , and the probability the unfair coin gives flips HT is 3 16 \frac{3}{16} . Thus, the coin we flipped is most likely the fair coin. For our second flip, we don't want to flip the fair coin, as the result gives us no information about the coin. Thus, we want to flip the other coin. If it is heads, we guess it is the unfair coin, and if it is tails, we guess the first coin is the unfair coin. Then, the probability is 4 7 3 4 + 3 7 1 2 = 9 14 \dfrac{4}{7}\cdot\dfrac{3}{4}+\dfrac{3}{7}\cdot\dfrac{1}{2}=\dfrac{9}{14} giving the answer of 9 + 14 = 23 9+14=\boxed{23} .

I cannot rigorously prove something else doesn't work, because there are so many possibilities. Intuition tells me to make the most out of all the information, giving my strategy, but I cannot show everything like "choose one coin at random and only use the result of that flip" is worse.

We are the only people who solved this problem :D

Daniel Liu - 7 years, 5 months ago

Log in to reply

You sure?

Daniel Chiu - 7 years, 5 months ago

Log in to reply

An hour ago, yes.

Daniel Liu - 7 years, 5 months ago

Log in to reply

@Daniel Liu How about the creator? :)

Daniel Chiu - 7 years, 5 months ago

Log in to reply

@Daniel Chiu Ah, he doesn't count. ;)

Hmm... Still there are only 4 people who solved this question...

Daniel Liu - 7 years, 5 months ago

Log in to reply

@Daniel Liu Oh!? You're so cocky little boy. Do you know, I used Wolfram Alpha to answer this problem. W|A is really a great tool. You just copy the problem & paste in the input, W|A would give you the answer. :D

Tunk-Fey Ariawan - 7 years, 2 months ago

Log in to reply

@Tunk-Fey Ariawan Uhhh, I feel you don't understand my comment...

And I don't think W|A can solve this and either way that is pointless.

Daniel Chiu - 7 years, 2 months ago

Log in to reply

@Daniel Chiu Daniel Chiu, I replied Daniel Liu's comment. :)

But Daniel Liu think W|A can solve 'everything'. He said that to me previous day ago... :D

Tunk-Fey Ariawan - 7 years, 2 months ago

Log in to reply

@Tunk-Fey Ariawan Oh you did? Sorry I can't tell which one it was and I got an email so I thought you responded to me. My mistake.

Daniel Chiu - 7 years, 2 months ago

Optimum strategy: Flip the other coin. If heads, choose the other coin. Otherwise, choose the first coin.

Let XH, XT, FH, FT be unfair heads, unfair tails, fair heads, fair tails

Of all the possible histories, (1/2)(3/4)(1/4)(1/2) = 3/64 of them are { XH, XT, FH } (1/2)(3/4)(1/4)(1/2) = 3/64 of them are { XH, XT, FT } (1/2)(1/2)(1/2)(3/4) = 6/64 of them are { FH, FT, XH } (1/2)(1/2)(1/2)(1/4) = 2/64 of them are { FH, FT, XT }

Combined, these make up 14/64 of all possible outcomes. Out of those, 9/64 will be correctly guessed by optimum strategy. Therefore, probability is 9/14 that the unfair coin will be correctly identified.

Therefore, 9+14= 23

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...