## Diablo II - Item Probability Analysis

This is the question we all ask: How many runs until I get the item that I want? Here's how to figure it statistically.

For an example, we will use for illustration the unique item Harlequin Crest, aka Shako. Assume we're looking for it from hell Andariel, quest-bugged, on players-3, with +105% magic-find. I chose these parameters to make the odds come to a round 1 in 600 for illustration.

Now, we know that this doesn't mean you will get your Shako after exactly 600 runs. You might be so lucky as to get it on your next trial, or never in thousands. Here's the right way to look at it.

You have a 50-50 chance of finding a 1/600 item at least once after you've done 415 runs. How did we get to that number?

As with anything in probability mechanics, we calculate it by multiplying the probabilities of the cases that happen. The chance of not finding your Shako each run is 599/600. The chance of not finding a Shako in T trials is (599/600) × (599/600) × (599/600) ... and so on T times. This is expressed as (599/600)T . If that equals 50%, then we have equal odds of finding and not-finding.

Set the equation of (599/600)T = 50% and solve for T:

(599/600)T = 0.5

T log (599/600) = log 0.5

T = (log 0.5) / (log (599/600))

T = 415.5

Why is this number greater than 300? Why does reaching a 50% chance require 415 trials, rather than half of the expected number?

The answer is because randomness is clumpy. Some of the Shakos will clump up so that one character will be so lucky as to find multiple in those first 600 runs. And the Shakos that clump together for the lucky character means they are clumping away from the less lucky characters. They need to do extra runs to balance out against the lucky characters who find multiples.

Where exactly does that 415 number come from? Turns out that it's the natural logarithm of 2, which is 0.693, times the original probability of one in 600. So if you are looking for a drop chance of 1 in N, you reach a 50% chance of finding it after 0.693 × N trials.

- - -

What happens if you don't find it in those 415 runs? How long will it take? Well, now you have another 50% chance of getting it in your next 415 runs. You treat each new sequence of trials as an independent continuation from whatever came previously. It goes like this:

You have a 50% chance of finding your item in 415 runs.

If you don't, then you have another 50% chance in the next 415 runs, making 75% total within 830 runs.

If you don't, then you have another 50% chance in the next 415 runs, making 87.5% total within 1245 runs.

If you don't, then you have another 50% chance in the next 415 runs, making 93.75% total within 1660 runs. And so on.

As we see, the expected chance of finding the item converges asymptotically towards 100%. It will never quite reach that, because it's always possible for the next batch of runs to come up empty, and the next batch after that, and so on.

So there is no such thing as how many runs to find an item. What you can solve for is your level of certainty, for how many runs to have a particular probability of finding it, and you can dial up that probability as close to 100% as you like.

- - -

Here is the closed-form solution. With 1-in-N as the drop chance, T as the number of trials, and S as the probability of success for finding the item at least once (and thus 1-S is the probability of not finding it), let's set up the equation and solve for T:

((N-1)/N)T = 1-S

T log ((N-1)/N) = log (1-S)

T = log (1-S) / log ((N-1)/N)

With that last line, you can plug in a drop chance of N and your desired success chance S of finding it, to solve for your expected number of trials to reach that success chance. Here are some examples:

75% chance to find a 1-in-1000 item (something like Skin of the Vipermagi from nightmare Mephisto):

log (1-0.75) / log (999/1000) = 1,385 trials

90% chance to find a 1-in-6000 item (say Sur from one Lower Kurast super chest):

log (1-0.90) / log (5999/6000) = 13,814 trials

99% chance to find a 1-in-3,000,000 item (say a Zod rune):

log (1-0.99) / log (2999999/3000000) = 13.8 million trials

In general, if you really want an item, to reach a level of certainty between 85% and 99% requires a number of trials between 2x and 5x the number in the 1-in-N drop chance. Of course you might get lucky and find it in your first 10% subset of those runs, or you might not.

So there you go. Happy hunting!