Suppose that cannons of Type A deal 20 damage and misses 30% of the time, and that cannons of Type B deal 16 damage and misses 20% of the time. Would it be better to have 50 cannons of Type A, or 50 cannons of Type B?
The probability of a single cannon hitting is a binomial distribution if we assume that one cannon doesn't affect another cannon. So if we had one cannon, the average damage would be pretty straight forward to find. If we have 50 cannons, do we multiply the average damage of each cannon with 50? Or is it more complicated than that?
Let $X_i$ denote the damage dealt to a target by a cannon of type X with one shot. Then, the expected value of the total damage dealt by $N$ such cannons can be written $$\mathbb{E} \left(\sum_{i = 1}^N X_i \right) = \sum_{i = 1}^N \mathbb{E} (X_i),$$ which follows from the linearity of the expectation.
Since these $N$ cannons are of the same type, the expected damage of each is the same and the sum of their expected damage is just $N$ times the expected damage of any individual cannon of that type, $$\sum_{i = 1}^N \mathbb{E} (X_i) = N \mathbb{E} (X_i) .$$
The question can therefore be answered by comparing the performance of a single cannon of each type. Assuming that a cannon either hits or misses, the expected value of the damage it deals with one shot is simply $$ \mathbb{E} (X_i) = x_\text{hit}\Pr\{X_i = x_\text{hit}\} + x_\text{miss}\Pr\{X_i = x_\text{miss}\}.$$ Based on the numbers we are given, $$\mathbb{E} (A_i) = 20(1-0.3) = 14,$$ $$\mathbb{E} (B_j) = 16(1-0.2) = 12.8.$$
We can now conclude that, if the goal is to deal the most damage using $N$ cannons, it would be better to have those of type $A$, at least asymptotically in time.
Notice that we did not have to assume independence between the successes of the cannons in hitting the target or use the binomial distribution. We would only need to do so if we cared about, say, the probability of the cannons collectively dealing a specific amount of damage or simultaneously missing the target.
UPDATE
It is worth adding that if the goal were instead to destroy a weak target with only a few cannons firing one shot, then cannons of type B may actually be preferable depending on the exact number of cannons and strength of the target.
To see this, consider the extreme case of one cannon and a target that can take at most 16 damage before being destroyed. A single hit from a cannon of either type is enough to destroy it, so we would prefer the more accurate one (Type B).
To evaluate the collective accuracy of a multiple cannons, we would need to assume cannon independence and use the binomial distribution. Doing so, it can be shown that the superiority of Type B cannons disappears beyond about 4-5 cannons and targets that can withstand more than about 50 damage.