## Calculating the Weighted Average

The weighted average, or the average weighted by relevance, is a calculation that assesses a particular set of numbers based on the respective 'weights' or importance of each number. Instead of giving each number the same value or weight, as with a simple arithmetic average, each number in a set of the weighted average is given a specific weighting.

### Example

Suppose we want to calculate the final grade of a student based on various activities during a semester. Suppose the activities are divided as follows: 50% for exams, 30% for assignments, and 20% for class participation. In this case, the student may have scored 80 on exams, 90 on assignments, and 70 on participation. We would then weight these scores based on their respective percentages and add them up to get the final score.

### Calculation

This would look like:

- Exam: 80 * 0.50 = 40
- Assignments: 90 * 0.30 = 27
- Participation: 70 * 0.20 = 14

We would then add these weighted scores: 40 + 27 + 14 = 81. Therefore, the student's final score, based on the weighted average of the various activities, is 81.

### Formula

The formula for the weighted average is thus the sum of each value multiplied by its respective weight, divided by the sum of all weights. In the situation above, we would divide the weighted sum (81) by the sum of the weights (1), which still yields 81. But if the weights did not add up to 1, this last division would be necessary to calculate the weighted average.