Tue, 25 Jan 2005

Tuesday, January 25, 2005

 
The answer to the problem last week is... (I realised I don't have a good explanation, so here are two).
You should always swap. When you make your first selection, you have a 1/3 chance of picking the right door. It's irrelevant what happens next (ie. someone opening one of the other doors) so if you stay with that door, you have a 1/3 chance of picking the right door. Consequently, if you swap you have a 2/3 change of getting it correct, hence you should swap. The fact that in the end you have a choice between two options (50/50 chance) is irrelevant as it's not possible to setup this system.
Another explanation, try this simulation on your own machine:
gawk 'END{r=0;swin=0;pwin=0;while(1){++r; d=int(rand()*3);p=int(rand()*3);o=p; while(p==o||o==d)(o=int(rand()*3)); s=3-p-o;if(s==d)++swin;if(p==d)++pwin;print "pick=" p " prize=" d " open=" o " switch=" s " switch win=" swin*100/r "% pick win=" pwin*100/r "%"; }}' /dev/null
 

[/ImportBlogspot] permanent link