This is part III of a series on the maths behind drop rates.
- Part I: Practical questions
- Part II: Extracting probabilities
- Part III: More than one box
- Part IV: Box inside a box
- Part V: The Asphalt 8 Box Calculator (tba)
- Part VI: All formulas in a nutshell (tba)
This part continues the explanations of part II and will show you how to calculate your chances if you open more than one box. The 5th Anniversary boxes will serve as examples, but the methods also work for other boxes.
- "I need 2 more blueprints to assemble my SLK 55 SE. If I buy a Specialist Bundle, my chance of getting a blueprint is 10 %. I have 4,825 coins, so I can buy 32 bundles. Will that be enough to get my 2 missing blueprints?"
To answer this question, it's reasonable to start with fewer boxes:
If you buy one box, there are only two possibilities: either you get a blueprint or not.
- Your chance of getting a blueprint is ,
- and of getting none.
Buying two boxes already offers four possibilities, each with its own probability:
- blueprint in the first one:
- blueprint also in the second one:
- no blueprint in the second one:
- no blueprint in the first one: .
- blueprint in the second one: .
- no blueprint also in the second one: .
As you need 2 blueprints, only the first of the four combinations is successful and has a probability of = 1 %. A chance of 1 % is not very satisfying, but we now know how to find the values for three boxes.
In the following table, "B" stands for blueprint, "0" for no blueprint and P for the probablity of the combination. Successful combinations with at least two blueprints are highlighted:
As you see, there's more than one way to get two blueprints: You can get them from the first and second, second and third or from the first and third box. And there's also the possibility of getting even three blueprints, so 4 out of 8 sequences are successful.
The probability of getting at least 2 blueprints from 3 boxes is
If you never buy more than three boxes, you can stop here. You can make a small table, multiply the probabilities and sum up the successful sequences. But that's not realistic as events like the 5th Anniversary grant a lot more than three boxes.
And that's where the problem starts: Technically you have been examining all possible ways of drawing 3 elements from 2, with repetition (you put pack what you have drawn, because a 0 or a B can appear several times), and where order matters (because 0-0-B is not the same as B-0-0). In combinatorics, this is called a permutation with repetition.
Unfortunately, those permutations have the nasty habit to generate extremely large numbers. If you draw once, you have only two possibilities: 0 and B. The second draw (box) adds two more possibilities to every existing one, so you get possibilities, then and so on. Ten boxes would already generate a table with rows, so counting manually all successful combinations becomes impractical with increasing numbers of draws (boxes).
But now we know how to calculate the total number of possibilities:
- Buying boxes granting 1 random item per box generates possibilities.
And more general:
- Buying boxes granting random items of a kind per box generates possibilities
(as not getting the item counts as an additional possibility).
For our SLK 55 SE example, this means: If you buy 32 boxes, you get possible sequences.
Now we have to find all those of our sequences that contain at least the desired number of blueprints .
In our example table with 3 boxes and 2 desired blueprints we had sequences of which 4 were successful. How can we calculate the 4 successful ones? Let's have a closer look at them:
- The three sequences 0-B-B, B-B-0 and B-0-B have in common that they are arrangements of 2 blueprints in a set of 3 items.
- The fourth sequence consists of 3 blueprints in a set of 3 items: B-B-B.
Note that this time the order of the Bs doesn't matter: blueprint is blueprint. For example, there is no distinction between a possible B1-B2-B3 and B1-B3-B2. They are all treated as one sequence B-B-B, so there is only one way to arrange 3 blueprints in a set of 3 items.
In mathematics, the selection of items from a set with elements, such that the order of selection doesn't matter, is called a combination and is denoted by (read as "n choose k"). If you have a scientific calculator and wondered what the nCr button does: Read it as "n choose r" and you can do the calculations in this chapter by yourself!
is called a binomial coefficient and can be calculated as follows:
For our example with three boxes this means that the number of different combinations of 2 blueprints in a set of 3 is:
And the number of different combinations of 3 blueprints in a set of 3 is:
If we add these two results, we have exactly the number of successful sequences found in the table (4).
For other examples, the term "if we add" has to be a little bit more specific: We have to add all binomial coefficients starting with ( being the number of desired blueprints), then , , ... up to (because we can get more than the 2 desired blueprints up to the possibility of getting a blueprint in each of the boxes).
So generally the number of possible combinations of at least desired items in boxes is the sum of the binomial coefficients with , , , ... to :
Now we can use this formula for the SLK 55 SE blueprints: We have boxes and want blueprints, so the number of combinations containing at least 2 blueprints is
If you want to use your scientific calculator, you have to calculate each binomial coefficient from to with the nCr button and build the sum of all the results.
Now we are very close to what we wanted to have: the probability of all those combinations with at least 2 blueprints. Let's go back to the above table for 2 blueprints from 3 boxes: The probability for the sequence B-B-0, for example, was .
If the probability for an event (getting a blueprint) is , the probability of the complementary event (not getting one) is
If is the number of desired blueprints, then what we did in the table was multiplying times the probability of : . We did the same with , but it's not that evident, because in a set of 3, there is only 1 event left: . The product of these two values was the final probability of the sequence:
Generally said, the probability of one combination in the table is
- is the number of desired blueprints,
- the number of boxes,
- the probability of getting a blueprint.
As all combinations of 2 Bs in a set of 3 (B-B-0, 0-B-B and B-0-B) have the same probability, we can multiply this probability with the number of possible combinations to obtain the total probability of all combinations of 2 blueprints in a set of 3. Fortunately, we already know that is the binomial coefficient , so we get
Analogously, the probability for 3 blueprints in a set of 3 is
To get the total probability of at least 2 blueprints in a set of 3, we add these probabilities and get exactly the 2.8 % from our table above.
So generally the probability of getting at least desired items from boxes is as follows:
where is the probability of getting the item.
With this formula we are able to answer the question of the beginning: We have boxes and want blueprints of which each has a probability of , so the probability of getting at least 2 blueprints from these boxes is
Did I calculate this manually? Definitely not. I wrote a few functions for this which I'll share with you in Part V.
But first, we'll come back to the "box in the box" principle. There are still some problems concerning boxes granting variable numbers of blueprints, but now we know the methods to solve them. Part IV will show you how.
If you have questions or find mistakes: Feel free to comment!