Hacker News new | ask | show | jobs
by keefle 864 days ago
Greetings

Unfortunately my probability skills are quite bad and i easily get confused, could someone explain where my reasoning fails?

I assumed since we have a uniform distribution of red to green balls, then the expected value would be 50 red balls.

So I assumed I can use this expected distribution to figure out the probability the question asked

in an urn where there is 50 red balls and 50 green balls, and we draw one red ball. The ball we draw next is more likely to be green (since we have 49 red balls vs 50 green balls)

Is my mistake that I took the expected value of the uniform distribution before the first ball was drawn? And I should think of the expected distribution of the urn given the first ball drawn was red? If so how would I go about that probabilistically? (i.e. how would I calculate

Exp [ n given first ball is red ] )

I can see that if the first ball was red, this removes one of the possible values (all balls are green)

And I can see how from all possible urns, the more they have red balls, the higher the likelihood the first ball drawn is red. I would assume this will skew the expected value somehow.

Is it like

``` expVal = 0

for all possible n (101 possible values): # possibility of first ball being red when we have n red balls * n * probability of n?

   expVal += (n / 100) \* n \* (1/101)
```

I'm sure the above is wrong, because this will just decrease the expected value where I am expecting an increase but I'm not sure how to model it

I would appreciate any pointers/help

3 comments

Yes, it’s a mistake to take the expected value before the ball is drawn, because the drawn ball adds information, disproportionately changing the expected value.

Consider an alternate game, where I flip a hidden coin… if it is heads, I let you pick from an urn with 99 red and 1 green; if it is tails, I let you pick from an urn with 1 red and 99 green. The expected number of red is still 50, and the chance of drawing that first red is still 50%. But once that red is drawn, your expectation of what the next draw will be should change significantly.

It's not 50 red and 50 green. There are 100 total balls, but you don't know how many are red or green. The number of reds is drawn from a uniform distribution, meaning the urn is equally likely to contain 1, 10, 55, or 99 red balls.
The fact that a red ball was drawn is new information that suggests there is a higher chance (however slight) that there are actually more red balls in the urn than green balls. Therefore the next ball is likely to be red.