Jump to content
BrainDen.com - Brain Teasers
  • 0


bonanova
 Share

Question

Bayes, revisited.

  1. Easy:
    A magician shows four fair coins. One is two-headed; the others have both heads and tails.
    He places the coins in a black bag and blindly removes one. Repeated flips of the selected coin show "heads".
    After how many flips is it safe to bet with even odds that the selected coin has two heads?
    .
  2. Interesting:
    A magician shows four fair coins. Among their eight faces are five heads and three tails.
    He places the coins in a black bag and blindly removes one. Repeated flips of the selected coin show "heads".
    After how many flips is it safe to bet with even odds that the selected coin has two heads?
    .
Enjoy! ;)

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Never. Even though it's improbable, the coin has no memory, so each flip is a 50/50 proposition. Therefore no amount of flips will get you to a point where it's "even money" that you have the two-headed coin.

Link to comment
Share on other sites

  • 0

Let n be the number of flips after a coin is taken out, you know that all n flips were heads...

The probability that the coin was a two-sider: 3/4*1/2n

The probability the coin was the both head coin: 1/4

You need a 50/50 chance, as in both chances are the same:

3/(2n+2)=1/4

12=2n+2

3=2n

n=log23

As you can see n is an irrational number, so there's no way you'll ever have a 50/50 chance, BUT if the number of flips is 2 or more then you have a chance above 50%

Link to comment
Share on other sites

  • 0

(not that is took me long, I just had to go eat first)

Same deal let n be the number of flips, now, if you have only 3 tails then you have 2 situations, either HT HT HT HH or TT HT HH HH, I'm stumped here I think it's a Bertrand paradox situation, so I'll just skip this part and say the probability is A to B (B is the case with the two tail coin).

In case A, the probability of a hetero coin being picked and always show head is A*3/4*1/2n=3A/2n+2 and the probability of a two headed coin to be chosen and flipped always showing head is A/4...

In case B, the probability of a hetero coin being chosen and flipped always showing head is B*1/4*1/2n=B/2n+2 and the probability that a two headed coin be chosen and flipped always showing head is B/2, the probability of a two tailed coin be chosen an flipped always showing heads is 0 (unless n is 0 in which case B/4, but n is not 0)

So you need the cases of a two headed coin being chosen to be equal to the other cases:

3A/2n+2 + B/2n+2 = A/4 + B/2

3A/2n + B/2n = A + 2B

(3A + B)/(a+2B)=2n

n=log2((3A + B)/(a+2B))

n=log2(3A + B)-log2(a+2B)

I'm thinking A and B are either 1/2 and 1/2 or 2/3 and 1/3, but in both cases it's an irrational number so again there's no solution...

Link to comment
Share on other sites

  • 0

To have a 50/50 chance or better, your initial equation should be:

3/(2^(n+2)) <= 1/4

So for n=1, the chance of getting a head is 3/8 (3/4 change of picking the coin with tails and 1/2 change of flipping heads)

When n=2, the chances are 3/16, which is less than 1/4.

So after 2 flips you have a better than 50/50 change that you have the 2 headed coin.

Edited by kevink
Link to comment
Share on other sites

  • 0

I'd say all bets are off. As I can force a coin to land how I want it to every time. Also can make a normal coin appear double sided. So being that the person doing these things in the puzzle is a magician, I'd say you could never be sure.

Link to comment
Share on other sites

  • 0

1.

Let:

A = heads-heads coin was selected from bag by magician

	P(A) = 1/4

C = heads-tails coin was selected from bag by magician
	P(C) = 1 - P(A) = 3/4
B = all n repeated flips show heads
	P(B) = P(A) * 1 + P(C) * 2^-n = (1/4) * (1 + 3*2^-n)
We have:
	P(AB) = P(A) = 1/4

and
	P(A|B) = P(AB)/P(B) = (1 + 3*2^-n)^-1

We are looking for smallest n such that:
	(1 + 3*2^-n)^-1 >= 1/2

	1 + 3*2^-n <= 2 

	2^-n <= 1/3

So the answer is:
	n=2

2. Let: X = there is one tails-tails coin, one head-tails coin and two head-head coins
	P(X) = 24/56 = 3/7
(above result is an easy combinatorial exercise omitted here for space economy) Y = there are three head-tails coins and one head-head coin
	P(Y) = 1 - P(X) = 4/7 

A = heads-heads coin was selected from bag by magician
	P(A) = P(X) * 2/4 + P(Y) * 1/4 = (3*2 + 4*1) / (7*4) = 10/28

C = tails-tails coin was selected from bag by magician
	P(C) = P(X) * 1/4 = 3/28

D = heads-tails coin was selected from bag by magician
	P(D) = P(X) * 1/4 + P(Y) * 3/4 = (3*1 + 4*3) / (7*4) = 15/28

Double check:
	P(A) + P(C) + P(D) = (10 + 3 + 15)/28 = 28/28 = 1 

(OK) B = all n repeated flips show heads
	P(B) = P(A)*1 + P(C)*0 + P(D)*2^-n = 10/28 + (15/28)*2^-n = (10/28)*(1 + 1.5*2^-n)

We have:
	P(AB) = P(A) = 10/28

and
	P(A|B) = P(AB)/P(B) = (1 + 1.5*2^-n)^-1

We are looking for smallest n such that:
	(1 + 1.5*2^-n)^-1 >= 1/2

	1 + 1.5*2^-n <= 2

	2^-n <= 2/3

So this time the answer is:
	n=1

This means that this time just one flip of "heads" makes the bet on head-head coin profitable (meaning: even money or better).

Edited by witzar
Link to comment
Share on other sites

  • 0

I'd say all bets are off. As I can force a coin to land how I want it to every time. Also can make a normal coin appear double sided. So being that the person doing these things in the puzzle is a magician, I'd say you could never be sure.

It is quite simple to force a coin to land on a particular side every time and even when the magician pulls the coin out, the side shown could always be forced simply by feel.

Now for all those that are trying to find a mathematical solution, you are neglecting the fact that coins are not perfectly balanced and each coin will have a "preferred" side to them depending on how the coin was struck and how much wear it has had. Over a large sample, no coin will have a true 50/50 distribution of heads/tails when blindly flipped by a relatively uncoordinated person.

It is unfortunate that many decisions are based on coin flips.

Link to comment
Share on other sites

  • 0

It's been too long since taking math for formulas.

For #2, I think there is a 3/8 chance that you have 1 HH and 3 TH, and a 5/8 chance you have 2 HH, 1 TH, and 1 TT. This is because the three Ts must occur on either 2 coins or 3 coins, through the probablily of these options is not equal.

(the chance that the three Ts will appear on three different coins s 3/8. if you assign one of the Ts to coin 1, the chance that the second T will be randonly assigned to one of the 3 others coin is 3/4. The chance that the third T will then randonly be assigned to one of the two coins that does not have any Ts is 1/2. 3/4*1/2=3/8 chance of the three Ts being on three separate coins (producing HT, HT, HT, HH). Otherwise, there is a 5/8 chance that the three Ts are not all on different coins. (producing TT, HT, HH, HH.)

Multiplying these out, the probability of HH is (3/8)(1/4) + (5/8)(2/4) = 13/32

The probability of TH is (3/8)(3/4) +(5/8)(1/4)=14/32.

The probability that a HH coin is chosen, and its first flip is heads is thus (13/32)(1)=13/32

The probability that a TH coin is chosen and its first flip is heads is (14/32)(1/2)=7/32

Thus, after a single flip of heads it is safe to bet that the chosen coin has two heads. In fact, the probability is 13/20

Edited by mtheadedd
Link to comment
Share on other sites

  • 0

It is quite simple to force a coin to land on a particular side every time and even when the magician pulls the coin out, the side shown could always be forced simply by feel.

Now for all those that are trying to find a mathematical solution, you are neglecting the fact that coins are not perfectly balanced and each coin will have a "preferred" side to them depending on how the coin was struck and how much wear it has had. Over a large sample, no coin will have a true 50/50 distribution of heads/tails when blindly flipped by a relatively uncoordinated person.

It is unfortunate that many decisions are based on coin flips.

That may be true in real life, but doesn't the OP state that the coins are fair? e.g. that they are not regular coins that may be biased but coins that genuinely have a 50% chance of landing on either side.

Link to comment
Share on other sites

  • 0

Bayes' Theorem: p(DH|RH)p(RH) = p(RH|DH)*p(DH) where DH = Doubled Headed coin and RH = Repeating Heads

1)

p(DH|RH) = 1/2 (even bet)

p(RH) = 1/4 + (3/4)(1/2)n

p(RH|DH) = 1

p(DH) = 1/4

=>

n = ln(3)/ln(2) = ~1.585 flips => 2 flips to get better than even odds

Note with 2 flips, p(DH|RH) = 4/7 = ~0.5714 (7.14% in your favor)

2) p(DH) = comb(5,2)/comb(8,2) = 5/14 and p(Regular Coin) = 1 - (p(DH)-p(DT)) = 1-(comb(5,2)/comb(8,2) + comb(3,2)/comb(8,2)) = 1-(5/14+3/28) = 15/28

p(DH|RH) = 1/2 (even bet)

p(RH) = 5/14 + (15/28)(1/2)n

p(RH|DH) = 1

p(DH) = 5/14

=>

n = ln(3)/ln(2) - 1 = ~0.585 flips => 1 flip to get better than even odds

Note with 1 flip, p(DH|RH) = 4/7 = ~0.5714 (7.14% in your favor)

Link to comment
Share on other sites

  • 0

Bayes' Theorem: p(DH|RH)p(RH) = p(RH|DH)*p(DH) where DH = Doubled Headed coin and RH = Repeating Heads

1)

p(DH|RH) = 1/2 (even bet)

p(RH) = 1/4 + (3/4)(1/2)n

p(RH|DH) = 1

p(DH) = 1/4

=>

n = ln(3)/ln(2) = ~1.585 flips => 2 flips to get better than even odds

Note with 2 flips, p(DH|RH) = 4/7 = ~0.5714 (7.14% in your favor)

2) p(DH) = comb(5,2)/comb(8,2) = 5/14 and p(Regular Coin) = 1 - (p(DH)-p(DT)) = 1-(comb(5,2)/comb(8,2) + comb(3,2)/comb(8,2)) = 1-(5/14+3/28) = 15/28

p(DH|RH) = 1/2 (even bet)

p(RH) = 5/14 + (15/28)(1/2)n

p(RH|DH) = 1

p(DH) = 5/14

=>

n = ln(3)/ln(2) - 1 = ~0.585 flips => 1 flip to get better than even odds

Note with 1 flip, p(DH|RH) = 4/7 = ~0.5714 (7.14% in your favor)

nice

Link to comment
Share on other sites

  • 0

It's been too long since taking math for formulas.

For #2, I think there is a 3/8 chance that you have 1 HH and 3 TH, and a 5/8 chance you have 2 HH, 1 TH, and 1 TT. This is because the three Ts must occur on either 2 coins or 3 coins, through the probablily of these options is not equal.

(the chance that the three Ts will appear on three different coins s 3/8. if you assign one of the Ts to coin 1, the chance that the second T will be randonly assigned to one of the 3 others coin is 3/4. The chance that the third T will then randonly be assigned to one of the two coins that does not have any Ts is 1/2. 3/4*1/2=3/8 chance of the three Ts being on three separate coins (producing HT, HT, HT, HH). Otherwise, there is a 5/8 chance that the three Ts are not all on different coins. (producing TT, HT, HH, HH.)

Multiplying these out, the probability of HH is (3/8)(1/4) + (5/8)(2/4) = 13/32

The probability of TH is (3/8)(3/4) +(5/8)(1/4)=14/32.

The probability that a HH coin is chosen, and its first flip is heads is thus (13/32)(1)=13/32

The probability that a TH coin is chosen and its first flip is heads is (14/32)(1/2)=7/32

Thus, after a single flip of heads it is safe to bet that the chosen coin has two heads. In fact, the probability is 13/20

I think issue of the distribution of the H's and T's on the coins, highlights a fundamental flaw in the wording of the problem (I enjoyed the problem very much). There is no mention of the method used to create the distribution. Is it completely random by sides of coins? Is it completely random by coin? Or did the magician choose the distribution for any number of reasons and the number of H's and T's is simply an observation? Here are some different assumptions and the different distributions that result:

1. Random distribution by coin-- mtheadedd's number would be right. First T goes on any coin, second T is 3/4 to be on a new coin, third T is 1/2 to be on a unique coin. So 3/8 would be the probability of an HH, HT, HT, HT distribution.

2. Random distribution by sides-- (when solving the puzzle this was my assumption)-- There are 8 sides on the 4 coins. So the first T can go anywhere. The second T is 6/7 to go on a side that is not on the same coin as the first T. The third T is 4/6 to go on a side that doesn't have one of the first two T's on the opposite side. So (6/7)*(4/6)= 4/7 chance that we get HH, HT, HT, HT. A very different result.

3. The magician chose the distribution by some other means and the numbers are simply an observation-- Who knows what the chances are? Here's one way he could have done the distribution. He knows there are 5 H's and 3 T's. So he knows there has to be at least 1 HH and 1 HT. So, he creates those two coins. That leaves him with 2 H's and 2 T's and 2 coins. So he does a random distribution from there. In that case, you can assume an H on the first side of one of the last two coins. If we randomly assign the other side of that coin from the three remaining choices, we have a 2/3 chance we get an HT, HT distribution on the last two coins.

BTW, if we made this assumption, the chances that we have chosen a two headed coin after flipping heads once is exactly 50-50.

Cool problem though.

Link to comment
Share on other sites

  • 0

I agree: (6/7)*(4/6) makes much more sense than what I originally said.

I think issue of the distribution of the H's and T's on the coins, highlights a fundamental flaw in the wording of the problem (I enjoyed the problem very much). There is no mention of the method used to create the distribution. Is it completely random by sides of coins? Is it completely random by coin? Or did the magician choose the distribution for any number of reasons and the number of H's and T's is simply an observation? Here are some different assumptions and the different distributions that result:

1. Random distribution by coin-- mtheadedd's number would be right. First T goes on any coin, second T is 3/4 to be on a new coin, third T is 1/2 to be on a unique coin. So 3/8 would be the probability of an HH, HT, HT, HT distribution.

2. Random distribution by sides-- (when solving the puzzle this was my assumption)-- There are 8 sides on the 4 coins. So the first T can go anywhere. The second T is 6/7 to go on a side that is not on the same coin as the first T. The third T is 4/6 to go on a side that doesn't have one of the first two T's on the opposite side. So (6/7)*(4/6)= 4/7 chance that we get HH, HT, HT, HT. A very different result.

3. The magician chose the distribution by some other means and the numbers are simply an observation-- Who knows what the chances are? Here's one way he could have done the distribution. He knows there are 5 H's and 3 T's. So he knows there has to be at least 1 HH and 1 HT. So, he creates those two coins. That leaves him with 2 H's and 2 T's and 2 coins. So he does a random distribution from there. In that case, you can assume an H on the first side of one of the last two coins. If we randomly assign the other side of that coin from the three remaining choices, we have a 2/3 chance we get an HT, HT distribution on the last two coins.

BTW, if we made this assumption, the chances that we have chosen a two headed coin after flipping heads once is exactly 50-50.

Cool problem though.

Link to comment
Share on other sites

  • 0

I think issue of the distribution of the H's and T's on the coins, highlights a fundamental flaw in the wording of the problem (I enjoyed the problem very much). There is no mention of the method used to create the distribution. Is it completely random by sides of coins? Is it completely random by coin? Or did the magician choose the distribution for any number of reasons and the number of H's and T's is simply an observation? Here are some different assumptions and the different distributions that result:

1. Random distribution by coin-- mtheadedd's number would be right. First T goes on any coin, second T is 3/4 to be on a new coin, third T is 1/2 to be on a unique coin. So 3/8 would be the probability of an HH, HT, HT, HT distribution.

2. Random distribution by sides-- (when solving the puzzle this was my assumption)-- There are 8 sides on the 4 coins. So the first T can go anywhere. The second T is 6/7 to go on a side that is not on the same coin as the first T. The third T is 4/6 to go on a side that doesn't have one of the first two T's on the opposite side. So (6/7)*(4/6)= 4/7 chance that we get HH, HT, HT, HT. A very different result.

3. The magician chose the distribution by some other means and the numbers are simply an observation-- Who knows what the chances are? Here's one way he could have done the distribution. He knows there are 5 H's and 3 T's. So he knows there has to be at least 1 HH and 1 HT. So, he creates those two coins. That leaves him with 2 H's and 2 T's and 2 coins. So he does a random distribution from there. In that case, you can assume an H on the first side of one of the last two coins. If we randomly assign the other side of that coin from the three remaining choices, we have a 2/3 chance we get an HT, HT distribution on the last two coins.

BTW, if we made this assumption, the chances that we have chosen a two headed coin after flipping heads once is exactly 50-50.

Cool problem though.

I don't think the wording was flawed at all. When determining probability, one always has to assume "maximal ignorance", i.e. use only the information at hand to determine the distribution and make no assumptions that use any other information.

"# 2 Random distribution by sides" is the only distribution that fits this profile.

"# 1 Random distribution by coin" doesn't make sense at all when the information given is four coins with eight sides consisting of HHHHHTTT.

# 3 makes the assumption that magician, being a magician, influenced the initial distribution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...