#174109 - sgeos - Tue May 18, 2010 9:00 pm
So, lets say I have four monsters, and each one has a 4.1% chance of dropping an item? What are the chances of not receiving an item? Just getting one? Two? Three? Four?
I remember how to do this in a manual fashion. Using a spreadsheet to create 16 scenarios (drop VS no drop to the power of 4), this is what I get.
0 items @ 84.5813% = (95.9%^4 * 4.1%^0) * 1
1 item @ 14.4644% = (95.9%^3 * 4.1%^1) * 4
2 items @ 0.9276% = (95.9%^2 * 4.1%^2) * 6
3 items @ 0.0264% = (95.9%^1 * 4.1%^3) * 4
4 items @ 0.0003% = (95.9%^0 * 4.1%^4) * 1
This becomes the general formula:
(DROP_RATE^DROPS * (1 - DROP_RATE)^(MONSTERS - DROPS)) * X
I'm having trouble remembering how to derive X from the MONSTERS and DROPS. (Obviously DROP_RATE doesn't affect it.) A quick google search didn't turn anything up, although I'm sure it is out there somewhere. In any case, does anyone remember how do this? If not, can anyone point me to a site that explains this?
Thanks.
EDIT: The above formula only works for one type of item. If the monsters have, say, a 4.1% chance of a normal drop, and a 0.9% chance of a rare drop, things quickly become far more complicated. It is relatively easy to generate a LUT of X (see above formula) when there are only two outcomes (drop VS no drop).
0 and max drops always equal 1, and 1 and (max - 1) drops always equal the number of monsters. Presumably these are magic numbers that some sort of general formula spits out. I can't make heads of tails of the numbers in the middle.
Total X in a column always equals 2^monsters for 2 outcomes. Presumably the sum of X for a given number of monsters is outcomes^monsters using a more general forumula. (This could be extended to handle any fixed number of item drops.)
To get the value in the next column, add the values in the previous column with a "shifted" copy of the previous column. For example, the values for seven monsters are 1, 7, 21, 35, 35, 21, 7, 1. (I have not check to see if this will hold with more than 2 outcomes.)
Unless I'm doing this totally wrong, I've got enough math under my belt to solve any particular problem, but the solution doesn't feel elegant because I need to do more calculations to extend it.
/EDIT
Last edited by sgeos on Tue May 18, 2010 9:44 pm; edited 1 time in total
I remember how to do this in a manual fashion. Using a spreadsheet to create 16 scenarios (drop VS no drop to the power of 4), this is what I get.
0 items @ 84.5813% = (95.9%^4 * 4.1%^0) * 1
1 item @ 14.4644% = (95.9%^3 * 4.1%^1) * 4
2 items @ 0.9276% = (95.9%^2 * 4.1%^2) * 6
3 items @ 0.0264% = (95.9%^1 * 4.1%^3) * 4
4 items @ 0.0003% = (95.9%^0 * 4.1%^4) * 1
This becomes the general formula:
(DROP_RATE^DROPS * (1 - DROP_RATE)^(MONSTERS - DROPS)) * X
I'm having trouble remembering how to derive X from the MONSTERS and DROPS. (Obviously DROP_RATE doesn't affect it.) A quick google search didn't turn anything up, although I'm sure it is out there somewhere. In any case, does anyone remember how do this? If not, can anyone point me to a site that explains this?
Thanks.
EDIT: The above formula only works for one type of item. If the monsters have, say, a 4.1% chance of a normal drop, and a 0.9% chance of a rare drop, things quickly become far more complicated. It is relatively easy to generate a LUT of X (see above formula) when there are only two outcomes (drop VS no drop).
Code: |
Look Up Table of X
Monsters 1 2 3 4 5 6 --- --- --- --- --- --- 0 = 1 1 1 1 1 1 D 1 = 1 2 3 4 5 6 r 2 = 1 3 6 10 15 o 3 = 1 4 10 20 p 4 = 1 5 15 s 5 = 1 6 6 = 1 |
0 and max drops always equal 1, and 1 and (max - 1) drops always equal the number of monsters. Presumably these are magic numbers that some sort of general formula spits out. I can't make heads of tails of the numbers in the middle.
Total X in a column always equals 2^monsters for 2 outcomes. Presumably the sum of X for a given number of monsters is outcomes^monsters using a more general forumula. (This could be extended to handle any fixed number of item drops.)
To get the value in the next column, add the values in the previous column with a "shifted" copy of the previous column. For example, the values for seven monsters are 1, 7, 21, 35, 35, 21, 7, 1. (I have not check to see if this will hold with more than 2 outcomes.)
Unless I'm doing this totally wrong, I've got enough math under my belt to solve any particular problem, but the solution doesn't feel elegant because I need to do more calculations to extend it.
/EDIT
Last edited by sgeos on Tue May 18, 2010 9:44 pm; edited 1 time in total