The Assertion That It Is Better To Switch In The Monty Hall Problem.

  A search for Monty Hall problem 1 is also known as returned Monty Hall Paradox, Prisoner's Dilema 2 and Three-Card Monte 3. The concept is that there are three choices, one desirable/win option and two undisirable/lose options. Monty Hall's TV show "Let's Make a Deal" is the source of the problem's name for choosing a door. One has a valuable prize, the othe two a booby prize. Prisoner's Dilema offers a one choice for a pardon and two of execution. A honest Three-Card Monte game would have an option to change the choice after the reveal. It practice it is a scam with the winning card removed before the choice, no reveal of one card and no choice to switch or hold.

  Intuitively it seems a 50%-50% chance of which option is the winner. The references say switching the choice after the reveal of one losing option gives about a 66% chance of winning and about a 33% of winning by holding on the first choice. I accept that, but the explanations why are not "satisfying".

  There are three things for me to do.
1. Do an empirical test to prove the assertion. Source code for the test as console and GUI are below.
2. Try harder to figure it out myself.
3. Maybe someone reading this e-mails me with a better explanation. (remember I've looked at several on the internet.

Source Code

  The programs verify the win of switch or hold as 66% - 33% to 68% - 32%, and consistantly 67% - 33% when Iterations is set to 1 000 000 or more.

Console Version
#compile exe
#dim all
function pbmain() as long
  local CurrentIteration, NumOfIterations, Win_Door, Choice_Door as long
  local Revealed_Door, Hold_Wins, Switch_Wins as long
  '
  con.caption$ = "Test Monty Hall Switch Or Hold Chances"$$
  '
  'Seed the random number generator
  randomize
  '
  NumOfIterations = 1000000
  print "Number of iterations: " + dec$(NumOfIterations)
  for CurrentIteration = 1 to NumOfIterations
    '1. Randomly place the win behind Door 1, 2, or 3
    Win_Door = rnd(1, 3)
    '
    '2. Player makes an initial random choice
    Choice_Door = rnd(1, 3)
    '
    '3. Reveal a door. It must meet two conditions:
      'It cannot be the choice door.
      'It cannot be the win door.
    do
      Revealed_Door = rnd(1, 3)
    loop while Revealed_Door = (Choice_Door) or (Revealed_Door = Win_Door)
    '
    '4. Is choice door the win door?
    if Choice_Door = Win_Door then
      incr Hold_Wins
    else
      incr Switch_Wins
    end if
     '
  next
  '
  '5. Report the results
  print "Wins for holding: " + dec$(Hold_Wins) + ", is " + _
     dec$((Hold_Wins / NumOfIterations) * 100) + "%."
  print "Wins for switching: " +dec$(Switch_Wins) + ", is "_
    dec$((Switch_Wins / NumOfIterations) * 100) + "%."
  '
  waitkey$
end function
GUI (Graphic User Interface)
#compile exe
#dim all
declare function MessageBox lib "User32.dll" alias "MessageBoxW" _
   (byval hWnd as dword, lpText as wstringz, lpCaption as wstringz, _
    byval dwType as dword) as long
function pbmain() as long
  local CurrentIteration, NumOfIterations, Win_Door, Choice_Door as long
  local Revealed_Door, Hold_Wins, Switch_Wins as long
  local NumOfIterationsStr, Hold_WinsStr, Switch_WinsStr as wstring
  '
  'Seed the random number generator
  randomize
  '
  NumOfIterations = 1000000
  NumOfIterationsStr = "Number of iterations: "$$ + dec$(NumOfIterations)
  for CurrentIteration = 1 to NumOfIterations
    '1. Randomly place the win behind Door 1, 2, or 3
    Win_Door = rnd(1, 3)
    '
    '2. Player makes an initial random choice
    Choice_Door = rnd(1, 3)
    '
    '3. Reveal a door. It must meet two conditions:
      'It cannot be the choice door.
      'It cannot be the win door.
    do
      Revealed_Door = rnd(1, 3)
    loop while Revealed_Door = (Choice_Door) or (Revealed_Door = Win_Door)
    '
    '4. Is choice door the win door?
    if Choice_Door = Win_Door then
      incr Hold_Wins
    else
      incr Switch_Wins
    end if
     '
  next
  '
  '5. Report the results
  Hold_WinsStr = "Wins for holding: "$$ + dec$(Hold_Wins) + ", is "$$ + _
     dec$((Hold_Wins / NumOfIterations) * 100) + "%."$$
  Switch_WinsStr = "Wins for switching: "$$ + dec$(Switch_Wins) + ", is "$$ + _
    dec$((Switch_Wins / NumOfIterations) * 100) + "%."$$
  '
  MessageBox(0, NumOfIterationsStr + $$crlf + Hold_WinsStr + $$crlf + _
     Switch_WinsStr, "Test Monty Hall Switch Or Hold Chances"$$, _
     %mb_ok or %mb_iconasterisk or %mb_taskmodal)
end function

End Matter

1 wikipedia.org/.../Monty_Hall_problem
2 wikipedia.org/.../Prisoner's_dilemma
3 wikipedia.org/.../Three-card_monte

Created on 07 October 2026.
Placed in public domain Dale Yarker.

To Dale's Notebook
go to Dale's Notebook index
To Programs
go to Programs index