Comment on Soup of Theseus
NeatNit@discuss.tchncs.de 2 days agoIn python the closest I could find was (untested): sum(random.sample([1, 0], spoon_size, counts=[soup_count, water_count]))
But this would create an intermediate list of length spoon_size which is not a good idea.
NeatNit@discuss.tchncs.de 2 days ago
/u/TranquilTurbulence@lemmy.zip fairly sure the distribution you should use is hypergeometric distribution, found via urn problem.
TranquilTurbulence@lemmy.zip 2 days ago
Hmmm… The description certainly fits. Just by eye-balling the graphs, they look very different from what I got, but I guess that’s just the expected result of running rbinom about a 6 million times. With a smaller simulation, it might not have been so apparent. Also, that’s what you get for skipping the maths and vibing the code without thinking too much about the details. Well, at least i got this far with absolutely minimal effort. :D
It appears that I need to switch to a better distribution. Thanks for looking into this mystery!