Any had an interview question like this? Anyone know how to solve it. It seems kind of hard. Suppose you have 4 coins three normal coins and one with head on both sides. Suppose you pick a coin at random and flip it 4 times. It lands on heads all four time. What is the probability that the coin was the one with two heads. I would assume it could be 1/(3/16+1), but I have no Idea how you would do this problem.
(5/8)^4 = (625/4096) = 0.152588 = chances it lands on heads, on four flips, irrespective of the coin? 1/4 = chances you flip the two-headed coin, irrespective of the outcome. Factor out "irrespective," and you get 0.152588/4 = 0.038147? The shame is it's an interview question, so you're trying to answer it without a pen or scratch paper.
It really seems like the outcome part is a red herring. The probability that the coin is actually the two-headed coin remains 1 in 4.
I think between 1/4 and 1 if you flip it it 4 times. It lands on heads all 4 times more than likely its the coin with two heads no?
The question isn't what is the probability that the coin will land on heads, it's what's the probability that you picked up the coin with two heads. Doesn't matter how many times you flip the coin you took and it lands on heads. It all comes back to the fact that there were four coins, one of which had two heads. So you have a 1 in 4 chance that you took that coin.
Change the question slightly -- coin is flipped 100 times, and each time it shows heads -- and it becomes obvious the answer should not be 1/4. The trick is to just add up all the possible outcomes where you can pick a coin and get heads 4 times straight. Label each coin A, B, C, and D ... with D being the 2-headed coin. The probability that you'd pick up A and flip heads 4 times is: (1/4)*(1/2)*(1/2)*(1/2)*(1/2), or 1/64. Same for B and C. Probability you'd pick up D and flip 4 straights heads is simply 1/4. So that all adds up to 1/4 (or 16/64) + 3/64, or 19/64. That constitues all possible outcomes where you'd flip 4 straight heads. So, out of that, what is the probability you picked D? Simply 16/19. That's my answer -- roughly 84%.
It's a conditional probability problem. It's the probability of an event A given that an event B has occured. The conditional probability is found by dividing the probability of B by the probability of A and B occuring i.e. (A "intersect" B)/B. In this case, the probability of B (flipping four heads) = 0.75*0.5*0.5*0.5*0.5 + 0.25*1*1*1*1 And the probability of A and B (flipping four heads and it being the two headed coin) = 0.25*1*1*1*1 Therefore, the probability = 0.25/(0.75*0.5^4 + 0.25) = 0.8421
So if it was flipped 1000 times, and it shows heads each time, you'd still say there's a 75% chance it is not the double-headed coin (and, hence, a 1/4 chance it is the double headed coin)? Doesn't make much sense. I'd stake everything I own that it is the double-headed coin. The chances it is otherwise would be infinitesimal.
Hmmm. Very good argument. But I bet the interviewer was expecting the 25% answer. I'd hire you for that answer.
Conditional Probability, I vaguely remember this now from statistics class. Sure seems like they could have worded the question better.