Sum comparison test

The sum comparison test is a chi-square test that tests whether the sum of a specified measure is equal across all categories of the explanatory field.

If the chi-square test value is significant, the sums are not all equal.

The test is constructed under assumption that both means and counts of the measure are equal across different categories. The test uses a chi-square value. The following procedure describes how the chi-square value is calculated:

  1. Calculate the overall mean for the measure.
  2. Calculate the mean square for the measure error.
    1. Calculate the sum of squares for the measure error.
      1. Within each category, subtract the category’s mean from each record value.
      2. Take the square of each difference and add them together.
    2. Divide the sum of squares for the error source by the appropriate degrees of freedom.
  3. Calculate the squared error for the sum per category.
    1. Multiply mean square for the measure error by the expected category count.
      1. Use total count divided by the number of categories as expected count.
    2. Multiply the squared count error by the square of the overall mean.
      1. Subtract the expected count from the total count.
      2. Multiply the result above by the expected count.
      3. Divide the result above by the total count.
      4. Multiply the result above by the square of the overall mean.
    3. Add the two terms above to obtain the squared error for the sum.
  4. Compute the chi-square term for each category.
    1. Compute square of the difference of the average sum and the category sum.
    2. Divide the result above by the squared error for the sum per category.
  5. Sum the chi-square terms from all categories. This sum is the chi-square value.

The chi-square value is compared to a theoretical chi-square distribution with appropriate degrees of freedom to determine the probability of obtaining the chi-square value by chance.

  • This probability is the significance value.
  • If the significance value is less than the significance level, the means are significantly different.