### Understanding the Harmonic Mean

Many courses offered by the School of Computer Science and Engineering use a harmonic mean formula to calculate students' final results given their exam and assignment marks. Such a harmonic mean formula is a way of ensuring that in order to pass the course, students must have performed reasonably well in both aspects of the course. The formulae below show how the harmonic mean (and for completeness the alternative arithmetic and geometric means) are defined. The tables give examples of final results calculated using harmonic, arithmetic, and geometric means to illustrate the differences. Note that the formulae used in your particular course may not be absolutely identical to the harmonic mean formulae shown below.

#### Defining the arithmetic, geometric and harmonic means

Suppose that the examination mark, expressed as a percentage, is x, and the assignment mark, again as a percentage, is y.

 Mean Simplest formula Most informative formula arithmetic mean of x and y (x + y) / 2 0.5x + 0.5y geometric mean of x and y √(xy) x0.5 × y0.5 harmonic mean of x and y 2xy / (x + y) 1/(0.5/x + 0.5/y)

Examples (to nearest whole percent)

 x y arithmetic mean geometric mean harmonic mean 50 50 50 50 50 40 60 50 49 48 30 70 50 46 42 20 80 50 40 32  Geometric means of an exam mark of x with an assignment mark of 100-x Harmonic means of an exam mark of x with an assignment mark of100-x

Notice that the arithmetic mean is in all cases 50.

Clearly the geometric and harmonic means penalise uneven performances, but the harmonic mean penalises them more heavily. Reasons that lecturers might wish to do this include (1) preventing students, who have obtained high marks on the assignments by undetected plagiarism, from passing or doing well: such students are unlikely to do well in the exam, and (2) preventing students who cannot succeed at the programming assignments, but who are good at the theory, or at exam technique, or at memorising facts, from passing or doing well. By doing this, lecturers are maintaining the standard of the qualification towards which you are working. If students who cheat, or who cannot program, get through School of CSE degrees, eventually the word will spread to employers, and the value of your qualification will decline.

#### Weighted Harmonic and Other Means

Sometimes lecturers use weighted means of various types. They might feel that the exam is proportionally more important than the assignments, or that the exam is a more reliable measure of student performance, and so should count for more. Let us suppose that they decide that the exam should count for 70% of the final result and the  assignments for 30%, for the sake of this discussion. (The actual weighting in the course(s) you are taking may differ from this.)

#### Defining the weighted arithmetic, geometric and harmonic means

Suppose that the examination mark, expressed as a percentage, is x, and the assignment mark, again as a percentage, is y. As mentioned above, the exam will be weighted at 70% and the assignments as 30%

 Mean Formula weighted arithmetic mean of x and y 0.7x + 0.3y weighted geometric mean of x and y x0.7 × y0.3 weighted harmonic mean of x and y 1/(0.7/x + 0.3/y) = xy/(0.7y +0.3x)

Examples (to nearest whole percent)

 x y weighted arithmetic mean weighted geometric mean weighted harmonic mean 80 20 62 53 42 70 30 58 54 50 60 40 54 53 52 50 50 50 50 50 40 60 46 45 44 30 70 42 37 36 20 80 38 30 26  Weighted geometric means of an exam mark of x with an assignment mark of 100-x. Weighting is 70% for exam, 30% for assignments. Weighted harmonic means of an exam mark of x with an assignment mark of 100-x. Weighting is 70% for exam, 30% for assignments.

Further variations are possible, but rarer in practice. They include means, weighted or not, of more than two marks. For example, a lecturer might weight exam, mid-session quiz, and assignments as 50%, 20% and 30%, and then combine those marks using a harmonic mean formula.