Average Damage

Determining how to best calculate the "average" damage of an item can be tricky.

For example, consider firing 1000 bullets through a single 2x Damage item. You expect 333 of them to be double to 2 damage, and 667 to remain at 1 damage, for a total of 1333 damage, or 1.33 per shot. Fire the same 1000 through a single 10x Damage, and you expect 40 to be multiplied to 10 damage, and 960 to remain at 1 damage, for a total of 1360 damage, or 1.36 per shot. From this, you might conclude that 10x Damage is a slightly better item. This matches the *arithmetic mean* of the outcomes for each item.

Now consider firing a single bullet through 100 2x Damage items. You expect 33 of them to activate, raising your bullet to 2^33 damage, or approximately 8 billion; you can say that, on average, each item contributed a 1.26x multiplier to the bullet's damage. Fire the same bullet through 100 10x Damage items, however, and you expect 4 of them to activate, raising your bullet to 10^4 damage, or 10 thousand; you can say that, on average, each item contributed a 1.1x multiplier to the bullet's damage. From this, you might conclude that 2x Damage is a significantly better item. This matches the *geometric mean* of the outcomes for each item.

Now fire a thousand bullets through a chain of 10 2x Damage items; the actual results will vary, but your total damage will usually be around 17 thousand. Fire the same thousand through a chain 10 10x Damage items; the actual results will vary *a lot more*, but you'll commonly find a total damage of around 11 thousand. From this you might conclude that 2x Damage is still better than 10x Damage, but not by as huge a factor as before. This is somewhat between the *arithmetic mean* and the *geometric mean* for each item.

The reason all three of these scenarios differ is because in the first scenario our bullets explored every possible outcome with approximately the correct chances for each; in the second there are a large number of *extremely rare* but *extremely high-damage* possibilities that we can't realistically expect to encounter, and thus we ignore those, bringing down the average (and hurting 10x Damage much more, as its outcomes are much rarer and much higher-damage). In the third scenario we split the difference; we encountered *some* rare scenarios in each trial, but still ignored a lot of *extremely* rare ones, so the averages were closer but still favored the more reliable 2x Damage item.

### Math Details

To calculate the arithmetic mean, multiply each outcome's value by its chance of occurring, and add the results. For example, for 2x Damage the arithmetic mean is (2 \* .33) + (1 \* .67), or 1.33x; for 10x Damage the arithmetic mean is (10 \* .04) + (1 \* .96), or 1.36x.

To calculate the geometric mean, raise each outcomes' value to an exponent equal to its chance of occurring, and multiply the results. For example, for 2x Damage the geometric mean is (1^.67) \* (2^.33), or 1.26x as we found earlier; for 10x Damage the geometric mean is (1^.96) \* (10^.04), or 1.1x.

If there are outcomes with a value of 0, like in Random Damage, calculating the arithmetic mean is the same (0\*(1/13) + 1\*(9/13) + 2\*(1/13) + 3\*(1/13) + 4\*(1/13) = approximately 1.38x), but the geometric mean can't be calculated as-is. Luckily, the 0 outcomes are common enough here that handling *them* like the arithmetic average works, on top of the geometric average of the other outcomes calculated on their own. That is, a reasonable interpretation of the geometric mean of a Random Damage is (1^(9/12) \* 2^(1/12) \* 3^(1/12) \* 4^(1/12)) \* (12/13), or approximately x1.2.

## Which Average Should We Use?

The answer is... it depends. With a high number of bullets (ship with high fire rate, several Add Projectile items), low-variability items (2x Damage), and less RNG items chained together at once, the arithmetic mean is more useful. With a small number of bullets (ship with low fire rate, less Add Projectile items, the Combine 10 item), high-variability items (10x Damage), and several chained together, the geometric mean is more useful.

In the early game, with small ships and no items like Charge or Death Pierce to lessen the impact of overkill, steady damage is more important than rare high damage; you should favor the more reliable 2x Damage item. In the late game, when you can chain together 15+ RNG items along your shot path, you should lean more toward the geometric mean and thus *also* favor the more reliable 2x Damage item, at least *most* of the time. A few 10x Damage items can still be worthwhile, especially after skill upgrades to make it 30x, as its arithmetic mean is significantly higher.

As a practical example, using a high-firing rate ship (10 or so) with several Add Projectile items and a Clone item (thus firing 100k-ish bullets in a level), 5 or 6 10x Damage items produce a DPS *very* close to their arithmetic average, but much more than that begins to tank their typical damage toward their geometric average.

## \*Comment to above article

Sorry to interrupt, but I want to say that the ***geometric mean*** doesn't reflect the effectiveness of items.

With a simple example with three numbers 1, 1 and 27, we know that the geometric mean is **∛(1 x 1 × 27) = 3**. We also know that the geometric mean of three numbers of 3 is also trivially 3. However 1 + 1 + 27 obviously different from 3 + 3 + 3, when looking at both the arithmetic mean and the deviation.

After all, these two things (arithmetic mean(a.k.a. DPS) and deviation) are the points we need to consider when choosing the right item for the build.

For general cases in the game, where we expect that thousands of projectiles to be fired to break hundreds or blocks, or to break a few mega high HP block, DPS (not the ***geometric mean***) would indicate how much damage we can do over a period of time, and is the primary parameter we will be looking at.

The second parameter, the deviation is a bit more complicated. Sometimes we want the damage more stable, either because of it is early game, or the ship's fire rate and number of ejection points being low, and we prefer every projectile to be more reliable rather than to have 1 super strong shot once 10+ seconds. Another reason for stable damage is for reducing the damage waste in overkills.

While in general cases in the game again, the rate of fire is usually high, that even with only 4% it is very common to see at least one x10 projectile every second from a x10 Damage. In which cases a high deviation is less of an concern to worry about. Furthermore, high deviation can actually be preferred if you are using Death Pierce.

In summary, 2x Damage is the preferred item when you want a relatively more stable damage output (early game, or when doing waves), but a poor choice when you really need high DPS to overcome the challenging mid-end game content.

x10 Damage has the highest DPS boost when the multiplier is improved to x30. Although, for example, when you put 5 skill-boosted x10 Damage together, and expect them to trigger at the same time for a x24,300,000 damage super nuke is very unrealistic, the 5 items does increase your x30 chance from 4% to about 16.99%, and gives a x30x30 = x900 chance of 1.416%, etc... If your ship can dish out tons of projectiles quickly, it will be able to utilize the spike damage more effectively, to give more overall damage then the other 2 items.

Finally, Random Damage kind of sits in the middle of the other 2 items. In overall it has very good stat, especially after you got the skills. The raw DPS boost is not as high as x10 Damage, but you can expect the boosts to be triggered multiple times more commonly. There is a reason why the author made it the most expensive item among the three items.

Here is a table for the 3 compared items for reference:

 10x Damage | 136%
 Random Damage | 138.46%