The aggregation dropdown menu lets you choose the aggregation strategy used to calculate the overall grade of a grade category. The different options are explained below.

Note: if you have only one aggregation type on your menu, 'Natural,' you will need to add others. See the Available aggregation types menu section below.

## Aggregation strategy

All grades are first converted to percentage values (interval from 0 to 1), then aggregated using one of the strategies below and finally converted to the associated category item's range (between Minimum grade and Maximum grade). In the following, we assume that all Minimum grades are equal to 0.

**Important**: An "empty grade" is a missing gradebook entry and could mean different things. For example, it could be a participant who hasn't yet submitted an assignment, an assignment submission not yet graded by the teacher, or a grade that the gradebook administrator has manually deleted. Caution in interpreting these "empty grades" is thus advised.

## Mean of grades

In yields the sum of all grades divided by the total number of grades. For instance: assume a category A (with a Maximum grade equal to 100) includes three items, A1, A2 and A3 (with maximum grades equal to 100, 80 and 10, respectively); if a student scores A1=70, A2=20 and A3=10, then we have the following grade calculation for A:

A1 -->70/100=0.7, A2 --> 20/80=0.25, A3 -->10/10=1 A: (0.7 + 0.25 + 1.0)/3 = 0.65 --> 65/100 --> 65 (the maximum grade for category A is 100).

## Weighted mean

Each grade item can be given a weight to change its importance in the overall mean. In simple terms, the category "total" will be equal to the sum of the scores in each grade item, each multiplied by its grade weight, and that sum is finally divided by the sum of all weights. This is shown in the following example (with the same assumptions as the previous case).

A1: 70 out of 100 weight 10, A2: 20 out of 80 weight 5, A3: 10 out of 10 weight 3, category A: maximum grade 100 A1 -->70/100=0.7, A2 --> 20/80=0.25, A3 -->10/10=1 A: (0.7*10 + 0.25*5 + 1.0*3)/(10 + 5 + 3) = 0.625 --> 62.5/100 --> 62.5 (out of 100)

## Simple weighted mean

The difference from the Weighted mean is that the weight of each item is its Maximum grade. For instance, using the same assumptions of the first case:

A1 --> 70/100, A2 --> 20/80 = 0.25 A3 --> 10/10, category max 100: A: (0.7*100 + 0.25*80 + 1.0*10)/(100 + 80 + 10) = 0.526 --> 52.6/100 --> 52.6 (out of 100)

When the "Simple weighted mean" aggregation strategy is used, a grade item can act as Extra credit for the category. This means that the grade item's maximum grade will not be added to the category total's maximum grade, but the item's grade will. For example, if A3 is marked as extra credit in the above calculation:

A1 --> 70/100, A2 --> 20/80 = 0.25, A3 (extra credit) 10/10, category max 100: A: (0.7*100 + 0.25*80 + 1.0*10)/(100 + 80) = 0.556 --> 55.6/100 --> 55.6 (out of 100)

## Mean of grades (with extra credits)

Arithmetic mean with a twist. An old, now unsupported, aggregation strategy is provided here only for backward compatibility with old activities.

A value greater than 0 treats a grade item's grades as extra credit during aggregation. The number is a factor by which the grade value will be multiplied before it is added to the sum of all grades, but the item itself will not be counted in the division. For example:

- Item 1 is graded 0–100, and its "Extra credit" value is set to 2
- Item 2 is graded 0–100, and its "Extra credit" value is left at 0
- Item 3 is graded 0–100, and its "Extra credit" value is left at 0
- All three items belong to Category 1, which has "Mean of grades (with extra credits)" as its aggregation strategy
- A student gets graded 20 on Item 1, 40 on Item 2 and 70 on Item 3
- The student's total for Category 1 will be 95/100 since 20*2 + (40 + 70)/2 = 95

## Median of grades

The middle value (or the mean of the two middle values) when percentages (the ratios between grades and their maximum values) are arranged in order of value. The advantage over the mean is that it is not affected by outliers (grades which are uncommonly far from the mean).

A1 70/100, A2 20/80, A3 10/10, category max 100: A: median(0.7, 0.25, 1.0) --> 0.70 --> 70/100

## Lowest grade

The result is the smallest grade after normalisation. It is usually used in combination with Aggregate only non-empty grades.

A1 70/100, A2 20/80, A3 10/10, category max 100: min(0.7, 0.25, 1.0) = 0.25 --> 25/100

## Highest grade

The result is the highest grade after normalisation.

A1: 70/100, A2; 20/80, A3: 10/10, category max 100: A: max(0.7, 0.25, 1.0) = 1.0 --> 100/100

## Mode of grades

The mode is the normalised grade that occurs the most frequently. It is often used for non-numerical grades. The advantage over the mean is that it is not affected by outliers (grades which are uncommonly far from the mean). However, it loses its meaning once there is more than one most frequently occurring grade (only one is kept) or when all the grades differ.

A1 70/100, A2 35/50, A3 20/80, A4 10/10, A5 7/10 category max 100: A: mode(0.7, 0.7, 0.25, 1.0, 0.7) = 0.7 --> 70/100

## Natural

This is the sum of all grade values, scaled by relative weights. The Maximum grade of the category is the sum of the maximums of all aggregated items.

A1 70/100, A2 20/80, A3 10/10, without forcing weights: A: (70 + 20 + 10)/(100 + 80 + 10) --> 100/190

**Note**: Scale grades are ignored.

When the "Natural" aggregation strategy is used, a grade item can act as Extra credit for the category. This means that the grade item's maximum grade will not be added to the category total's maximum grade, but the item's grade will. Following is an example:

- Item 1 is graded 0-100
- Item 2 is graded 0-75
- Item 1 has the "Act as extra credit" checkbox ticked; Item 2 doesn't.
- Both items belong to Category 1, which has "Natural" as its aggregation strategy
- Category 1's total will be graded 0-75
- A student gets graded 20 on Item 1 and 70 on Item 2
- The student's total for Category 1 will be 75/75 (20+70 = 90 but Item 1 only acts as extra credit, so it brings the total to its maximum)

Natural aggregation functions as a sum of grades when the weight boxes are left alone. In this situation, the numbers in the weight boxes are informational and represent the effective weights in the sum. Natural aggregation can also function as a mean of grades when the weight boxes are checked and then adjusted so that the weights are equal across a set of items in a category or a set of categories. Items can still be marked as "Extra credit" while using the weights to calculate a mean and contribute to the total for the category.

By default, the only available aggregation type is 'Natural.'

To choose any of the other types in a course, other aggregation types must be made available in *Site administration > Grades > Grade category settings > Available aggregation types*.

The default is 'Natural,' but the administrator can specify other types from *Site administration >administration > Grades > Grade category settings > Aggregation*. This default can be set to Forced or Advanced.

Note that reducing the number of aggregation types simply results in disabled aggregation types not appearing in the aggregation type dropdown menu. All existing grade category calculations remain the same, regardless of whether an administrator later disables the aggregation type.