Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Gambling > Probability
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #41  
Old 01-15-2005, 11:15 AM
Duke Duke is offline
Senior Member
 
Join Date: Sep 2002
Location: SW US
Posts: 577
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

Seems trivial. You know your buddy didn't get shot, so there is only one way it could have spun such that you will get killed with the next pull (knowing that the bullets are right next to each other).

There's a 1/6 chance of that having happened.

If you spin, there's a 1/3 chance that you'll be in position to blow your brains out.

The only way this could be countered that I can see is if there were an inherent flaw with the gun, and spinning it would always make it stop in non-lethal positions relative to the current placement of rounds.

Assuming a fair firearm, though, do not spin.

EDIT: I'm a tard and it should be 1/4 because the 2 slots gotta be thrown out.

~D
Reply With Quote
  #42  
Old 01-15-2005, 11:45 AM
dtbog dtbog is offline
Junior Member
 
Join Date: Jun 2004
Posts: 19
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

I can see it both ways, but I once worked at a company where a woman -- hired as a C++ programmer -- was fired after two weeks. Management cited her lack of productivity.

Her problem? She didn't know C++.

-DB
Reply With Quote
  #43  
Old 01-15-2005, 02:02 PM
smartalecc5 smartalecc5 is offline
Senior Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 136
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

ahh, adjacent chambers. Thank for the clarification- I missed that little part- haha [img]/images/graemlins/laugh.gif[/img]
Reply With Quote
  #44  
Old 01-15-2005, 03:03 PM
Ed Miller Ed Miller is offline
Senior Member
 
Join Date: Sep 2002
Location: Writing \"Small Stakes Hold \'Em\"
Posts: 4,548
Default Answer

Bayes' Theorem is a way to adjust a prior probability given new information.

In this case, the prior probability of finding a bullet directly after a spin is 2/6 or 1/3.

The new information is that your friend pulled the trigger, and there was no bullet in the chamber. That tells you something about which chambers can or cannot be next. There are only four chambers that held no bullet in them. Thus, you know the gun must have been on one of those chambers when your friend fired.

Of those four chambers he could have fired, three of them have empty chambers next to them. Only one of those four has a bullet next. So while the prior probability of finding a bullet is 1/3, the probability GIVEN THAT YOUR FRIEND DIDN'T FIND A BULLET, is only 1/4. Thus, you should just shoot the next chamber.
Reply With Quote
  #45  
Old 01-15-2005, 03:41 PM
jason1990 jason1990 is offline
Senior Member
 
Join Date: Sep 2004
Posts: 205
Default Re: Answer

Bayes' Theorem relates the conditional probability of A given B to the conditional probability of B given A. Often, it is necessary to invoke Bayes' Theorem in order to transform a prior probability distribution into a posterior probability distribution.

However, in our case, A is the event that the second shooter finds a bullet and B is the event that the first shooter does not. While it is true that P(A|B)=1/4, nowhere do we need to relate this to P(B|A). In fact, we can just compute this directly from the definition of P(A|B) without using Bayes' Theorem at all.

Definition of Conditional Probability:
P(A|B) = P(A and B)/P(B)

Bayes' Theorem:
P(A|B) = P(B|A)*P(A)/P(B)

It is the first formula, not the second, which captures the essence of the (correct) answers given in this thread. So while it may just be a matter of terminology, this is technically not an example of the use of Bayes' Theorem. It is simply an exercise in the computation of conditional probabilities. I just wanted to point this out for the benefit of those who may want to look further into this topic.
Reply With Quote
  #46  
Old 01-15-2005, 06:46 PM
CountDuckula CountDuckula is offline
Senior Member
 
Join Date: Dec 2003
Location: Castle Duckula -- home for many centuries to a dreadful dynasty of vicious vampire ducks: The Counts of Duckula!
Posts: 285
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

Ok, after rethinking my initial answer, I think my reasoning still applies, even though I overlooked the fact that there were 2 bullets. Since the friend has exposed one of the empty chambers, there is a 40% chance that the next chamber contains a bullet. However, if I spin, there is a 33% chance that the chamber that comes up will hold a bullet. Therefore, I spin.

Now to read on and see why I'm wrong.... [img]/images/graemlins/wink.gif[/img]


-Mike
Reply With Quote
  #47  
Old 01-15-2005, 07:15 PM
CountDuckula CountDuckula is offline
Senior Member
 
Join Date: Dec 2003
Location: Castle Duckula -- home for many centuries to a dreadful dynasty of vicious vampire ducks: The Counts of Duckula!
Posts: 285
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

[ QUOTE ]
Ok, after rethinking my initial answer, I think my reasoning still applies, even though I overlooked the fact that there were 2 bullets. Since the friend has exposed one of the empty chambers, there is a 40% chance that the next chamber contains a bullet. However, if I spin, there is a 33% chance that the chamber that comes up will hold a bullet. Therefore, I spin.

Now to read on and see why I'm wrong.... [img]/images/graemlins/wink.gif[/img]


-Mike

[/ QUOTE ]

Alllllllrighty, then; I stand corrected. [img]/images/graemlins/blush.gif[/img] Somehow, I didn't manage to realize that the fact that the bullets were adjacent made that much difference. [img]/images/graemlins/smile.gif[/img] Nice problem.

BTW, I seem to recall hearing of a problem that was also supposed to be a Microsoft interview question; it was something about 4 people walking at different speeds, crossing a bridge that could only hold 2 people at a time, and having to make the crossing while their flashlight held out. I remember being unable to solve it at the time (someone in my group at work relayed it to us), but I don't remember what the details were. Anybody else recognize this, and what the solution was?

-Mike
Reply With Quote
  #48  
Old 01-15-2005, 10:02 PM
TomCollins TomCollins is offline
Senior Member
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 172
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

I am not 100% sure of the details of the numbers, but I believe it was, 4 people must cross a bridge and have one flashlight. The people walk across at the slowest persons speed. Only 2 people can cross at a time. The people travel at 1 min, 2 min, 3 min, 4 min. Can they get across in 12 minutes? (warning my numbers are probably wrong).
Reply With Quote
  #49  
Old 01-15-2005, 10:19 PM
pzhon pzhon is offline
Member
 
Join Date: Mar 2004
Posts: 66
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

From the rec.puzzles archive: "Four people need to get across a bridge that can only support two at a time. It is night and one of the two must carry a flashlight. There is only one flashlight. How can they get across in 17 minutes if their crossings speeds are 1, 2, 5 and 10 minutes?"

Solution

The above is often described involving the band U2. There are other variants with different speeds, the solutions are essentially the same.
Reply With Quote
  #50  
Old 01-15-2005, 10:25 PM
GuyOnTilt GuyOnTilt is offline
Senior Member
 
Join Date: May 2003
Location: Southern California
Posts: 2,405
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

Hey Ed,

Haven't read through any of the responses, but here's my knee-jerk reaction without having thought it through. There are 6 possible placements. After your friend pulls a blank, there's only 4 possible placements, all of them equally likely. One of them gives you death, the other three let you live. Your chances of survival if you don't respin are 75%. If you respin, you get a random chamber and your chances of survival are 67%. So you should choose to respin or stand accordingly, depending on your goal.

GoT
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.