# double weighted average

How do I calculate a weighted average based on two factors? I have seen a couple questions relating to this on this site, but none that are quite right.

Say I am trying to calculate the average number of bananas that are found rotten per day per bushel of bananas. I have the following measurements:

rotten bananas     days      bushels     rotten bananas/(day*bushel)
3                  2.2       5           0.27
5                  2.3       2           1.09
1                  1.8       3           0.19

etc.

I understand how to do a weighted average of rotten bananas/day and a weighted average of rotten bananas/bushel, but can't figure out how to combine the factors.

Does a weighted average even make sense for this sort of statistic? Especially if, say, these measurements were taken at 3 different stores over the same weekend. Would a better indication of the "average" rotten bananas per day per bushel be a normalized number of rotten bananas over 2 days. For example:

rotten bananas     days      bushels     rotten bananas/(day*bushel)
2.73               2         5           0.27
4.35               2         2           1.09
1.11               2         3           0.19

So that's ~8.19 rotten bananas in a 2 day period in a total of 10 bushels. So would an overall "average" of something around 0.41 rotten bananas/(day*bushel) make some sort of sense?

• You have sort of the right idea, but you're making approximations needlessly. Seems to me that the three averages you are given are taken per (bu-da) (that is, with bushels $\times$ days in the denominator). So weight the three averages on that basis. – BruceET Mar 22 '18 at 6:35

Following my Comment, I get $$\frac{0.27(11.0) + 1.09(4.6) + 0.19(5.4)}{11.0+4.6+5.4}.$$ Please see if you agree with my logic and check my math.