<< All Posts Feed

Coupon Collector Calculator

Posted on 2025 Aug 12


Calculator on top, context at the bottom.



Results

Context

A few months ago I started playing Pikmin Bloom, a mobile game made by the same company as Pokémon GO. You walk around, collect Pikmin, and plant flowers. Many of my friends play it, which makes it all the more fun, and it has gotten me to walk much more this year.

Pikmin come with a variety of different 'decors,' which are usually little trinkets from the environment where the Pikmin was found. So if you found the Pikmin at a train station, for example, it might have a train ticket decor. One of the main long-term objectives of the game is to collect every decor on every type of Pikmin; there are 7 types of Pikmin in Pikmin Bloom, so for most decor categories you need to collect 7 of that category.

So now I am deep in the weeds of trying to understand how long it's going to take for me to collect all 7 Pikmin for each category. I then re-discovered, for the nth time in my life, the coupon collector problem, and re-learned that the distribution does not have a nice closed form. I said that's okay, I just want to see an approximate CDF, simulation is fine. Except I couldn't find a half-decent simulator online! In particular I couldn't find any that produce a nice chart of the resulting CDF.

It took me a few hours to learn how to use a teeny JS plotting library and figure out how to distribute JavaScript packages on my website. But now I have my nice CDF plot :-)



Older Back to Top Newer