# Weighted average of multiple weighted factors

Lets say a factory machine runs as follows:

1. Day 1: $3$ widgets per minute $\times 1000$ minutes $\times 1$ kg per widget $= 3000$ kg.
2. Day 2: $5$ widgets per minute $\times 800$ minutes $\times 1.5$ kg per widget $= 6000$ kg.
3. Day 3: $8$ widgets per minute $\times 300$ minutes $\times 0.5$ kg per widget $= 1200$ kg.

So, over the $3$ days the factory machine has run for $2100$ minutes. I am assuming that if I multiply the weighted average number of widgets with the weighted average kg per widget and multiply this by the number of minutes over the three days $(2100)$ this should equal $10,200$ kg $(3000+6000+1200)$.

My weighting calculation is below for widgets per minute and kg per widget.

$$(3\cdot1000\cdot1)+(5\cdot800\cdot1.5)+(8\cdot300\cdot0.5)/(1000\cdot1)+(800\cdot1.5)+(300\cdot0.5) = 4.833$$ widgets per minute.

$$(3\cdot1000\cdot1)+(5\cdot800\cdot1.5)+(8\cdot300\cdot0.5)/(3\cdot1000\cdot1)+(5\cdot800\cdot1.5) = 1.085$$ kg per widget. However $4.833$ widgets $\times 1.085$ kg per widget $\times 2100$ mins $= 11,012$ kg over the three days. Not the correct $10,200$kg.

Why is this the case? I have tried weighting by total for the day and this still does not produce the correct answer. I have been using Excel and have noticed that if I keep either "widgets per minute" or "kg per widget" the same across all three days and only change the other variable I get a correct answer. However when both variable differ across the three days the total becomes distorted as you can see from the example above.

Is it not possible to find a weighted average using more than one weighting factor? I can't get my head around this.

1. Widgets per minute, weighting calculation: $$\frac{3\cdot1000+5\cdot800+8\cdot300}{1000+800+300}=\frac{94}{21}$$ widgets per minute.
2. Kg per widget, weighting calculation: $$\frac{1\cdot3\cdot1000+1.5\cdot5\cdot800+0.5\cdot8\cdot300}{3\cdot1000+5\cdot800+8\cdot300}=\frac{102}{94}$$
Hence, total number of kg $$\text{widgets per min}\times\text{kg per widget}\times\text{mins}=\frac{94}{21}\times\frac{102}{94}\times2100=102\cdot100=10200\text{kg}$$