SOP: Testing Paired Preference by the Chi-Square Test
GIFSQ — Global Institute for Food Safety & Quality
Principle
In a paired comparison test the null hypothesis presupposes that there is no real difference between the two samples, so the responses should be equally divided between the two categories. The chi-square (χ²) test compares the observed frequencies with the expected frequencies; a large χ² value means the preference is significant and not due to chance.
Materials
- The observed number of preferences for each of the two samples
- The expected frequencies under the null hypothesis (equal division)
Procedure
Carry out the paired comparison test and count the observed frequencies O for each sample
↓
Set the expected frequency E for each sample as the total number of responses divided equally between the two categories
↓
Compute the χ² value using the expression below (degrees of freedom = 1 for two categories)
↓
Compare the calculated χ² with the tabulated chi-square value for 1 degree of freedom and judge the significance
Calculation
χ² = Σ[(O − E)² / E]
Where,
- O = frequency observed
- E = frequency expected
- χ² has 1 degree of freedom for two categories
Worked example — preference for two jams
To determine which of two samples of jam (No. 1 or No. 2) is preferred, a paired comparison test was carried out. Jam No. 1 was preferred 17 times and No. 2 was preferred 7 times. The number expected according to the null hypothesis is 12 for each.
χ² = (17 − 12)²/12 + (7 − 12)²/12 = 25/12 + 25/12 = 4.17
With one degree of freedom, a χ² of 4.17 is to be expected only about 2.5% of the time (as printed); hence the result is significant at that level and jam No. 1 is genuinely preferred.
Note: the book’s “about 2.5% of the time” recomputes to about 4.1% (two-sided p = 0.041 for χ² = 4.17 at df = 1); the result is still significant at the 5% level, since χ² = 4.17 exceeds the 5% critical value of 3.84.
Precautions
- The null hypothesis presupposes no real difference between the samples, so the expected frequencies are equal in the two categories.
- The test applies to the frequencies of responses, not to the means of measurements.
References
Ranganna, S., Handbook of Analysis and Quality Control for Fruit and Vegetable Products, 2nd edition.