You have 3 coins, one always comes up heads, the second always comes up tails, and the third is a fair coin. You select a coin at random. After selecting a coin, you flip it twice and get heads both times. What is the probability that your next flip is heads?

Follow up:
Suppose you flipped twice and got the same outcome both times (either HH or TT), then what's the probability that your next two flips match the first two (e.g. if you saw HH, your next two are HH)

I think the answer is 75%. It doesn't matter what the odds were to get you to the final flip (this is not like the famous Monty Hall problem that requires you to make a choice at the beginning). We know the coin cannot be the tails coin. If it is the heads coin (odds of which being 50%), then of course the third flip will be heads. If it is the honest coin (also 50%), then 50% of the time it will come up heads, which means a composite probability of 25%. Thus, 3 out of 4 times it should be heads.

1 - 1/3 chance of choosing the Heads coin times 1 chance of getting Heads twice.
2 - 1/3 chance of choosing the Tails coin times 1 chance of getting Tails twice.
3 - 1/3 chance of choosing the fair coin, but since you've already got the same result twice, you only have the probability of getting the same outcome twice again which would be 1/2 * 1/2 = 1/4.

I computed it by computing the probability that the coin was the fair coin given that HH appeared, getting the probability that it was the doublehead coin from that, and then computing the probability of a head in those disjoint cases.

Just used Bayes's theorem and some arithmetic. The probability that you have a fair coin given the HH appearance is only 1/5; hence 4/5 it's the unfair heads coin (it's never the tails one obviously). The first comes from Bayes's theorem giving that, prob(fair coin | HH) is equal to P(HH|fair) P(fair) / P(HH), which is (1/4)(1/3)/(1/3 1 + 1/3 1/4) when keeping in mind the background info. Then (1/5)(1/2) + (4/5)(1) = 9/10 = 0.90

Confirmed it with a simple python program. http://codepad.org/yl4Be298

If that's all true, which makes sense, so I'm not going to dispute it, then for the 2nd case it's the same for heads or tails as if you got 2 heads it's not the tails coin and if you got 2 tails it's not the heads coin so it's:
Still 1/5 for the fair coin or 4/5 for the all-heads or all-tails coin
then (1/5)(1/2)(1/2) + (4/5)(1)(1) = 1/20 + 4/5 = 1/20 + 16/20 = 17/20

Vishal barot explains it most intuitively and Guilherme most correctly:

The correct mathematical method is to calculate the probability (P) that its NOT heads (NH) on the third fli = Pnh. NH (=Tails) can only happen if the fair coin was used, which is 50% probability . (We've already deduced that i cannot be the Tails coin). The probability to flip a Tails on a fair coin is once more 50%. Hence Pnh = 1/2 * 1/2 = 1/4. Therefore the probability of throwing heads: Ph = 1 - Pnh = 1-1/4 = 3/4 or 75%.

75%
0.5 probability that the coin is only-heads coin, and in this case we have 1 probability that it would heads next
0.5 probability that the coin is fair and in this case we have 0.5 probability that it would heads next.
By the rule of condition probability, we have as a result:
0.5 * 1 + 0.5 * 0.5 = 0.75