# Computing Tests of Comparisons (2 of 6)

Consider a hypothetical experiment on the effect of background music on reading comprehension. There were five groups of subjects who read in the presence of either:

Group 1: classical music (soft)
Group 2: classical music (loud)
Group 3: rock music (soft)
Group 4: rock music (loud)
Group 5: no background music

The reading comprehension scores are shown below:
```  G1   G2   G3   G4   G5
94   92   86   85   97
91   93   76   86   94
92   85   85   89   97
90   88   91   75   88
89        92   87```

Assume the experimenter had planned in advance to test whether classical music and rock music have different effects. The coefficients to test the difference between classical and rock music (ignoring volume) are:

1, 1, -1, -1, 0.

These coefficients compare the first two groups with the second two groups. The means of the five groups are: 91.2, 89.5, 86.0, 84.4, and 94.0 respectively. To compute L, the coefficients are multiplied times the means. Therefore,
L = (1)(91.2) + (1)(89.5) + (-1)(86.0) + (-1)(84.4) + (0)(94) = 10.3