Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You have 50 red marbles, 50 blue marbles, and 2 buckets. You must put all the marbles into the buckets but you may distribute them any way you like. I randomly pick a bucket, and then randomly select a marble from that bucket. How, if possible at all, can you maximize the probability of me picking a red marble?


My intuitive answer would be to put one red marble in one bucket, and the other marbles in the other bucket, making it 100% likely to get red if you picked bucket 1 and almost 50% likely if you picked bucket 2, for a combined probability of just under 75%.

The expression I would want to maximize would be (r/(r+b))+((50-r)/((50-r)+(50-b))), where r and b are integers between 0 and 50 inclusive (I've forgotten the calculus required for this).


Most people somehow get stuck assuming they must distribute the marbles evenly (always 50 marbles in each bucket), even though it's neither stated nor implied. It's interesting to see how long it takes people to challenge their own assumptions.


I expect I would get stuck wondering if I'd be out on my ear if I answered that you could put all the marbles in one bucket, take them back out, and then put one red marble in each bucket.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: