User:Yamagawa/Zero Drops

The 0 Drops Problem
The problem:

We have a new item in game, the Drops-A-Lot Event Bag.

It's been announced that this bag drops a uber-cool widget, the 'Green Eyes of Envy'.

Everyone wants a pair.

So you go out and open some Drops-A-Lot bags.

You open 5 bags, and get no Eyes. Surely, they must occur less often than 99% of the time.

You open 50 bags, and get no Eyes. Surely, they must occur less often than 25% of the time.

You open 1000 bags, and get no Eyes. Surely, they must occur less often than 5% of the time...

But how often is that? Can we get a concrete number for that (with the classic 'odds are 95% certain that...')?

I say we can.

Lets take a rate, say, 10%... and decide how many bags we would need to open if it dropped at that rate, to be 95% certain to get the eyes.

r = rate n = # of opens. o = odds. o = 1 - ( ( 1 - r ) ^ n ) o - 1 = - ( ( 1 - r ) ^ n ) 1 - o = ( 1 - r ) ^ n n = LOG(base 1-r of 1-o) n = 28.43315881 So at a 10% drop rate, we'd need to open 28.43315881 bags to get our eyes of envy 95% of the time. But, does that mean that if we open 28.43315881 bags and don't get the eyes, the drop rate is 95% certain to be lower?

No!

The 95% certainty listed above is the chance of GETTING what you want 95% of the time. That is different from a 95% chance of the rate being below 10%, if you open n bags. The one applies the 95% to your hopes and prayers of getting what you envy. The other applies the 95% to the probable rate of occurrence. Reverse engineering past work...

I have a table that (if the math is right) that tells me the odds that 0 drops over n trials means drop rate x. It does this first by calculating the standard deviation for the drop rate. stddev = (n * rate * (1-rate)) ^ .5 In the case of a 10% rate with 20 drops, that becomes: stddev = (20 * .1 * (1-.1))^.5 stddev = (2 * .9))^.5 stddev = 1.8 ^ .5 stddev = 1.34164...

Going from there, we get a probability curve. I'm looking then for the part of the curve that is under 0.5. Why? Because probability curves like dealing with things like 'the odds of getting between 2.4 and 2.6 heads from 10 coin tosses'. In this case, I want the part of the curve that is under 1, and the bounds for 1 are 0.5 and 1.5.

So.... ah, here is where my math is flawed: The probability curve gets bent out of normal towards the ends of the probability spectrum (eg: away from 50%).

For the time, I will settle on the equation o = 1 - ( ( 1 - r ) ^ n ), but this time I'll solve it for r o = 1 - ( ( 1 - r ) ^ n ) 1 - o = ( 1 - r ) ^ n (1 - o) ^(1/n) = 1 - r 1 - (1 - o) ^(1/n) = r

So, this gives (with a kind of 95% certainty): For 5 opens without a hit: Odds are under 45.07% For 50 opens without a hit: Odds are under 5.82% For 1000 opens without a hit: Odds are under 0.299%