-
-
Save moritz/1238173 to your computer and use it in GitHub Desktop.
Analytical solution (atempt)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = number of coin flips until one bucket is empty | |
P(N) = propability that the exactly N coin flips happened. | |
Expected number of remaining things in one bucket: | |
remain = 80 - [+] (40..79).map({ $_ * P($_) }); | |
so, what's P(N)? | |
P(N = 40) = 2 * 0.5**40 | |
P(N = 41) = 2 * 0.5**41 * 39 * 39 / 2 | |
P(N) = 2 * 0.5**N * 39**(40-N) / (40-N)! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment