Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Holiday - brain teaser
Message
 
To
24/11/1999 19:39:57
General information
Forum:
Politics
Category:
Other
Miscellaneous
Thread ID:
00295415
Message ID:
00295727
Views:
36
Hi,

>Monty Hall asks you if you want to change the door you have chosen. Should you change? And why?

Yes, change. The probability to pick the right one is 33.3% per door. This probability doesn't change for the first door when the other one is opened, because Monty didn't arbitrarily opened one of the remaining two, but the one that is guaranteed to have no boat behind it. That gives the third door a probability of 66.6% to be the right one.

If you don't believe that, just run the following VFP program. *g*
lnChange = 0
lnNotChange = 0
Do While Inkey() == 0
	* This door contains the boat
	lnDoor = Int(Rand()*3)+1
	* This is your selected door
	lnChoice = Int(Rand()*3)+1
	* These doors are available after you made a choice
	lcAvailable = ChrTran("123",Str(lnChoice,1),"")
	* Trim out the right one. Remains the door that is opened by Monty
	lcAvailable = ChrTran(lcAvailable,Str(lnDoor,1),"")
	* You picked the wrong one. You win when you change
	If Len(lcAvailable) == 1
		lnChange = lnChange + 1
	* You picked the right one. You win when you don't change
	Else
		lnNotChange = lnNotChange + 1
	Endif
	@ 1,0 Say "Win when change:"+Str(lnChange)
	@ 2,0 Say "Win when don't change:"+Str(lnNotChange)
Enddo
Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform