The chi-squared (χ2) test is a statistical test used to decide whether the difference between observed (O) and expected (E) results is significant, or small enough to be due to chance. It is used with categorical data (counts in categories), such as numbers of offspring with each phenotype.Start with a null hypothesis: there is no significant difference between the observed and expected results, and any difference is due to chance.Then calculate:χ2 = Σ (O − E)2 / E Steps:
1. Work out the expected numbers from the total and the expected ratio.
2. For each category find (O − E), square it, and divide by E.
3. Add these values to get χ2.
4. Work out the degrees of freedom = number of categories − 1.
5. Look up the critical value in a χ2 table at the 0.05 (5%) probability level.Interpreting the result:• If χ2 is less than the critical value, the probability that the difference is due to chance is greater than 0.05. Accept the null hypothesis: the difference is not significant.
• If χ2 is greater than or equal to the critical value, the difference is significant. Reject the null hypothesis: something other than chance, such as linkage, is affecting the results.Useful critical values at p = 0.05: 3.84 for 1 degree of freedom, 5.99 for 2, and 7.82 for 3.The test must use raw counts, not percentages, and works best with large samples.
1. Work out the expected numbers from the total and the expected ratio.
2. For each category find (O − E), square it, and divide by E.
3. Add these values to get χ2.
4. Work out the degrees of freedom = number of categories − 1.
5. Look up the critical value in a χ2 table at the 0.05 (5%) probability level.Interpreting the result:• If χ2 is less than the critical value, the probability that the difference is due to chance is greater than 0.05. Accept the null hypothesis: the difference is not significant.
• If χ2 is greater than or equal to the critical value, the difference is significant. Reject the null hypothesis: something other than chance, such as linkage, is affecting the results.Useful critical values at p = 0.05: 3.84 for 1 degree of freedom, 5.99 for 2, and 7.82 for 3.The test must use raw counts, not percentages, and works best with large samples.