User:Guy Bukzi Montag/sandbox

''Nothing to see here. It's only my playground for future blog posts.''

Everything on this page is a draft and will be deleted when the final post is published.

''If you do see something here, it's probably a blog post in the making. Feel free to comment, corrections are welcome!''

---

Drop Rates Explained: 5th Anniversary (IV)

This is part IV 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: The Asphalt 8 Box Calculator

Bla: This part continues the explanations of part III and will show you bla. The 5th Anniversary boxes will serve as examples, but the methods also work for other boxes.

Bla

Summary
Here are all the formulas from the previous parts in a nutshell.

Statistical test
Did the calculations withstand the real numbers of items found in opened boxes?

Further questions
What about the ARSE blueprints?

Complete code
Bla

How many blueprints do I get for n coins?
Let's assume that you have. With those coins you can buy either
 * 3 Expert Bundles ( each) or
 * 7 Specialist Bundles ( each) or
 * 14 Novice Bundles ( each).

The Expert bundle grants at least 1 Audi R8 e-tron SE blueprint per box; the maximum number you can get is 7. Assumed that there are no underlying probabilities for certain amounts of blueprints, you can imagine this as an urn containing 7 boxes: one box with 1 blueprint, one box with 2, one with 3 and so on. If you draw one box from the urn, each box and thus each amount of blueprints has the same probability: $$\tfrac{1}{7}$$.

As you can buy 3 Expert Bundles for your coins, you can draw 3 times from the urn (with putting back the drawn item).
 * The probability of getting the maximum number of blueprints from 3 draws (i. e. 3 times box number 7) is $$\tfrac{1}{7} \cdot \tfrac{1}{7} \cdot \tfrac{1}{7} = \tfrac{1}{7^3} = \tfrac{1}{343}$$ = 0.29%.
 * Each other combination of boxes has the same probability of $$\tfrac{1}{343}$$, but there are several combinations that grant, for example, 20 blueprints (maximum number minus 1): 7-7-6, 7-6-7 and 6-7-7, each with a probability of $$\tfrac{1}{343}$$. So the probability for 20 blueprints is $$\tfrac{3}{343}$$ = 0.87%.
 * This leads to the question in how many ways you can combine three summands from 1 to 7 so that the result is the desired number of blueprints. You can imagine that as throwing a seven-sided dice three times. Technically, this is a special case of a composition problem which is examined in combinatorics (see Wikipedia article for further explanations).

The probability of getting the maximum number of items from d draws out of n items is $$\frac{1}{n^d}$$.

As the number of draws equals the number of boxes you can buy, the number of boxes is defined by $$\lfloor\frac{amount of coins}{box price}\rfloor$$ Bla

\begin{align} m &= \sum_{k=0}^{\lfloor \frac{s-n}{7} \rfloor} (-1)^k \cdot \binom nk \cdot \binom{s - 1 - 7k}{n - 1}\\ &= \sum_{k=0}^{\lfloor\frac{s-n}{7}\rfloor} (-1)^k \cdot \frac{n!}{k! \cdot (n-k)!} \cdot \binom{s - 1 - 7k}{n - 1} \end{align} $$

Bla

with m: probability of a sum n: amount of boxes s: sum of blueprints

How many coins do I need to assemble a car with a probability of 90 %?
Bla

Which bundle grants more tokens: Expert or Specialist?
Bla

Appendix
Mercedes-Benz SE:

The amount of boxes needed to get at least 1 (one!) blueprint with a probability of 90 % is


 * $$n \geq \frac{\ln(1 - 0.9)}{\ln(1 - 0.1)} = 21.85$$.