0

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?

Bram28
  • 100,612
  • 6
  • 70
  • 118
  • 5
    This is a bit hard to follow...the image you post doesn't even appear to include a question. And what is the mechanism by which the other person removes a ball? Do they take either ball randomly, with equal probability? Do they seek a red ball? Clearly that matters....Why not rewrite the question and add it to the text? Looks like a simple enough problem...no? – lulu Feb 08 '23 at 14:12
  • 2
    I note that you reference the Monty Hall problem, but in that case the selection of the exposed object is not at all random. The analogy here would be if the other person prefers to select a red ball, examines both, and selects a red if one is available. That is very, very different from a random selection. If the selection was random, then you need to use Bayes' Theorem to recompute the probabilities for the contents. – lulu Feb 08 '23 at 14:15
  • Note: post edit, it doesn't make sense to put a "flipped coin" into a bag. Once you put a coin in a bag, it loses its orientation. Maybe you mean they covered the two coins with a piece of paper or something...or you could just stick with the blue/red balls as described in the image. – lulu Feb 08 '23 at 14:17
  • @lulu I apologize for a low quality question - I am not used to asking mathematical questions, I have edited the original question to be more specific. What I'm really asking for is either approval disapproval of the original claim that witnessing that someone pulled a red ball out of a random bag with 2 balls(independent) that was not restored, you can accurately guess what the remaining ball's color is. – Gyuhyeon Lee Feb 08 '23 at 14:18
  • 2
    As I say, the question can not be answered without knowing how the person is making their choice. As with the Monty Hall problem, that mechanism is absolutely critical. – lulu Feb 08 '23 at 14:19
  • This is the confusing aspect of the Monty Hall problem. The answer is 2/3 if the person who removes the ball gets to look in the bag and select a red one, thereby making a nonrandom choice. The answer is 1/2 if the person who removes the ball chooses randomly, even if the ball he chooses randomly happens to be red. – eyeballfrog Feb 08 '23 at 14:20
  • If the person chose the ball randomly, then the answer is $\frac 12$, as each ball is equally likely to be red or blue, independently of the other. If the person selected the red ball intentionally, then it is $\frac 23$ for the reason given in the link. the entire point of Monty Hall is that we can use the intent of the other person to derive information. If the other person has no intent at all, then we can't get information from it. – lulu Feb 08 '23 at 14:20
  • Look at it this way: suppose the other person's intent was to remove a blue ball. That is, they looked at both balls and would have removed a blue one if there was one. In that case, the fact that they removed a red one proves that the other one is also red. – lulu Feb 08 '23 at 14:35

3 Answers3

4

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.

lulu
  • 70,402
1

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.

Bram28
  • 100,612
  • 6
  • 70
  • 118
0

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.

  • I've come to the conclusion that the original explanation in the screenshot is wrong. The correct calculation of a blue ball probability should've been 1/2 (the first person drew a first ball, and it was red) * 1/2 (the second ball is either blue or red) + 1/2 (the first person drew a second ball, and it was red) * 1/2 (the first ball is either blue or red) = 50%. – Gyuhyeon Lee Feb 08 '23 at 14:44
  • 1
    To clarify: My answer is to your "summary of the problem", not to what is described in the picture. – StiftungWarentest Feb 08 '23 at 14:53