MvS Was Right, Hope I Am Too

With Covid defeated (we’ve been vaxed) we tripped up to Fairbanks (aka Squarebanks) recently for a long overdue visit with family. The flights to and from were uneventful and Alaska Air even upgraded us to first class both ways. That’s Happy Wife’s brother on the right, his bride rear center with the peace sign flanked by their two daughters. They live in a cavernous log home brother Mike chinked himself way back when. We ate lots, drank too much, played board games and walked the trails around the property. They experienced epic snowfall up there this year so you had to be careful not to step off the trail lest you sank in up to your waist.

Their daughters are a delight to hang with. One is off to the U of Montana come Fall, the other is still in high school. They’re both smart as a whip. The younger daughter does math for fun. Being reminded of that we got off on the topic of the Monty Hall problem. Actually, I think it was one of the girls who brought it up. A long time ago in a magazine a reader posed a question to Marilyn vos Savant, aka MvS (smart as a whip herself):

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?

Marilyn replied the contestant should always switch because doing so gives the contestant a 2/3rds chance of winning. Most people, even really smart people, loudly disagreed with her. Duh, they said, obviously with only two doors left there’s a 50/50 chance of being right, i.e. picking the door with the car.

Showoff Marilyn stood her ground, calmly explained why she was correct in a follow-up comment, but still many people couldn’t bring themselves to accept the truth. In fact, pose this same question to people today and many will insist the answer is 50/50.

Back to our conversation… turns out the girls were also in disbelief, though being smart as whips were interested to hear my take on it. I admitted to being among the disbelievers when I first heard this problem. Then, after doing my homework, came to understand why MvS was correct. I diagrammed the problem for the girls on paper, assigned the initial probabilities to the car being behind each door (trivial), randomly picked a door to start a game, then revealed one of the goat doors as Monty Hall always did. I then showed them why the probability of the car being behind the remaining un-chosen door is 2/3rds, not 50/50. Good diagram here.

You could see on their faces the light go on! Notice that switching doesn’t mean the contestant is sure to win, only that on average, over repeated games, doing so wins the car 2/3rds of the time. The only way you lose with this strategy, of course, is if the car is behind the door you initially selected.

When we got back home I wrote a simulation to once again prove to myself MvS was right. Here’s the code (Java)

import java.util.concurrent.ThreadLocalRandom;

public class MontyHallSim {
	
	private int goats[] = new int[2];
	private int prizedoor ;
	private int guessdoor ;
	private int goatdoor;
	private int revealdoor;
	
	private int Rand(int min, int max) {
	  return ThreadLocalRandom.current().nextInt(min, max + 1);
	}
	private void Guess() {
	  guessdoor = Rand(1,3);
	}
	private void Seed() {
	  prizedoor = Rand(1,3);
	  if(prizedoor == 1) {
           goats[0] = 2;
	   goats[1] = 3 ;
	  } else if (prizedoor == 2) {
	   goats[0] = 1;
           goats[1] = 3 ;
	  } else {
	    goats[0] = 1;
	    goats[1] = 2 ;
	  }
	}
	private void Reveal() {
	  int goat = Rand(0,1); // random index into goats array 
	  revealdoor = goats[goat] ;
	  if(revealdoor == guessdoor) {
	    revealdoor = goat == 0 ? goats[1] : goats[0] ;
	  }
	  goatdoor = revealdoor == goats[0] ? goats[1] : goats[0] ;
	}
	private double Run(long games) {
	  long wins = 0 ;
	  for(int i=0;i<games;i++) {
            Seed() ; // randomize goats and prize behind doors
	    Guess(); // randomize contestant's guess
	    Reveal(); // Monty reveals a goat door
	    wins += guessdoor == goatdoor ? 1 : 0; // switch & win!
	  }
	    return (double)wins/(double)games ;
	}
	public static void main(String[] args) {
	  long ngames = 300000000 ;
	  double prob = (new MontyHallSim()).Run(ngames) ; 
	  System.out.println("Probability of winning if you switch       
          (n=" + ngames +"): " + prob*100.0 + "%") ;
	}
}

Compile that and let ‘er rip on your computer, say three hundred million times (see ngames value). Guess what the output is?

Why, it’s precisely what MvS said it would be

Probability of winning if you switch (n=300000000): 66.665%

Moral of the story: Never bet against MvS.

What fascinates me is how counterintuitive the right answer is. Way back when I first encountered the problem I was like no way.

Late last week then we hosted our first dinner party in over a year

HW spent all day and part of the night before making a truly delicious Coq au Vin, served over Polenta with a side of grilled bread. That last was the only part I was directly involved with, except I did have the forethought to de-cellar what turned out to be a sumptuous 2007 Amarone from one of my favorite producers.

Those are our dear friends we did that crazy Pittsburgh –> DC bike ride with a couple years ago. All of them are retired. Being we’re next in line to reach that milestone (ever so close) I pick their brains all the time. I’ve been working tirelessly pulling together a spreadsheet of information I need to do predictive financial planning for the next thirty years of life (fingers crossed). Because, as our financial advisor says, “Rod, a goal without a plan is merely a wish.” She’s right of course. So, god willin’ and the creek don’t rise it looks like we’re all set to go. I spend at least a half-day each weekend spinning what-if analyses in the spreadsheet. Even with conservative estimates of all the relevant variables (SS, ROI, etc.), and a very generous annual spending budget, we will likely leave money on the table when we exit this life. I don’t yet know how I feel about that prospect, compared to the alternative that is. Though I’m sure our beneficiaries will be thrilled!

Too bad MvS isn’t still with us, I’d ask her opinion.