# Proper way to average

I am trying to figure out the proper way to get an average and have two methods that are yielding two different results. I am trying to figure out my average cost per item. Lets say I have 3 items:

Item 1: 10 pcs/\$10000 or \$1000 each

Item 2: 5 pcs/\$4000 or \$800 each

Item 3: 2 pcs/\$1000 or \$500 each.

Would I add the totals and divide by the total pieces (\$15000/17 = \$882 each) or add \$1000+\$800+\$500 and divide by 3 = \$766 each? Is one a center weighted average and the other a true average? Which is which? I thought the outcomes would be the same for some reason.

If what you want is the average cost per piece given that you purchased one of each of the packages ("items"), then you want $\frac{1000*10 + 800*5 + 500*2}{10 + 5 + 2} = 882.35$