Monty Hall Simulation
#4
Yeah I just ran a sim again either the First Picker wins or the Switcher wins. If the First Picker wins 1/3 then the Switcher wins 2/3 the time! Man 2/3 the time is a shocker! I thought it only improved odds by 1/6th to 50/50 but no, I was wrong,

Here is my sim that I used to prove to myself:
Code: (Select All)
Option _Explicit
Dim As Long trials, t, i, grandPrize, pick1, doorOpen, doorSwitch, OnePicker, Switcher
trials = 100
For t = 1 To trials
    grandPrize = Int(Rnd * 3) + 1 ' door 1 to 3
    pick1 = Int(Rnd * 3) + 1
    For i = 1 To 3
        If i <> grandPrize And i <> pick1 Then doorOpen = i: Exit For
    Next
    For i = 1 To 3 ' find doorSwitch
        If i <> pick1 And i <> doorOpen Then doorSwitch = i: Exit For
    Next
    If grandPrize = pick1 Then OnePicker = OnePicker + 1
    If grandPrize = doorSwitch Then Switcher = Switcher + 1
Next
Print "One picker wins ="; OnePicker
Print "Switcher wins = "; Switcher
b = b + ...
Reply


Messages In This Thread
Monty Hall Simulation - by dcromley - 08-16-2022, 03:51 PM
RE: Monty Hall Simulation - by bplus - 08-16-2022, 04:23 PM
RE: Monty Hall Simulation - by SMcNeill - 08-16-2022, 04:46 PM
RE: Monty Hall Simulation - by bplus - 08-16-2022, 05:00 PM
RE: Monty Hall Simulation - by SMcNeill - 08-16-2022, 05:01 PM
RE: Monty Hall Simulation - by bplus - 08-16-2022, 05:09 PM
RE: Monty Hall Simulation - by SMcNeill - 08-16-2022, 05:11 PM
RE: Monty Hall Simulation - by bplus - 08-16-2022, 05:27 PM
RE: Monty Hall Simulation - by SMcNeill - 08-16-2022, 05:42 PM
RE: Monty Hall Simulation - by Jack - 08-16-2022, 05:45 PM
RE: Monty Hall Simulation - by SMcNeill - 08-16-2022, 06:02 PM
RE: Monty Hall Simulation - by Kernelpanic - 08-16-2022, 07:40 PM
RE: Monty Hall Simulation - by Pete - 08-17-2022, 01:56 AM



Users browsing this thread: 2 Guest(s)