Live data from Hacker News

A confusing probability question: Red and green balls in an urn

colab.research.google.com

141–150 of 169 posts

Re: A confusing probability question: Red and green balls in an urn

#141
post #83

Early in my career, when I first started interviewing, I used to ask a version of this to recent grads. It was never a make-or-break question, but I found it to be a great way to a.) see how people approach problem solving and probability and b.) see how they respond when you start asking whys (even if they answered/guessed 1/3). It's something that takes zero code to answer, and the intuition is easy to grok once ex…

> what is the most probable distance between the two points? > even if they answered/guessed 1/3 1/3 is not the most probable distance, it's the expected value. The most probable distance does not exist, but PDF(d) is strictly decreasing for (d>0).

You're right. Thinking back, I think I asked "what's the average distance" not "what's most probable".

Re: A confusing probability question: Red and green balls in an urn

#142
post #135

Earlier quoted context omitted.

You have two coins, one is biased heads and the other biased tails. Someone picks a coin without you knowing which one, then starts flipping. The first toss shows heads. Does that mean subsequent flips from the same coin will be more likely to be heads? Yes. Answer is only no if all coins are the same with no bias, which they are not.

I’m not clear why you posted this. This is a different problem from the one being discussed.

The problem being discussed is the same as my toy example, just extended to more coins.

You now have 101 coins, with biases ranging from 100 percent heads (or urn with only red balls) to 100 percent tails (or urn with only green).

Someone chooses one of the 101 coins randomly (each coin has equal probability of being chosen) and starts flipping it.

First flip shows heads, what is the probability the next flip is also heads?

Answer is 2/3.

The point is that knowing what was the first flip gives information about what biases a coin may have.

The original problem has a minor technical twist that balls are drawn without replacement, but it’s an irrelevant detail for N>10 total balls.

Re: A confusing probability question: Red and green balls in an urn

#143
post #9

Off the top of my head and using my fingers the probability is: 4901:4900 in favor of red. (100*98/2 = 100*49. Plus one in favor of red) If the number of distribution were odd, the odds would be even. Am I right?

Where did you get 98 from?

Let's try it as a set of 3 balls. You have 3 balls in an urn, random number of red v green, the first one you pull is red, what's the likelihood that the second one you pull is also red?

Re: A confusing probability question: Red and green balls in an urn

#144
post #142

Earlier quoted context omitted.

I’m not clear why you posted this. This is a different problem from the one being discussed.

The problem being discussed is the same as my toy example, just extended to more coins. You now have 101 coins, with biases ranging from 100 percent heads (or urn with only red balls) to 100 percent tails (or urn with only green). Someone chooses one of the 101 coins randomly (each coin has equal probability of being chosen) and starts flipping it. First flip shows heads, what is the probability the next flip is also…

I mean, sure, what you’re describing is relevant to the original discussion, but you’ve posted it in a sub thread about how it changes if it is a 50/50 binomial distribution.

You’ve replaced it with a binomial of a uniformly selected p, which ends up being, amusingly, the same as a uniform.

Re: A confusing probability question: Red and green balls in an urn

#145
post #139

Earlier quoted context omitted.

Not really; he's hypothesizing a potential draw order, but what I was listing were the possible contents of the urn before any are drawn. Since the contents of the urn aren't ordered, they form a set, not a list, and shuffling elements doesn't add to the list of possibilities.

I don't think he/she is talking about that. I think the question is about the probabilities of each of the three options you lay out. You lay it out as though it's obvious the three are equally likely possibilities in the urn. That's only true using uniform distribution to generate the number of red(/green) in the urn. The contents of the urn would still be a set, but if the contents were initially drawn from a binom…

I thought that it was pretty clear from the part where it describes how the urn is filled:

> n of them are red, and 100-n are green, where n is chosen uniformly at random in [0, 100].

N is chosen first, and that many red balls are put in. You don't flip a coin 100 times and then determine N from how many heads you flipped, that would be a tortuous interpretation from my pov, and would violate the requirement that N is chosen uniformly, so it seems like it's right there in the question.

Re: A confusing probability question: Red and green balls in an urn

#146
Somewhat related is the "boy or girl paradox" ( https://en.m.wikipedia.org/wiki/Boy_or_girl_paradox ), where the answer to "Mr. Smith has two children. At least one of them is a boy. What is the probability that both children are boys?” may be 2/3 instead of 1/2. The problem is much debated.

I was made aware of this paradox by the book Bernoulli's Fallacy by Aubrey Clayton ( https://www.goodreads.com/book/show/55825328-bernoulli-s-fal... ), which I do recommend as an interesting read.

Re: A confusing probability question: Red and green balls in an urn

#147
post #142

Earlier quoted context omitted.

The problem being discussed is the same as my toy example, just extended to more coins. You now have 101 coins, with biases ranging from 100 percent heads (or urn with only red balls) to 100 percent tails (or urn with only green). Someone chooses one of the 101 coins randomly (each coin has equal probability of being chosen) and starts flipping it. First flip shows heads, what is the probability the next flip is also…

I mean, sure, what you’re describing is relevant to the original discussion, but you’ve posted it in a sub thread about how it changes if it is a 50/50 binomial distribution. You’ve replaced it with a binomial of a uniformly selected p, which ends up being, amusingly, the same as a uniform.

As long as you think the flipper chose their coin from a bag of coins with varied biases, then first flip always gives actionable information.

It’s mostly irrelevant what kind of distribution this bag of coins comes from (except for some degenerate cases). What matters is that selecting coins from this bag gives coins of varying biases.

Re: A confusing probability question: Red and green balls in an urn

#148
post #147

Earlier quoted context omitted.

I mean, sure, what you’re describing is relevant to the original discussion, but you’ve posted it in a sub thread about how it changes if it is a 50/50 binomial distribution. You’ve replaced it with a binomial of a uniformly selected p, which ends up being, amusingly, the same as a uniform.

As long as you think the flipper chose their coin from a bag of coins with varied biases, then first flip always gives actionable information. It’s mostly irrelevant what kind of distribution this bag of coins comes from (except for some degenerate cases). What matters is that selecting coins from this bag gives coins of varying biases.

Yes but the question being discussed assumes they are fair. That’s why it’s a different question.

Re: A confusing probability question: Red and green balls in an urn

#149

I think the wording is also biasing the outcome. The next ball is more likely to be green than the previous ball , and a lot of people will regard that posterior probability statement as implicit. If the question had been phrased differently eg, 'what is the most likely color for the next ball selected' I suspect more people would have voted for equal likelihood.

What does the previous ball have to do with it? We KNOW the previous ball is red. Then it asks "more likely to be red" It seems pretty obvious that it is saying draw the next ball, which is more likely? Red, green, equal. Why would you think it is comparing the second pick probability to the first pick probability?

Calm down. I don't think that, I'm saying a lot of people will read it that way because the previous draw is the only existing point of comparison. Think about how people use language casually vs the very specific approach of a math textbook.
Post reply on HN