Calculating the mean of a data set depending on a different data set

MathsmaAttack

New member
Joined
Feb 4, 2020
Messages
1
So i have a data set that looks like this:
DayAmountno. of items
1$8883
2$59726
3$1231
4$67837
5$5984
6$10004.6
7$50006.8

And I want to find the average cost per item...

I am getting two different results and I don't know which is the true "average cost per item" or mean per item...

Method 1: (Sum of all amounts)/(sum of no. of items) ie (888+5972+123+6783+598+1000+5000)/(3+6+1+7+4+4.6+6.8)

method 2: ((Amount of day 1/no. of items day 1) + (Amount of day 2/no. of items day 2)... and so on)/(number of days =7)

I don't understand why these are different values or which is the correct "per item" average. I'm having a mathsma attack

Thank you very much in advance for your help!!
 
Is the "amount" tbe TOTAL amount? In other words, for the first day, were 3 items each sold for $888 OR were 3 items sold for a total of $888?
 
Method 2 is an "average of averages" and is NOT the average value for all items. The first calculation is correct.. (Assuming that, on the first day, the three items sold for a total of $888.)
 
To see why the results are different, take a simpler case. Suppose that on day 1, 2 items were sold for a total of $40, and on day 2, 8 items were sold for a total of $80. Then your first calculation (average of all items) will be [MATH]\frac{40+80}{2+8} = \frac{120}{10} = 12[/MATH]. The second calculation (average of averages) is [MATH]\frac{\frac{40}{2}+\frac{80}{8}}{2} = \frac{20+10}{2} = 15[/MATH]. These are different calculations that are not equivalent -- no rearranging of one will yield the other.

In particular, the second way weights each day equally, while the first weights each according to the number of items. Therefore the average of averages is closer to the $20 average of the first day than it should be. To get the correct average from the daily averages, you would have to weight them like this: [MATH]\frac{\frac{40}{2}\times 2+\frac{80}{8}\times 8}{2+8} = \frac{120}{10} = 12[/MATH]
There are some reasons one might want the average of averages, but not if the goal is the overall average of everything.
 
You could do this as a "weighted average", multiplying each average by a "weight" showing what each average contributes to the whole. However, here, that "weight" is just the number of values each average is based on so that multiplying by that weight just gives the sum.
 
Top