# Help with this little issue, please

## Main Question or Discussion Point

Hi,
I want to determinate the average of a set of quantities which each one has a different value, for example

3 has value 4.5
4 has value 5
3.5 has value 6
4 has value 3
5 has value 5

and so on...

If I do 3*4.5 + 4*5 + 3.5*6 +... and divide it by the number of elements I obtain a number that is not the average of the set...

Any help for this noob?

Thanks!!

Related Set Theory, Logic, Probability, Statistics News on Phys.org
If I replace "has" with "have" I think I understand what you are trying to do, right up to "3.5"... I just can't figure out how you have 1/2 of something with a specific value.

Can you explain the problem a bit more? And also how do you know what the average should be? Answers in back?

It's a way to measure the real average of a set, and where I write 4.5, it doesn't mean that the associated value appear 4 + 1/2 times, but it means the importance of that value. The problem itself is to calculate the grade point average, and I associate the puntuation with the hours of the subject, for example

Maths: 7.8 (45 hours)
Physics: 8.9 (60 hours)
...

I want to calculate the average keeping in mind that each subject has a determinate number of hours.

Saludos!

HallsofIvy
Homework Helper
Sounds to me like you want a "weighted" average.

If you have value 4.5 with weight 3, 5 with weight 4, 6 with weight 3.5, 3 with weight 5, and 5 with weight 5, then the weighted average is
$$\frac{3(4.5)+ 5(5)+ 3.5(6)+ 5(3)+ 5(5)}{3+ 4+ 3.5+ 5+ 5}$$
the sum of each value multiplied by its weight, divided by the sum of the weights.

Similarly, if you have a grade of 7.8 with a weight of 45 hours and a grade of 8.9 with a weight of 60 hours then the weighted average is
$$\frac{7.8(45)+ 8.9(60)}{45+ 60}$$

Thanks, HallsofIvy and Schip666! for your help, very useful!