Comment

Comment by CiaranMcNulty

Hm I'm not sure if it's correct but here's my logic (here on mastodon https://social.ciaranmc.com/@ciaran/111850662374227629)

There are N-1 red balls out of 99 remaining, so the probability the next ball is red is (N-1/99).

The possible values of N are evenly distributed [1...100] (we discount the N=0 case because we drew a red ball)

The total probability that the next ball is red is the sum of the individual probabilities divided by cases:

P = SUM[1...100](n-1/99) / 100 = SUM[1...100](n-1) / 99 * 100 = SUM[0...99](n) / 99 * 100 = 4950 / 9900 = 5.0

So red or green are equally likely

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton