"Monty hall"-esque marble selection problem driving me insane

97 Views Asked by At

enter image description here

The quiz and explanation is from Brilliant.com course "Exposing Misconceptions".

Summary of the problem:
Two random coins are flipped and put in a bag(without changing orientation).
One person draws a coin, it turns out to be heads. Therefore, there could've been 3 cases:

  • heads, heads
  • heads, tails
  • tails, heads

among these 3 cases, since the first person took out heads, in 1 case head remains while the other 2 cases tail remains. Therefore, it is more likely for the remaining coin to be tails (2/3)

The explanation seems to make sense... until it doesn't.
This basically means that one should be able to guess an outcome of a totally independent random function just by observing one of the samples.

To see if the probability of any remaining coin is really likely to be heads(66%) if one coin was tails, I ran the following code (javascript):

https://jsfiddle.net/novh5zc8/1/

function flip() {
    if (Math.random() > 0.5)
        return true // red
    else
        return false // blue
}

let correct = 0;

for (let i = 0; i < 1000; ++i) {
    let x = flip(); // red or blue
    let y = flip(); // red or blue
    if (flip()) { // choose one at random
        if (x) // if one is red, the other is apparently likely to be blue
            correct += y == false ? 1 : 0;
        else // if one is blue, the other is likely to be red
            correct += y == true ? 1 : 0;
    } else { // same as above
        if (y)
            correct += x == false ? 1 : 0;
        else
            correct += x == true ? 1 : 0;
    }
}

alert(correct);

// average outcome: 500 correct guesses (50%)

To no one's surprise, the fact that one random sample being red making the other remainder likely to be blue was incorrect.

However, the logical explanation from Brilliant.com looks very convincing.

Is their explanation correct, and is my code somehow different in architecture? Or if their explanation is incorrect, what is the logical flaw?

3

There are 3 best solutions below

0
On BEST ANSWER

To summarize the discussion in the comments: the problem can not be answered as stated as we need to know the manner in which the removed red ball was selected.

If the person just took out one of the two randomly, with equal probability, independent of the colors, then the answer is $\frac 12$. Indeed, the probability that a red ball was selected is clearly $\frac 12$ in this scenario so Bayes tells us the a posteriori probability that the orginal contents of the bag were $RB$ or $BR$ is $$\frac {(1/2)\times (1/2)}{1/2}=\frac 12$$

(Informally: each ball is red or blue with equal probability and independently of the other. Knowing that a given ball is red tells you nothing about the other).

If, however, the person wanted to select a red ball...examined both balls with the intent of removing a red one...then the answer is $\frac 23$ for the reason given in the link. Removing a red one rules out $BB$ as the original contents of the bag, but it doesn't distinguish between the other three cases. It's as if the other looked at the contents and, when you asked them "is there at least one Red ball in there" they said "Yes".

(Informally: the fact that the person chose not to remove the other ball is evidence that it is blue. Not proof, but evidence).

Or, if the intent was to select a blue ball, then the fact that a red one was removed proves that the bag must contain $RR$, else the person would have extracted a blue one as they wanted. So in that case the answer would be $0$.

(Informally, in this case the fact that the person chose not to remove the other ball is proof that it is red).

Other assumptions might well lead to even more possible answers, but I think these are three pretty natural sets of assumptions and, as you see, they yield three different answers.

2
On

There is a key difference between the problem and your code, namely the following: The two coins are indistinguishable, in your code however the variables $x$ and $y$ very much are distinguishable. What you modeled in your code is the following problem:

A coin $x$ and a coin $y$ are being flipped. Then one of the coins, w.l.o.g. $x$, is being looked at and turns out to be heads. What is the probability that coin $y$ is heads/tails.

In that problem indeed the probability is 50:50, since the possible outcomes are the following

($x$: heads, $y$: heads), ($x$: heads, $y$: tails), ($x$: tails, $y$: heads), ($x$: tails, $y$: tails)

and after seing $x$ is heads this reduces to

($x$: heads, $y$: heads), ($x$: heads, $y$: tails)

so 50:50.

Note how the fact that $x$ and $y$ are distinguishable means, that there is one more option excluded, reducing them to only two.

In the problem with the coins however it is unclear which of the coins you look at, so there is an additional option remaining after you look at one of the coins.

0
On

A problem that is even more like this problem than the Monty Hall problem is the Boy or Girl Paradox or Two Daughters Problem: "If you know that someone has two children, and one of them is a girl, what is the probability of the other child being a girl?" In fact, I am fairly confident that this was the inspiration for the problem presented here by Brilliant. com. Many presentations of the Two Daughters Problem will argue (exactly like Brilliant.com does) that the probability should be $\frac{1}{3}$ rather than the intuitive $\frac{1}{2}$, thus suggesting that humans are not good with probability. And this is of course exactly what Brilliant.com is trying to do here: "See? You really need to take our course on probability to help you get better at thinking with probability!"

Unfortunately, all these three probability problems (Monty Hall, the 2 daughters, and the one presented by Brilliant.com here) suffer from not being clear in the problem statement. And that means that you get different answers depending on exactly what assumptions go into it.

@lulu points out some different scenarios, but frankly, I think the most 'natural' interpretation of what is going on in the scenario with the coins and the bag as described by Brilliant.com is that the other person simply randomly pulled out one of the coins without looking first themselves, and it turned out to be red. And with that assumption, you are absolutely correct: the chance of the other one being red is now simply $\frac{1}{2}$.

Indeed, I think Brilliant.com really screwed up here: to get to the $\frac{1}{3}$ in the original two daughter problem, you would need to know that 'at least one of the two children is a girl' .. and as I explain in my answer here, even that statement is ambiguous: If you are being shown one girl, and know there is some other child, we're back at $\frac{1}{2}$ ... and that's exactly what the scenario as described by Brilliant.com sounds like.