(adsbygoogle = window.adsbygoogle || []).push({}); The solution is said to be yes, because you have 1/3 probability to stay and 2/3 probability to switch. Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?

The answer to this problem has annoyed me to an extent. Why is the host completely ignored as a variable to calculate the probability? I think there is an error in this solution due to the fact that the host and his actions are completely ignored.

Example:

' does not switch

For c = 1 To 10000

car = Rand(0, 2)

If car = 0 Then

x = x + 1

End If

Next c

'always switches

For c = 1 To 10000

car = Rand(0, 2)

If car = 2 Then

y = y + 1

ElseIf car = 1 Then

y = y + 1

End If

Next c

This algorithm will create the same result, 1/3 does not switch, 2/3's switch.

Now if I introduce the host as a variable:

With this algorithm, the probability changes to 1/3 and 1/3 and shows that you have equal chance to win, if you do or do not switch doors. For c = 1 To 10000

car = Rand(0, 2)

If car Xor 1 = 0 Then

host = 2

ElseIf car Xor 2 = 0 Then

host = 1

End If

If host = 1 Then

If car = 0 Then

n = n + 1

End If

ElseIf host = 2 Then

If car = 0 Then

n = n + 1

End If

End If

Next c

'my version - switch is always made

For c = 1 To 10000

car = Rand(0, 2)

' host must decide which door to open based on the location of car. Since he always opens a losing door....

If car Xor 1 = 0 Then 'if car is in door 1

host = 2 'host will open door 2

ElseIf car Xor 2 = 0 Then

host = 1

End If

If host = 1 Then ' if host opens door 1

If car = 2 Then 'switch is made to door 2, is there a car?

z = z + 1 ' win

End If

ElseIf host = 2 Then

If car = 1 Then

z = z + 1

End If

End If

Next c

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Monty Hall problem

Loading...

Similar Threads - Monty Hall problem | Date |
---|---|

I Monty Hall - Multiple solutions via direct calculation? | Mar 8, 2016 |

Question on the Logic of the Monty Hall Problem | Apr 11, 2015 |

Modified monty hall problem | Sep 3, 2013 |

Variants of Monty Hall problem | Nov 18, 2011 |

Monty Hall Problem - But with 4 doors and two opportunities to switch | Apr 14, 2010 |

**Physics Forums - The Fusion of Science and Community**