This is from a NY Times book review that gives the answer and the procedure, but not the specific math of this poser, so showing the specific math is requested here.

You are given three coins, two of them fair, one of them a counterfeit that always comes up heads (It has heads on both sides, say.) You randomly pick one of the three coins and without looking at both sides, flip it three times. You observe the result and see that it comes up heads each time. What is the posterior probability that it is the counterfeit? ("Posterior" means taking into account the result of the coin flips you observed.)

One possibility is that you picked the biased coin.

There are two possibilities that you picked a fair coin.

If you picked a fair coin, the odds of getting three heads in a row for either one are: .5 X .5 X .5 = .125 (1 chance in eight; half of half is one fourth, one half of that is one-eigth)

You have two chances of one-eigth (.125), or one fourth. (.25) for the two coins total and one in three (.333) to get the fair coin.

.333 + .25 = .583 or 58.3% odds

just my guess, i'm not a mathematician or a statistician

First some notation:
Call the event of flipping heads 3 times in a row A, and the event that the coin you chose is counterfeit B. P(A|B) is the probability that A happens given that B happens (i.e. the posterior probability). P(B|A) is thus what we want to find. P(A^B) is the probability that A and B both occur (I'm using ^ in the way that the intersection symbol is usually used).

Okay:
P(A|B) = P(A^B)/P(B) (this is the mathematical definition of posterior probability, it makes sense if you think it over a bit)
similarly, P(B|A) = P(B^A)/P(A)

Because P(A^B) = P(B^A) (in a full mathematical treatment this would be because the intersection operator on sets is commutative, but also common sense tells us the same), we can do a little algebra to get:

P(B|A) = P(A|B)*P(B)/P(A)

P(A|B) = 1 (if we chose the counterfeit coin we would always get heads)
P(B) = 1/3 (there are 3 coins, 1 is counterfeit)
P(A) = 1/8 + 1/8 + 1/3 = 7/12 (coquette's answer)

Originally posted by Anthem First some notation:
Call the event of flipping heads 3 times in a row A, and the event that the coin you chose is counterfeit B. P(A|B) is the probability that A happens given that B happens (i.e. the posterior probability). P(B|A) is thus what we want to find. P(A^B) is the probability that A and B both occur (I'm using ^ in the way that the intersection s ...[text shortened]... P(A) = 1/8 + 1/8 + 1/3 = 7/12 (coquette's answer)

So P(B|A) = (1*1/3)/(7/12) = 4/7 = 57.1%

Here is some text from the review of "The Theory That Would Not Die," author Sharon Bertsch McGrayne, reviewed by John Allen Paulos, a math prof at Temple U.

"Bayes theorem states ... that the posterior probability of a hypothesis is equal to the product of (a) the prior probability of the hypothesis and (b) the conditional probability of the evidence given the hypothesis, divided by (c) the probability of the new evidence." ... "The answer to this question... is 4 in 5."

The only thing I can think is that I stated the poser incorrectly.