Combining Means

Suppose we have a class consisting of boys and girls who have sat an exam. There are 10 boys and the average score of the boys is 60. There are 5 girls and the average score of the girls is 70.
What is the average score overall?
To find the average we add up ALL the scores and divide by the total number of boys and girls.
We can treat the 10 boys as having scored 60 each. Their scores add up to  
\[10 \times 60=600\]

We can treat the 5 girls as having scored 70 each. Their scores add up to  
\[5 \times 90=450\]

The total of all the scores is  
\[600+450=1050\]

There are  
\[10+5=15\]
  boys and girls.
The average score is  
\[\frac{1050}{15}=70\]

In general if there are  
\[k\]
  sets of objects with  
\[n_i\]
  objects in the ith set having a mean of  
\[m_i\]
  then the overall mean is  
\[m= \frac{\sum_{i=1}^k n_i m_i}{\sum_{i=1}^k n_i}\]