phunk
Illuminator
- Joined
- Aug 10, 2007
- Messages
- 4,127
I just rolled a pair of dice 20 times. One die to represent the door with the prize behind it, the other to represent the contestant's guess. A roll of 1 or 2 means door 1, 3 or 4 means door 2, 5 or 6 means door 3. These are the results:
6/20= 0.3
14/20 = 0.7
That's pretty close to the expected odds. With more trials it should only get closer.
Code:
Prize Guess Stay Switch
1 3 lose win
3 2 lose win
3 2 lose win
3 3 win lose
3 3 win lose
2 3 lose win
1 3 lose win
1 2 lose win
2 1 lose win
2 3 lose win
3 2 lose win
2 2 win lose
1 1 win lose
3 3 win lose
3 1 lose win
1 3 lose win
2 3 lose win
2 3 lose win
2 2 win lose
1 3 lose win
Total: 6 14
6/20= 0.3
14/20 = 0.7
That's pretty close to the expected odds. With more trials it should only get closer.