Research Design and Statistical Consulting
George M. Diekhoff, Ph.D.

# SUM(VAR1, VAR2, VAR3…) does not equal (VAR1+VAR2+VAR3…)

One often needs to create new variables by combining old variables. For instance, maybe you’ve got a 5-item inventory and need to calculate a total score, either in the form of a sum of the responses to the items or perhaps by averaging the responses to the items. This is done easily in SPSS: TRANSFORM > COMPUTE VARIABLE, then name the new variable in the “target variable” window field and type in how that new variable is to be created in the “numeric expression” expression field.

Did you know that in doing this, two approaches that you’d think are equivalent are actually not equivalent?

Look at this example. These two methods of summing responses to five items to get a scale total score are NOT EQUIVALENT:
ScaleTotal = Item1+Item2+Item3+Item4+Item5
is not equivalent to
Scaletotal = SUM (Item1 to Item5)

Similarlty, these two method of averaging responses to five items are NOT EQUIVALENT:
ScaleAverage= (Item1+Item2+Item3+Item4+Item5)/5
is not equivalent to
ScaleAverage= MEAN(Item1 to Item5)

If you have any missing data on the variables involved in the expression, the use of operators like SUM and MEAN will calculate sums and means USING WHATEVER DATA ARE AVAILABLE, and never mention this to you! On the other hand, if the calculations are written out fully by hand, missing data will result in no value being calculated. Depending on the circumstances one of these outcomes may be preferable to the other, so it’s important to be care that you’re getting what you want.

s