![]() | This is the talk page for discussing changes to the Monty Hall problem article itself. Please place discussions on the underlying mathematical issues on the Arguments page. If you just have a question, try Wikipedia:Reference desk/Mathematics instead. |
![]() | Monty Hall problem is a former featured article. Please see the links under Article milestones below for its original nomination page (for older articles, check the nomination archive) and why it was removed. | ||||||||||||||||||||||||
![]() | This article appeared on Wikipedia's Main Page as Today's featured article on July 23, 2005. | ||||||||||||||||||||||||
|
![]() | This ![]() It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||||||||||||||
|
![]() | This article is written in American English, which has its own spelling conventions (color, defense, traveled) and some terms that are used in it may be different or absent from other varieties of English. According to the relevant style guide, this should not be changed without broad consensus. |
|
This page has archives. Sections older than 30 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
This article is lovely insofar as it illustrates so well confusion. It should be listed under "Magical Thinking", or "Cognitive bias", and probably "Vain attempts". I will not even begin to correct it, nor explain (I know my WP); just let possible startled readers know that yes, it is a lot of gobbledigook, some of it by people who are perfectly aware and enjoy it. Environnement2100 ( talk) 10:55, 8 April 2023 (UTC)
Monty Hall
Prize behind door 1.
Choose door 1. Shown door 2. Swap Result lose.
Chose door 1. Shown door 3. Swap Result lose.
Choose door 1. Shown door 2. No swap. Result win.
Choose door 1. Shown door 3. No swap. Result win.
2 wins and 2 losses from 4 possibilities when you choose the correct door.
Choose door 2. Shown door 3. Swap. Result win.
Choose door 2. Shown door 3. No swap. Result lose.
1 win and 1 loss from 2 possibilities when you choose the wrong door.
50/50 chance. 213.128.242.112 ( talk) 18:59, 1 July 2023 (UTC)
Can I propose an addition to the 'Solutions by simulation' section - a simplified Python script to give the following result (approximately)
Overall success rate given a stick or switch strategy win_rate(monty_knows=True, will_switch=True, give_overall_result=True) = 0.6641 win_rate(monty_knows=True, will_switch=False, give_overall_result=True) = 0.3349 win_rate(monty_knows=False, will_switch=True, give_overall_result=True) = 0.3359 win_rate(monty_knows=False, will_switch=False, give_overall_result=True) = 0.3254 Success rate at the point where the contestant has a choice to stick/switch win_rate(monty_knows=True, will_switch=True, give_overall_result=False) = 0.6685 win_rate(monty_knows=True, will_switch=False, give_overall_result=False) = 0.3337 win_rate(monty_knows=False, will_switch=True, give_overall_result=False) = 0.5004 win_rate(monty_knows=False, will_switch=False, give_overall_result=False) = 0.5002
The Python code is as close to pseudo code as I could make it.
""" Monty Hall probability calculator. """ import random # Random number generator module def random_door(except_doors): """ Return a random door number which in not in the list given. """ while True: n_doors = 3 door = random.randrange(1, n_doors + 1) # Return 1, 2 or 3 if door not in except_doors: return door def win_rate( monty_knows: bool, will_switch: bool, give_overall_result: bool) -> float: """ monty_knows: True if Monty knows which door has the prize, False otherwise. will_switch: True if, given a choice, the contestant will switch doors. give_overall_result: True if we want the probability of winning with a given strategy False to give the probability of winning from the point when a stick or switch choice is made. Returns: Probability of contestant winning given the test criteria above. """ # Note: Doors are numbered 1, 2, 3... runs = 0 # The number of valid games wins = 0 # The number of times the contestant has won so far while runs < 10000: runs = runs + 1 # Increment the run count (may get decremented later) prize_door = random_door(except_doors=[]) # Door with the prize choose_door = random_door(except_doors=[]) # Door chosen by the contestant if monty_knows: # Monty knows which door has the prize. # He chooses to open the door without a prize second_door = random_door(except_doors=[choose_door, prize_door]) # The contestant must choose to switch or stick if will_switch: choose_door = random_door(except_doors=[choose_door, second_door]) else: # Monty does not know which door has the prize # He chooses one of the other doors to open second_door = random_door(except_doors=[choose_door]) if second_door == prize_door: # Monty has opened the second door and revealed the prize, so # the contestant loses. if not give_overall_result: # We want to give the probability of winning from the point # of being given a choice, so we discard this scenario from # the results. runs = runs - 1 else: # The second door does not have the prize. # The contestant must choose to switch or stick if will_switch: choose_door = random_door(except_doors=[choose_door, second_door]) # Has the contestant won? if choose_door == prize_door: wins = wins + 1 return wins / runs if __name__ == '__main__': print("Overall success rate given a stick or switch strategy") print(f"{win_rate(monty_knows=True, will_switch=True, give_overall_result=True) = }") print(f"{win_rate(monty_knows=True, will_switch=False, give_overall_result=True) = }") print(f"{win_rate(monty_knows=False, will_switch=True, give_overall_result=True) = }") print(f"{win_rate(monty_knows=False, will_switch=False, give_overall_result=True) = }") print("Success rate at the point where the contestant has a choice to stick/switch") print(f"{win_rate(monty_knows=True, will_switch=True, give_overall_result=False) = }") print(f"{win_rate(monty_knows=True, will_switch=False, give_overall_result=False) = }") print(f"{win_rate(monty_knows=False, will_switch=True, give_overall_result=False) = }") print(f"{win_rate(monty_knows=False, will_switch=False, give_overall_result=False) = }")
92.239.201.60 ( talk) 09:02, 7 June 2024 (UTC)
The Monty Hall dilemma of which door to select is a solvable problem dealing with increasing one's probability of winning the Car. 1)At first you are given three doors 1 thru 3 to choose from. Each door has a 1/3 chance of having the Car behind the door. So you choose one door. 2)However, when Monty reveals the goat prize behind a particular door, you are asked by Monty if you wish to change from your previously picked door to the other remaining? 3)ANSWER, Since new information has been added to the Choice, you should change! 4)This is due to the fact the goat door which was 1/3 probability (now you know the Car isn't there) combined with the door Monty asks you if you wish to change your choice to, having an initial probability also of 1/3 now COMBINES to 2/3 (the universe of choices) which is a higher probability than the initial choice door of 1/3! BigWillJohn ( talk) 01:31, 21 June 2024 (UTC)