The intuitive answer I came up with initially, and lots of other smart people did as well, was there's no advantage to either. There's two unopened doors remaining, and one has a car, one has a goat right? But that is wrong. Look at the above link for a detailed description of why, it's going to do a better job than I do. But the right answer is...change your first guess to the remaining door...2/3 vs 1/3 advantage in theory.
But I'm an idiot who doesn't understand the theory hahaha. So let's run the actual experiment! I have a T-SQL hammer and this looks like a nail. First we'll set up an output table:
CREATE TABLE #Output (Setup INT, FirstChoice INT, SecondChoiceChange BIT, Result CHAR(1))
GO
So Setup is the randomized door number that has the car (1 to 3), FirstChoice is the randomized first door choice from the contestant, SecondChoiceChange is a boolean value, does the contestant change their first choice to the remaining door for the second guess, yes or no, and Result is if they win.
Declare @Setup INT
Declare @FirstChoice INT
Declare @SecondChoiceChange BIT = 0
Declare @Result CHAR(1)
SET @Setup = FLOOR(RAND() * 3) + 1
SET @FirstChoice = FLOOR(RAND() * 3) + 1
IF (@SecondChoiceChange = 0)
BEGIN
SET @Result = CASE WHEN (@FirstChoice = @Setup) THEN 'W' ELSE 'L' END
END
ELSE
BEGIN
SET @Result = CASE WHEN (@FirstChoice = @Setup) THEN 'L' ELSE 'W' END
END
INSERT INTO #Output (Setup, FirstChoice, SecondChoiceChange, Result)
SELECT @Setup, @FirstChoice, @SecondChoiceChange, @Result
GO 1000
This runs the experiment and outputs to the temp table 1000 times...initially set to make the contestant keep his first choice. Once run, then flip @SecondChoiceChange to 1, and rerun the batch for the 1000 times. Now we can look at the results:
SELECT SecondChoiceChange, Result, count(1) as Count FROM #Output
GROUP BY SecondChoiceChange, Result
| SecondChoiceChange | Result | Count |
| 0 | L | 653 |
| 0 | W | 347 |
| 1 | L | 359 |
| 1 | W | 641 |
Anyway, that was a fun mental exercise for stubborn people like myself who wanted to see it proved out. 2/3 wins for the change second guess side, 1/3 win when you stick with your original guess. Would be fun to have an actual game show like this out in the real world and see what people do in real life!
No comments:
Post a Comment