Originally posted by hong2
First a few comments to Roy's QBasic codes:
The prg is correct but it's coding the wrong logics, i.e. it doesn't take care of the situation that an empty box was opened by the host. Naturally the result will be 1/3 and 2/3. If you change
prize = INT(RND(1) * 3 + 1) to
prize = INT(RND(1) * 2 + 1) , the answer will be 1/2 and 1/2 because the third box can't contain the prize.
Thanks for verifying my program.
Why should the prize location be random between 2 instead of 3? There are 3 boxes that the organizer can put the prize in randomly right?
The host will only open an empty box (after the initial choice is made). So the box he will open is determined by the box the player picks initially.
After the initial pick, the host opens an empty box, and the polayer is allowed to decide if he wants to switch. Note that at this point the key location does not change between the 2 un-opened boxes.
Originally posted by hong2
Now please allow me to give a new twist to the problem.
We still have three boxes, A, B and C but we now have 2
players X and Y. Let's say X chooses A, and Y chooses B. Supposed the host opens box C which happens to be empty (if it contains the prize, both players lose - no need for advice).
What does the "switching camp" advise our players now? X to switch to B but Y to switch to A? We have a paradox here:
1) Switch for both players mean that both will have 2/3 probability which add up to >1, obviously not allowed.
2) Prob(box to contain a prize) changes depending on who chooses it.
For box A, it is 1/3 for X but 2/3 for Y
for box B, it is 2/3 for X but 1/3 for Y
we would expect probability to be at least impartial!
How now:dunno:
The twist changes the game enough that the probablility calculations of the original game do not apply anymore.
With both players chooses different boxes, the host is left with only one box to open. Once that box is opened, the probability P(either one of the player wins) immediately collapses to either 1 (if the box host opens is empty) or 0 (if the box host opens has the key).
To look at the new game holistically:
case 1: P(player A picks the correct box initially) = 1/3
case 2: P(player B picks the correct box initially) = 1/3
case 3: P(both players picked empty boxes initially) = 1/3
So the probabilty that they will be offered to switch is P(case 1) + P(case 2) = 2/3. If they both picked empty boxes, the game is over.
That changes things alot, as now, there is no bebefit in switching. From the beginning, both player A and B has the same probability of getting the correct box. If it has been confirmed that one of them has actually got the correct box (the box the host opens is empty), they still have equal odds of winning the game, whether they switch or not.
So I don't think the twisted game scenario is a prove that the logic I presented on the original game is flawed.
Let me know what you think.
Thanks!
Roy