|
#1
|
|||
|
|||
A Microsoft Interview Question (aka basic Bayes\' Theorem)
If you don't know or understand Bayes' Theorem, this problem is for you. If you do, this problem will be trivial, and I ask you not to answer. Really, it isn't worth your time. [img]/images/graemlins/smile.gif[/img]
When I worked at Microsoft, I used to ask this as an interview question. Most of the candidates struggled with it. Hopefully you will figure it out quickly. Also, try to figure it out on your own before you read anyone else's answer. You and a friend are playing Russian Roulette with a six-chambered revolver. You place two rounds in adjacent chambers and give the wheel a final spin. You hand the gun to your friend. He pulls the trigger... Click. He hands the gun to you. You have a choice. You can spin it again, or you can simply shoot the next chamber. Does it matter which one you choose? If it does, why? |
#2
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
Isn't this sort of like the Monty Hall problem?
-DB EDIT: Never mind, you said "adjacent chambers". That changes things. |
#3
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
Wouldn't you want to spin it again, because once he hands the gun to you, you would have a 2/5 chance of shooting youself, because the chamber before was empty. If you spun it again, you would have a 2/6 chance of shooting yourself.
Is this correct? |
#4
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
[ QUOTE ]
Wouldn't you want to spin it again, because once he hands the gun to you, you would have a 2/5 chance of shooting youself, because the chamber before was empty. If you spun it again, you would have a 2/6 chance of shooting yourself. Is this correct? [/ QUOTE ] Not quite, but you're close. Like the Monty Hall problem, this is an exercise in conditional probability. Think about this: Your friend just pulled the trigger and hit an empty. How many total states could the revolver have been in when your friend shot, and how many of these cause you to blow your own brains out? |
#5
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
ok, dont' laugh you bayesian snobs, but i drew 6 empty holes in a circle and filled in 2 of them. there are 4 possible states its in when your friend pulls the trigger and didn't kill himself. afterwards, there are only 3 possible empty chambers that won't kill you; b/c if he was on the one just before the filled one, you're on the filled one and you're fcuked. your chances are 3/6 which is not as good as 4/6 so you should spin again and point it at your friend for convincing you to play this stupid game.
|
#6
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
[ QUOTE ]
there are 4 possible states its in when your friend pulls the trigger and didn't kill himself. afterwards, there are only 3 possible empty chambers that won't kill you; b/c if he was on the one just before the filled one, you're on the filled one and you're fcuked. your chances are 3/6 which is not as good as 4/6 so you should spin again and point it at your friend for convincing you to play this stupid game. [/ QUOTE ] I disagree with the "3/6" number, but I agree with turning the game around on your dumbass friend. I'm pretty sure that happened on 24 a couple of seasons ago. |
#7
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
First look, it is 4/6 to live on first shot and 3/5 to live on second shot. 66% is higher than 60% so spin? But looking at where the first shot could have landed, the next shot will kill 25% and let me live 75% if i just pull the trigger. So I guess no spin ......click.
|
#8
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
[ QUOTE ]
But looking at where the first shot could have landed, the next shot will kill 25% and let me live 75% if i just pull the trigger. So I guess no spin ......click. [/ QUOTE ] huh? i got the 1st part on 4/6 vs 3/5 (not 3/6 like i thought)...a little help w/ this part? |
#9
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
ok, feeling dumb...i get it now...and i think you guys dont' wanna get into a russian roulette game w/ me now!!! lol...
|
#10
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
i'll give it a shot...after your friend blanks on his first shot, you've got at best 3 more blanks and at worst 0. there's really only 1 chamber that you have to be worried about, the one adjacent to the 2 remaining bullets...4 chambers - so 1/4 times, you'll be dead, and 3/4 times you'll survive. i'd rather take a 25% shot after my friend than another spin looking at 33% (2/6).
peace - jeff |
Thread Tools | |
Display Modes | |
|
|