7.1.5

# Chi-Squared Test

Test yourself

## Overview of Chi-Squared

The chi-squared test is used in genetics to compare the goodness of fit of observed data with expected data. It tests if the difference between observed and expected values is due to chance.

### Inheritance

• Genetic diagrams are used to predict the expected phenotypic ratio of offspring.
• Predictions are rarely 100% accurate because of the random nature of gametes fusing during fertilisation.
• Chi-squared is used to compare observed phenotypic ratios with expected ratios.
• Chi-squared tells us if the difference between the observed and expected ratios are due to chance.

### Requirements

• The Chi-squared test is used when:
• Variation is discrete not continuous. This means the data are in categories (e.g. Aa and aa).
• Data show absolute numbers (whole numbers), normally frequencies.

### Null hypothesis

• Before using chi-squared, a null hypothesis is stated.
• The null hypothesis is:
• 'There is no significant difference between observed and expected data, the difference is due to chance'.
• The chi-squared test is used to reject or accept the null hypothesis.

### Equation

• The equation for chi-squared is:
• $\chi = \Sigma \; \frac{(O - E)^2}{E}$
• O = observed values.
• E = expected values.

## Chi-Squared Test

The steps involved in applying the chi-squared test are:

### Equation

• The equation for chi-squared is:
• $\chi = \Sigma \; \frac{(O - E)^2}{E}$
• O = observed values.
• E = expected values.

### 1) Calculate expected values

• To use the chi-squared equation, the expected values need to be calculated.
• Expected values are predicted using genetic diagrams.
• The expected values are the phenotypic ratios given by the genetic diagram.
• Compare the expected values with observed values and use these numbers in the equation.

### 2) Calculate chi-squared

• Using the chi-squared equation, calculate the chi-squared value.

### 3) Find the critical value

• Calculate the degrees of freedom.
• Degrees of freedom = the number of categories (e.g. phenotypes) − 1.
• Find the critical value that corresponds to the degrees of freedom in a probability distribution table at 0.05 significance level.

### 4) Accept the null hypothesis?

• Compare the chi-squared value to the critical value.
• If the chi-squared value is lower than the critical value - accept the null hypothesis.
• The difference between observed and expected data is due to chance.

### Reject the null hypothesis?

• If the chi-squared value is greater than the critical value - reject the null hypothesis.
• The difference between observed and expected data is NOT due to chance.
• This means we would get this chi-squared value in less than 5% of cases, which is very unlikely.