A confusing probability question: Red and green balls in an urn (colab.research.google.com)

73 points by eigenvalue ↗ HN
A Twitter post made the rounds yesterday asking the following question in the form of a poll (https://twitter.com/littmath/status/1751648838501224790):

Daniel Litt @littmath

You are given an urn containing 100 balls; n of them are red, and 100-n are green, where n is chosen uniformly at random in [0, 100]. You take a random ball out of the urn—it’s red—and discard it. The next ball you pick (out of the 99 remaining) is:

More likely to be red 22.6%

More likely to be green 37.1%

Equally likely 20.9%

Don’t know/see results 19.5%

I thought it was interesting (but not surprising) that so many people got this wrong. Basically, Bayesian thinking is really foreign to people. It's essentially similar to the famous Monty Hall problem, where the first bit of information tells you something about the world. In any case, I thought it might be illuminating to give a complete demonstration, using both exact calculations AND simulation, of the "wrong" and "right" approach, which you can see at the Colab link above.

168 comments

[ 3.3 ms ] story [ 247 ms ] thread
(comment deleted)
To try to put it into words:

We don't actually know the mix-rate of what's in the urn. It's possible we just pulled the only red ball and all the others are green... However the fact that our first n=1 sample happened to be red (and not something else) gives a small (and varying) amount of confidence towards red-heavier mixes rather than the red-scarce ones.

We can use that to figure out which mixes are slightly more-likely to be in there (based on our tiny amount of data after assuming they begin equally-likely) and then for each of those determine "if it's mix X, then what are the odds of our next draw", and combine the two layers of probability.

In this case, the bias towards presuming the mix is fundamentally reddish outweighs the presumption of "removing one red makes the greens the majority."

Yes, that's exactly right. Paraphrasing what another poster wrote about this on Twitter: "You would rather go fishing in a lake where you just saw someone else catch a fish."

Also, the logic continues as you draw more balls from the urn. If the second ball is ALSO red, then you have even more evidence suggesting that N was selected in such a way as to make red the overwhelmingly more likely choice. Thus the chance of the third ball being red is even higher than the 66% probability in the second draw.

To extend the fishing metaphor, the premise of ~100 balls is also important: If each lake could only sustain one (good) fish, you would actively avoid anywhere someone had already caught one from.
I guess the counterpoint to this is as the number of balls goes from 100 to infinite, it becomes increasingly harder to predict, correct?
No, the higher the count goes the closer it becomes to the single removed ball not mattering at all, so the only thing that matters is the information you got about which urn you're selecting from.
That's "what's the probability you've caught the world's meanest fish".
(comment deleted)
I agree. This is a beautiful summary of the logic I used
> However the fact that our first n=1 sample happened to be red (and not something else) gives a small (and varying) amount of confidence towards red-heavier mixes rather than the red-scarce ones.

I wouldn't characterize this as a small amount of confidence, as conditional distribution of the mix-rate after the first sample drastically differs from the prior.

Originally each mix-rate has 1/101 probablity. After the sample having a mix with n reds in it has the probablity 2n/(100101).

Follow up question:

> You are given an urn containing 100 balls; n of them are red, and 100-n are green, where n is chosen uniformly at random in [0, 100]. You select 99 balls at random and find that they are all red. What is the probability the last ball is red?

50%. With current knowledge N is either 100 or 99 with an equal probability.
Initially there is an equal chance that there are 99 or 100 red balls.

But if there is a green ball, it is unlikely to be the last picked. So the fact that you saw 99 red balls makes it unlikely there is a green ball.

No, the chance of it being red is much higher. If there's one green ball in the jar, than all previous draws would've needed to avoid the green one. The chances of that happening are way less than 50%.
(comment deleted)
This is a fantastic follow up question. The last ball is overwhelmingly likely to be red, though this is very counterintuitive. The “all-red” urn and the “all-red-but-one” urn were equally likely to be chosen at the start. But the draws have given you a lot of info about which distribution you’ve been drawing from. Were you sampling from the all-red distribution, your draws would be totally unsurprising — you would observe a run of 99 consecutive reds 100% of the time. If you were you sampling from the all-red-but-one distribution, however, you’d only have observed this outcome 1/100 times.
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?

Those are the distributions that perfectly mirror. There is another one that is alone that has an extra ball, 50:49.

So I added one to one side instead of 50 and 49 to the other.

So 4950:4949.

... is that right? Im pretty sure red is favored, and Im pretty sure if the number of dists were odd the odds would be even. But are the odds right?

I'm stuck at the first continue statement. Doesn't that suck up one of your num_trials? This can never happen per the conditions laid out, but then you put num_trials in the denominator when returning the percent of times it was green.
I think this is less about Bayesian thinking and more about misinterpreting the question, as another poster mentions: https://twitter.com/farrwill/status/1751788706355392639

ie i think many of the More Likely to be Green people are doing the math of if you pull from an urn with n/100 odds of getting red, your second pull will have odds (n-1)/99, which is less than n/100 for all n except n=100. Which is obviously a different question than should you bet on Green or Red.

Which is obviously a different question than "would you bet on the next ball being red or green"

I'd argue that it's not so much a difference of opinion than it is just a reasoning error given the question as stated. That's sort of the whole point of this post-- this is a case where "doing the math" in the expected way gives the wrong answer, because the state of the system is cast in stone (in terms of the ratio of red/green balls in the urn) when you first start out, so it's all about leveraging the information you get from your first choice. I think this sort of reasoning is actually surprisingly useful and widely applicable in everyday life, like in investing or diagnosing the likely cause of a software bug from incomplete information.
It's definitely a poorly worded question. "More likely" is ill-defined. More likely than what? Than the last draw? Than drawing the other color just on this pick?
More likely than the other option, given the information. Getting an accurate grasp on the information is the whole point of the question.
Why is that the question? Why not "more likely than the last draw" ?
How could the next draw be more likely to be red than the draw already known to be red?
You are basically asking "how could it possibly be the wrong answer?".

Yes, under that definition of "more likely", it cannot be more likely. It can be equally likely or less likely. And then weighted it would be less likely. And that would be the answer. Which is one of the choices.

No, I'm saying "Your interpretation of the sentence is obviously wrong". With that interpretation, parts of the question are nonsense. The more straightforward interpretation does not have that problem.
1 - I said it's poorly worded, I didn't interpret it that way. I could see how people would misinterpret it (as pointed out by the parent comment) and people did misinterpret it that way. Look at the other posts here. If someone posts a question in english and a bunch of english speakers misinterpret the question, it's poorly worded by definition.

2 - Exactly what parts of the question are nonsense under that interpretation?

> How could the next draw be more likely to be red than the draw already known to be red?

Under this interpretation, the second ball is more likely to be green.

I had the same question but the interpretation they're considering is whether the next ball you draw will be more likely to be red than the red ball you drew was likely to be red before you drew it but after the total number of red balls was already determined.

Like: you have a box with a whole bunch of red and green balls. Would removing a red ball increase or decrease the likelihood of drawing a red ball from the box in the future?

I wouldn't buy that as a reasonable misinterpretation of the question in most cases, but I don't know what standard of analysis holds for Twitter polls.

I think it's a matter of knowing that the phrase "where n is chosen uniformly at random" means something very different in a probability question than "where n is an arbitrary value".

If, hypothetically, the majority of words communicated from one homo sapiens to any other homo sapiens (majority weighted by the number of homo sapiens who will hear, read, or otherwise receive the word over the course of the word's existence) were designed to be precise and unambiguous to the extent that the mean number of homo sapiens who receive the word correctly interpret the exact meaning of the word intended by the entity that chose the word is greater than 99.99%, then I would estimate a greater than 90% probability that the cumulative unique information (in the information-theoretic sense) contained in communications correctly interpreted by the receiving homo sapiens on any given day would be less than the cumulative unique information that is currently being correctly interpreted today (January 30th 2024 in the Gregorian calendar), and furthermore the reduction in information thus communicated would have a negative effect on progress towards the majority of cumulative goals implicitly created by all living homo sapiens.

Or I could just say "I think most people interpreted the tweet correctly, and it would be annoying if it was overly precise"

Yes, it's a bit of a pet peeve of mine to use the word "more" while leaving vague the point of comparison. Especially in something like a twitter poll -- twitter isn't exactly renowned as a place where people think closely about things before clicking.
How is "more likely"I'll defined? They are two options red or green. Are you more likely to draw red or are you more likely to draw green.. how is it poorly worded?
Because it could be more likely red than green, or more likely red than it was likely that the first choice was red (which is where some people got confused, they thought the question was asking about the relative chances of red on the first choice v second choice), more likely green than the first one was likely to be green(same basic problem).
My first interpretation of "more likely" was also "more likely than the previous ball". It makes more sense in the context of the previous sentence.

For example:

> The first time you shoot a basketball, you will almost certainly miss. The second time, you are more likely to make it.

Does the second sentence mean "more likely to make it than to miss"? No.

You don't need to think in terms of information to get the right answer, you just need to be careful of the setup.

You can easily apply frequentist probability reasoning and still get the right answer. You have to start from P(n > 50 | first pull is a red ball), and compute P(second ball red | first ball red) based on that.

Basically the mistake is computing the frequency over 100 balls, instead of computing it over the 100 possible values of n multiplied by the 100 balls.

Why would n be "uniformly randomly chosen" but then suddenly be known? I would mark this mis interpretation simply as wrong if I was a teacher.
That's definitely fair, and I assuming in a classroom setting you'd be very consistent and precise about what that means. But this is a twitter poll, and I doubt people are that consistent. Ultimately I'm just pushing back on the conclusion that this is because "Bayesian thinking is really foreign to people."

I think if the question had instead been "would you bet on the urn having started out with more red balls, green balls, or equal number of balls" the distribution would have been very different.

That question is quite a bit of handholding. A closer analogue would be “would you bet the next ball is red / green / they’re equally likely?”.

Personally I’d word it as “The next ball is… more likely to be red than green / more likely to be green than red / equally likely to be red or green / I don’t know.”

But isn't that exactly how it is worded? Just showing it a bit?
Not quite. People are arguing that “more likely to be red” can be interpreted as “more likely to be red than it was last time”. I guess you could do that with this wording, but that seems like quite a stretch.
i personally would throw out the question if i was a teacher. i still feel it's ambiguous
Another way of making your point: it would also make the information about the distribution of n irrelevant, so it's a bad interpretation of the question.
So? There's plenty of problem statements with irrelevant data. Children are also getting taught to determine which is relevant in class.

But also, it's not irrelevant because for two cases the probability stays equal. Calculating the exact chance is still an interesting problem and it could have been dumbed down for twitter only.

In those cases presumably there's not a more interesting question that's consistent with the question and that uses that information. I'd start with the assumption that the tweet isn't a dumb trick question.
Because including some pieces of irrelevant information as red herrings in probability problems is totally unheard of?
You have an urn of 50 red and 50 green balls. Roll a die and add a red ball for every pip. What is the probability of the next ball you take being red?

I say both can be a question in Statistics I where you calculate probabilities based on combinations.

So I'll say it depends on the level of education for how the question gets interpreted and saying those who never took Bayesian reasoning and consider n unknown are wrong gets elitist.

Not known, but certainly defined. It has to not be zero at least, otherwise you couldn't take out a red ball in the first place. Or at least that's how I understand this problem. You don't know what number n is, so you need statistics or simulations to grasp the probability of the color of the next ball.
Yes, but which door has the goat behind it?
Uniform n is what drives a lot of the interesting properties here. Other distributions can behave differently. For example if balls were inserted into the urn with their colors determined independently by coin flips, then instead of n being uniform it would be binomial. In that case, observing the color of a previously drawn ball would tell you nothing about the next one.
Is that true? You'd still have evidence that the distribution of balls tilts one way, wouldn't you?
I think with a binomial the tilt is perfectly offset by the tilt you get from taking the ball.My math isn't fresh enough to write a nice dense statement showing why.

If you change their simulation formula to pull from a binomial instead of uniform... it looks 50/50.

The probability of flipping a coin and getting heads is the same as flipping ten coins, choosing one at random, and getting heads. Since the probability is the same, you have learned nothing about the distribution of unchecked coins.

Since the coins are independently flipped, you can assume that it’s still just a binomial distribution of size n-1 and the same p.

Flip three coins. First one lands heads. Does that mean the rest are more likely to be heads? No.
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.

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.
If I flip three coins and use the results to decide which color balls to put in a bag, I'll have one of these distributions: RRR,RRG,RGG,GGG. If I draw a red ball, I am more likely to have drawn from RRR or RRG than RGG (or GGG), so I have learned something about the distribution more than just how it was generated.
No you haven’t :)

Let’s ignore RRG because it becomes a 50-50 anyway.

RRR has a 100% chance of yielding Red. But is 3X less likely than RGG.

RGG has a 33% chance of yielding Red but was 3X more likely.

Edit: so still 50/50 Given a draw of red, you have exactly the same probability of having been in RRR and RGG. So you were equally likely to have 100% chance or a 0% chance.

Change it to drawing from a normal distribution... the answer will change dramatically and get very close to what one would likely consider "common sense", ie that it remains close to 50/50. I think binomial gets it to 50/50.

Humans aren't wired for uniform distribution. 100 reds seems crazy unlikely compared to 50/50, yet this trick question makes those equally likely.

How would normal distribution change the result?

I am imaging a random number generated from truncated normal distribution with mean 50, clipped 0 and 100: the answer will still lean right.

How would binomial work? You have 101 urns from which to choose.

Normal: it is very close to 50/50. It does still lean, but only just. It's close enough that in practice any guess is fine.

Binomial: it is 50/50.

The reason these change the situation dramatically is that under normal or binomial, you are waaaay more likely to be in a situation that is close to 50/50 to begin with because they are way more likely to occur. The quirk of this question is that a 0 green 100 red urn is just as likely as a 50-50 red/green urn using a uniform distribution - hence if you get red on the first draw you are much more likely to be in a heavily tilted red urn.

How would binomial work here? You’re choosing amongst 101 urns of different proportions.

How do you narrow 101 choices into two?

It's as ill posed as the Monty Hall problem. The issue is in what it means for the first ball to picked randomly.

Would the question be valid if the first ball was green? If not, then it's equivalent to the standard answer to the Monty Hall problem. Analyze it as if the first ball was not picked randomly (i.e. Monty intentionally picked the wrong door).

I'm not sure why you think it is ill posed. The question is, you randomly pick a ball, IF it is red then... So yeah, it is basically the same as "someone else removes a red ball" now randomly select a ball. OR Pick a ball, is the color of the second ball more likely to be the same as the first, different, or equal. That is really the question here.

edit: After thinking about it some more, it is NOTHING like handing the bag to someone else and having them remove a red ball. The whole point to the first draw is to draw the ball randomly. I think my second statement is still true. But to your original question, if the first ball isn't red, then the question is invalid (and you can't throw the ball in and choose again)

Forgive my frequentist bent, but:

When in doubt, simulate (with code). Do this N times for a large N, and take the ratio to get a probability estimate.

So the question is: How will you code it? You'll find half the people code it one way (to get one answer), and the other half will code it differently to get a different answer. That's because it is ill posed.

As an example, I would code it as:

Let n be a random number from 1 to 100 (cannot be 0!)

We throw away one red ball as we know we picked one.

Construct a list of n-1 red balls, and 100 - n green balls.

Pick a ball at random. Success if it is red.

Repeat this N times where N is large.

Take the ratio of successes with N.

When I run it, I get 50%

How would you simulate it differently?

The problems with the code in the submission:

If n==0, he continues, but still counts it as a trial (he still divides by num_trials). He should deduct the number of trials every time n==0.

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.
Yes, I think you're right about that. Just look at all the disagreement about it right here in this discussion!
And if you change the distribution, that answer is close to correct.
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?
Agreed. The first likelihood of green is 50 percent, and of the first is red then the next ball likelihood of being green is smaller than 50 percent, so the above statement makes no sense.
"You shoot a basketball for the first time -- you miss. The second time, you are more likely to score."

A common phrasing. It doesn't mean that scoring is more likely than missing, it means the second time is more likely than the first was.

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.
(comment deleted)
It’s not Monty Hall. Monty Hall does not open doors randomly. To think about this problem right you need to acknowledge that it could have gone the other way with some probability but it didn’t, and so that tells you something more about the state of things.

If monty opens doors randomly, and shows you a goat, you do not benefit from switching. Edit: assuming he doesn’t open your door of course

This is not about Monty Hall or his doors.

ROT13: Gur zber erqf, gur zber yvxryl lbhe svefg chyy vf erq.

No one is making changes based on your actions, like Monty did.

Yes, you're right-- I mispoke in that I meant that they were both examples of getting information that should revise your world view, not that they were exact analogues.
I think this is easiest to see if you imagine the urn is filled with three balls. You draw one, and it's red. The possibilities are that the urn originally contained:

1. Red, Red, Red

2. Red, Red, Green

3. Red, Green, Green

(The Green, Green, Green case is impossible because you drew one Red.)

Drawing a Red from urn configuration (1) was a 100% probability; from (2) was a 66% probability, and from (3) was a 33% probability. If these configurations were equally likely, then the probability of Red and Green on the second draw would be the same.

However, and this is the crux: we are more likely to be in a configuration which shows us what we have observed with a higher likelihood [1]; so we're more likely in configuration (1) or (2) than (3), and as (3) is the only one that favors Green for the next draw (and only by as much as (1) favors Red), the next ball being Red is more probable.

[1] Imagine, for example, that you have 100 coins, and 99 of those coins are biased so that they only show heads once every trillion tosses, while the remaining one coin is fair. If you pick a coin randomly and flip heads, which is more likely: that you got a biased coin to show a one-in-a-trillion event, or that you picked the fair coin?

And the underlying cause of people's intuition failing them is caused by those configurations being equally likely, which is a quirk of the question.
Why are we excluding red, green, red?
You have just highlighted the actual problem with the question. Uniform distribution.
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 binomial distribution, calling out the possible combinations is required for purposes of counting, ie figuring the probability of each combination.

People intuitively know that there are more ways to have two green and one red than three reds. That maps to most things in the real world too. This question sort of tricks people.

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.

It is there. But it's just a detail many will breeze over and then their intuition fails them.

The way you can know this is: ask people the same question with "binomial" instead of "uniform" and see if you get a different answer. My guess is people will say the same regardless.

I think the thing that clarifies it for me is that if the balls are chosen in such a way that they have a binomial distribution, then, intuitively, the question would be implying retrocausality by saying that N was also "chosen":

> n is chosen uniformly at random

If the balls follow a binomial distribution, then your intuition would say that N wasn't the thing that was chosen; the balls were chosen, and then N was determined afterwards by counting the balls that you picked. This is because you cannot choose N and then draw balls binomially and get that many green or red balls. You'd have to choose 100 balls, see whether the number of Red matches your chosen N, and if it didn't, draw again, which is a tortuous interpretation given the phrasing, as I said above.

By saying that N was "chosen", it implies to me that N comes first, and the choice of balls comes after that, i.e. the balls are not binomially distributed.

Oh, I'm not suggesting you are wrong. I'm just saying it's easy to overlook the detail.
Sure, I guess I'm just arguing that even if you overlook that detail, then your intuition should tell you that the balls having a binomial distribution is suspect, i.e. you have to overlook a small thing and a big thing to misunderstand, and given that, I don't think the question is ambiguous. All good though.
I don't think that's right though, I don't think "chosen" implies what you are saying. An existing binomial distribution could exist and you just choose n from it. You wouldn't have to "generate" the distribution. To me "chosen" and "sampled" would mean the same, and it wouldn't be weird to say "n was sampled from a binomial distribution"
I think I see what you mean now, and I understand that that would be possible.

Wouldn't you need some extra parameters if it were a binomial distribution though? For a uniform distribution every item is equiprobable (i.e. there's only one uniform distribution for a given N) but there are many binomial distributions possible for a given N. (Disclaimer, I know very little about statistics.) So the fact that you aren't given those parameters in the question means you can't make much of a prediction if it were binomial.

Edit: I read that binomial distributions are parameterized on both the number of trials and the probability of the two outcomes, so that kind of demonstrates my point doesn't it? You're not given the probability of Red and Green for the binomial distribution, so you can't really answer the question that way. You could assume it's 50/50, but that's an assumption that isn't justified by the question.

The balls in the container are not ordered.
(comment deleted)
(comment deleted)
Because it is a trick question. That state is not in play.
Having to understand probability problems like this by writing code is like having to count the dots to multiply. It's functional innumeracy. Not something to be shamed, but something that needs to be fixed.

What is 3 x 2?

. . .

. . .

1, 2, 3, 4, 5, 6 . . . six?

Edit: To add to that, check out the Erdos book from the 90s on innumeracy (here's Wikipedia instead of an AMZN affiliate link):

https://en.wikipedia.org/wiki/Innumeracy_(book)

The purpose of the code was to make it clearer what is happening here. If someone is confused by the direct calculation, then they can also look at the simulation and maybe things will become clearer. Also, you do need to have some actual insight into the problem to solve it directly with calculations, whereas you just have to model the situation to brute force a simulation and arrive at essentially the same answer (with a lot more compute used, but that's basically free now!).
The book Innumeracy that you linked: why did you call it "the Erdos book"? It is not connected to Erdős in any way, as far as I can tell.
Super confusing! Through different reasoning I get different answers:

1. More likely to be red because the urn has a greater chance of having more red balls

2. Equally likely by considering all remaining urn possibilities to be equally likely

3. More likely to be green because obviously there is one less red ball than before

I wrote a Python program to simulate the problem. It tells me that the correct answer is (2) - it's equally likely that the next ball is red or green.

I wonder if I've made a mistake, or if that's really the real answer!

    #!/usr/bin/python
    import random
    from collections import Counter
    
    def experiment():
        urn = random.choices(["R", "G"], k=100)
        if urn.pop() != "R":
            return
    
        return urn.pop()
    
    results = (experiment() for i in range(1_000_000))
    results = (result for result in results if result is not None)
    print(Counter(results))
EDIT: I did make a mistake! The above produces a binomial distribution of urns with red/green. As in, the most common urn is one with an equal number of reds and greens, and the least common is all reds or all greens. Whereas they should have equal probability. To actually match the question:

    #!/usr/bin/python
    import random
    from collections import Counter
    
    def experiment():
        num_red = random.randint(1, 100)
        num_green = 100 - num_red
        urn = ["R"] * num_red + ["G"] * num_green
        random.shuffle(urn)
        if urn.pop() != "R":
            return
    
        return urn.pop()
    
    results = (experiment() for i in range(1_000_000))
    results = (result for result in results if result is not None)
    print(Counter(results))

The answer is indeed (1) More likely to be red.
The mathematical term for this is a "Laplacian urn" and the probability is governed by https://en.wikipedia.org/wiki/Rule_of_succession

In this specific case, P(redOnKthSample) = (numberOfRedSamples + 1) / (totalNumberOfSamples + 2) = (1+1)/(1+2) = 66% red.

On the second draw, if the ball is green, then you get P(redOnThirdSample) = (1 + 1) / ( 2 + 2) = 50%

This answer should go to the top.
Except it doesn’t give much intuition for why?
I find it hard to remember a ton of different rules, so I just count configurations, and I'm right on these problems basically every time. You count configurations by enumerating all possible combinations of unknowns, then "score" them by likelihood. The configuration's probability is its score divided by the total score. Then take the weighted sum of your test value, with the weights being the configuration probabilities.

There are 101 configurations (the different values of N). We know our first ball was red. So N == 0 has a score of 0 (it's impossible since we found a red), N == 6 has a score of 6 (there are six different ways we could draw a red), N == 100 has a score of 100. The sum of all the scores is 5050, so the probability that N == 100 is 100/5050 = 1.98%.

The value we're interested in is p(2nd ball == red). In the N == 100 configuration, that's 100%: it contributes 100% * 1.98% to the final "score". In the N == 6 configuration, that's 5/99 (we already drew one red), so it contributes 5/99 * 6/5050 to the final score. Add up the final scores and you get 66.67%.

As long as you can feasibly enumerate all possible configurations and score them accurately, this approach basically never fails.

My first thought on this is, half the time there will be more red balls in the container. IF you draw a red ball first, you are more likely to be in the half that had more red balls. Therefore you are more likely to draw a second red ball. Yes, a small percent of the time you will be in the case that there are more green balls (maybe you got unlucky and pick the 1 red ball!) So my guess is that it isn't a huge percent higher, but it is more likely to be a red ball.
Seems like there's some ambiguity in the problem.

"More likely to be red"

More likely than what?

"The next ball you draw from this urn is more likely to be red than green?"

This is much easier to intuit if I imagine 101 urns.

One is 0% red, one 1% red, one 2% red, etc.

If I choose one urn at random, and then the first ball I pick is red, odds are good I picked a red-heavy urn.

I’d be interested to see if the general public answers differently when it is framed more concretely.

One gets Bose-Einstein statistics from the same urn setup: if you draw two marbles from such an urn, the three combinations RR, RG, GG are equally likely.

An obvious visual proof: Line up 101 marbles. Choose one to be the divider; to the left is red, to the right is green. Now draw two more marbles. Or just pick three, then decide which one is the divider.

I would say red because n is probably larger than 50 if the first one picked was red
Never liked the way these problems are worded.

`You take a random ball out of the urn—it’s red—and discard it.`

How normal people read it: Given this specific instance where you just discarded a red ball from this urn, what's the probability of the next ball?

How it expects you to read it: Given infinitely many random samples from the urn. For cases where you get red, remove it, then take a second sample. What's the probability of the next ball, given all the samplings?

I would go further and say that the second reading is in fact incorrect interpretation of the problem in the English language. Being a mathematician doesn’t give some special right to gaslight people on their knowledge of English.

This problem is in a similar category as badly explained monty hall problems where the statement of the problem is so bad that it ends up changing the answer.

For example I have seen the Monty hall problem stated in popular media like this:

“There are three doors, behind two are goats and one is a car. You choose a door at random and there’s a goat behind it. You choose another door, but before opening it the host asks if you want to switch your choice. Is it more profitable to switch or to stick or does it have the same chance?”

Of course it doesn’t matter. This is actually a good way to trick inattentive mathematicians who pattern match on the problem but don’t actually read it.

Love this, can we mangle the problem some more? Like, you open one door and it’s a goat, the host then says he will open another door containing the trip to Bali. Do you want to open the other door or stay with the goat you already have?
Both of those have the same answer. Why would they not?
In these cases it's always good to think of extremes. For example for the Monte Hall problem imagine a million doors and all but one of them are opened, all empty, in any case. Then it's clear you originally had one in a million chances of picking the right door.

Two ways to think about this (same conclusion):

- Without loss of generality, take the case of just one red ball, rest are green. If you pick the one red ball on your first draw the chances are now 100% that the next ball is green (since there aren't any red ones left) whereas before you had picked the red one you had just a 99% chance of picking a green one.

Hence after picking a red ball you are slightly more likely to pick a green ball next.

- Another way to think of it, again without loss of generality consider if there was just one green ball and 99 red, then if you pick every one of them in some order there are a hundred different positions the green one could end up as. If you consider the one where it's last, after you have picked all but one (and they were all red), now you have a 100% chance to pick the green ball, even though you started out with 1% chance on the first draw: without loss of generality in the case of drawing until you reach the green ball when it is 1 in 100, each red ball you have drawn so far increases the chance of drawing the green ball next, up to a 100% chance when it is the only one left. Visualizing the chance going from 1% to 100% in this case as you draw more red balls should drive home the point that it becomes more and more likely you'll draw a green one next, in the cases that you've made it that far drawing red ones.)

>Without loss of generality, take the case of just one red ball, rest are green. If you pick the one red ball on your first draw the chances are now 100% that the next ball is green (since there aren't any red ones left) whereas before you had picked the red one you had just a 99% chance of picking a green one.

Your reasoning can conclude that picking a green ball next time is more likely for any specific bag contents. But you can't then conclude that picking a green ball the next time is more likely, period. Picking red the first time gives you information that changes the probability distribution of likely bag contents.

OK, I'm seeing it now. Generalizing, imagine N+1 jars each containing N balls. The jars are numbered 0 through N. The jar numbered k has k red balls and N-k green balls.

We have N+1 people, also numbered 0 through N. Person k is holding jar k.

We ask each person to draw a ball at random from their jar. If they draw a green ball they take their jar and leave. If they draw a red ball they stay.

We expect on average (N+1)/2 people will remain.

We now ask them to draw another ball.

The expected number of red balls on this second drawing is (N+1)/3.

The expected number of green balls on this second drawing is (N+1)/6, half the expected number of red balls.

That's because on the first drawing, the more green balls in your jar the more likely you will draw green on the first round and thus take your jar and go home. The second round is biased toward people who have jars with more red balls.

Here's the math behind those results. The probability that person k makes it to round 2 is k/N. The expect number that will make it is sum {k=0, N) = (N+1)/2.

Once in round 2 the probability they draw red is (k-1)/(N-1). The probability they draw green is (N-k)/(N-1).

The probability then that they make it to the second round and then draw red is k/N (k-1)/(N-1).

The probability that they make it to the second round and then draw green is k/N (N-k)/(N-1).

The expected number of reds we see in the second round is sum {k=1, N} k (k-1) / N / (N-1).

The expected number of greens is sum {k=1, N} k (N-k) / N / (N-1).

Use the well known formulas 1 + 2 + 3 + ... + M = M (M+1) / 2 and 1^2 + 2^2 + ... + M^2 = M (M+1) (2M+1) / 6 and simplify and you'll get the (N+1)/3 expected red and (N+1)/6 expected green I stated above.