Weighted Avg

I'm having a senior moment.  If I have a table like this, what's the formula for a weighted average?  Is the value I have on the right correct?
TYPE      COUNT      SR RATE      WEIGHTED AVG
APPLE      24      8%      1%
BANANA      36      40%      9%
ORANGE      1      0%      0%
CHERRY      15      21%      2%
GRAPE      27      33%      5%
LIME      2      0%      0%
LEMON      10      18%      1%
STRAWBERRY      41      16%      4%
BLUEBERRY      10      28%      2%
Grand Total      166      25%      24%
error_proneAsked:
Who is Participating?
 
TommySzalapskiConnect With a Mentor Commented:
Here's the spreadsheet I used for calculations in case you find it useful.
weighted-average.xls
0
 
TommySzalapskiCommented:
It's hard to see exactly what you are doing. Are you trying to get the average SR Rate?
In that case, multiply each count*sr_rate and divide the total by the total count. I get a little over 26%.
0
 
TommySzalapskiCommented:
Oh, yes I see what you did. The way you did it works just fine except you round too much.
Do it without rounding and you'll get close to 26.48
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
TommySzalapskiCommented:
Oops. I typed a number wrong. You actually would get around 23.518.
I would still do the calcutations without rounding and then round at the end if desired, but you are correct and have done it a correct way.
0
 
TommySzalapskiCommented:
For example: If you change the 33% on Grape to 34%, then the actual weighted average is around 23.68 but you get 25 if you round each number first.
0
 
error_proneAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.