1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

Probability Interview question

Discussion in 'BBS Hangout' started by Air Langhi, Jul 27, 2009.

  1. Air Langhi

    Air Langhi Contributing Member

    Joined:
    Aug 26, 2000
    Messages:
    21,941
    Likes Received:
    6,695
    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.
     
  2. moestavern19

    moestavern19 Member

    Joined:
    Dec 8, 1999
    Messages:
    39,003
    Likes Received:
    3,641
  3. yo

    yo Member

    Joined:
    May 20, 2001
    Messages:
    2,287
    Likes Received:
    146
    Think so too.
     
  4. Dairy Ashford

    Dairy Ashford Member

    Joined:
    May 20, 2002
    Messages:
    14,585
    Likes Received:
    1,888
    (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.
     
  5. moestavern19

    moestavern19 Member

    Joined:
    Dec 8, 1999
    Messages:
    39,003
    Likes Received:
    3,641
    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.
     
  6. RedRowdy111

    RedRowdy111 Member

    Joined:
    Aug 26, 2006
    Messages:
    3,890
    Likes Received:
    94
    Wordy common sense question

    1/4
     
  7. Bandwagoner

    Bandwagoner Member

    Joined:
    Jan 26, 2006
    Messages:
    27,105
    Likes Received:
    3,756
    It is not 1 in 4. they are giving you more info that you have to use.
     
  8. vlaurelio

    vlaurelio Member

    Joined:
    Jan 26, 2005
    Messages:
    21,310
    Likes Received:
    11,755
    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?
     
  9. Bandwagoner

    Bandwagoner Member

    Joined:
    Jan 26, 2006
    Messages:
    27,105
    Likes Received:
    3,756
    yes. a normal coin has a 6.25% chance to give you 4 heads, the 2 head coin is 100%
     
  10. LANIMIRC

    LANIMIRC Member

    Joined:
    Jul 22, 2009
    Messages:
    279
    Likes Received:
    4
    It is still a 1/4 chance that the coin you have is the two-headed coin.
     
  11. JunkyardDwg

    JunkyardDwg Member

    Joined:
    Oct 29, 2000
    Messages:
    8,703
    Likes Received:
    841
    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.
     
  12. durvasa

    durvasa Member

    Joined:
    Feb 11, 2006
    Messages:
    38,893
    Likes Received:
    16,449
    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%.
     
    1 person likes this.
  13. moestavern19

    moestavern19 Member

    Joined:
    Dec 8, 1999
    Messages:
    39,003
    Likes Received:
    3,641
    Wrong. Its a trick question, typical "can you think outside the box" type Q.
     
  14. Trini Rocket

    Trini Rocket Member

    Joined:
    Oct 9, 2007
    Messages:
    215
    Likes Received:
    1
    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
     
  15. durvasa

    durvasa Member

    Joined:
    Feb 11, 2006
    Messages:
    38,893
    Likes Received:
    16,449
    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.
     
  16. Fatty FatBastard

    Joined:
    Jul 13, 2001
    Messages:
    15,916
    Likes Received:
    159
    Hmmm. Very good argument. But I bet the interviewer was expecting the 25% answer. I'd hire you for that answer.
     
  17. durvasa

    durvasa Member

    Joined:
    Feb 11, 2006
    Messages:
    38,893
    Likes Received:
    16,449
    Yes, I believe that is the right answer.
     
  18. srrm

    srrm Member

    Joined:
    Feb 17, 2009
    Messages:
    1,956
    Likes Received:
    307
    Durvasa and Trini Rocket got it.
    That's a nasty interview question. How did you end up answering it?
     
  19. Landlord Landry

    Joined:
    Mar 3, 2008
    Messages:
    6,857
    Likes Received:
    296
    the correct answer is "thank you for your time, but I'm gonna keep looking"
     
  20. moestavern19

    moestavern19 Member

    Joined:
    Dec 8, 1999
    Messages:
    39,003
    Likes Received:
    3,641
    Conditional Probability, I vaguely remember this now from statistics class.

    Sure seems like they could have worded the question better.
     

Share This Page