Loot Box Probability Question - Probability of Rare Items within Stated Constraints? If there's a 9% chance of a rare item being revealed per loot box, and the consumer has 7 loot boxes, what's the probability of 0-8 rare items?
I believe that binomial distributions are involved but it's been literally decades since I studied probabilities at school and I'm really stuck here figuring this out.
I seemed to have mapped out the probability of uncovering 7 by taking:
= (Chance of Discovery%) ^ Number of Loot Boxes
..and conversely, for the probability of uncovering 0:
= (1-Chance of Discovery%) ^ Number of Loot Boxes
..but can't figure out the formula for the others.  I'm assuming 8 would be zero though, just by definition of that needing more boxes than are available in the first place.
Looking up binomial distribution for this takes me into places that make my head hurt, so if that's really the solution then a simplified walkthrough would be GREAT.
(Forgive me for any poor terminology here - like I say, it's been decades.)
 A: The uncomfortable answer is the binomial distribution. You can find the formula for the probability of finding $k$ rare items in $n$ loot boxes on wikipedia. However this is not hugely informative, as you already knew so.
For example, let us try to find the probability of finding $k=5$ rare items in our $n=7$ loot boxes. Let's look at the case where you find all the $5$ items in the first $5$ boxes: $RRRRRXX$. Since the boxes are independent from one another, the probability of this exact order is $0.09^5\cdot 0.91^2$. Now let's look at the case where you find all the $5$ items from the second to the sixth box: $XRRRRRX$. Again the probability of this case is $0.09^5\cdot 0.91^2$. But this is already the key to understanding the problem: we have that any arrangement of the above with five $R$ and two $X$ will have the same probability. Since any arrangement cannot happen at the same time as another (they are exclusive), you sum the total of their probabilities (which are all equal). This will give you the probability of winning $5$ rare items, in any arrangement. So
$$P(k=5,n=7)=A\cdot 0.09^5\cdot 0.91^2$$
where $A$ is the total number of ways in which you can arrange $5$ successes in $7$ trials. This total number is given by the permutation of $n$ elements in which $5$ are of one type ($R$) and $7-5=2$ of another type ($X$):
$$A=\frac{n!}{k!(n-k)!}=\frac{7\cdot 6 \cdot 5\cdot 4\cdot 3\cdot 2 \cdot 1}{5\cdot 4\cdot 3\cdot 2 \cdot 1\cdot(2\cdot 1)}=\frac{7 \cdot 6}{2}=21$$
we usually write the shorthand $\binom{n}{k}=\frac{n!}{k!(n-k)!}$.
