Chi-squared test

Chi-squared test

Spec 3.7.1 · AQA A-Level Biology: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • The chi-squared test checks whether observed counts fit an expected ratio, or differ by chance.
  • Use whole-number counts of categories, never percentages. χ2=∑(O−E)2E\chi^2 = \sum \dfrac{(O-E)^2}{E}.
  • Degrees of freedom = number of classes − 1.
  • If χ2\chi^2 is less than the critical value at p = 0.05, the difference is not significant: accept the null hypothesis.
  • If it is greater, the difference is significant: reject the null hypothesis.

Why use the chi-squared test

Observed numbers rarely match expected ratios exactly, so χ² tests whether the differences are significant or due to chance.

In genetic crosses, observed numbers rarely match expected ratios exactly, because fertilisation is random.

The chi-squared (χ²) test compares the goodness of fit of observed phenotypic ratios with expected ratios. It tells you whether differences are significant or due to chance.

Use it for categorical data as whole-number counts (not percentages), with a large enough sample.

050100150200250300RoundWrinkledPhenotypeNumber of seeds
  • Observed
  • Expected
The cross from the worked example: 295 round and 105 wrinkled seeds observed against 300 and 100 expected (3 : 1).
  • Chi-squared testdo observed counts fit the expected ratio?

Which data can be used in a chi-squared test?

Null hypothesis and the formula

State a null hypothesis of no significant difference, then work out the expected numbers and sum (O − E)² ÷ E over all classes.

State a null hypothesis: there is no significant difference between observed and expected numbers (any difference is due to chance).

χ2=∑(O−E)2E\chi^2 = \sum \frac{(O - E)^2}{E}

OO is the observed number and EE the expected number in each class. Work out EE by dividing the total by the ratio parts.

  1. 1

    State the null hypothesis

    no significant difference between observed and expected

  2. 2

    Work out E for each class

    total divided by the ratio parts

  3. 3

    Calculate (O − E)² ÷ E

    for every class

  4. 4

    Add them to get χ²

    e.g. 0.083 + 0.25 = 0.33

Calculating χ² step by step.
  • Chi-squaredχ2=∑(O−E)2E\chi^2 = \sum \dfrac{(O - E)^2}{E}

Worked example

A cross gives 295 round and 105 wrinkled seeds. A 3 : 1 ratio expects 300 and 100. Calculate χ².

In the formula, what does E stand for?

Degrees of freedom and critical values

Degrees of freedom are the number of classes minus 1. Compare χ² with the critical value at p = 0.05.

The degrees of freedom equal the number of classes − 1: 1 for a monohybrid cross with two phenotypes, 3 for a dihybrid cross with four.

Compare your calculated χ² with the critical value at p = 0.05, a 5% probability that the difference is due to chance.

Common critical values at 5%: 1 df = 3.84, 2 df = 5.99, 3 df = 7.82.

024681 df2 df3 dfDegrees of freedomCritical value
Critical values of χ² at p = 0.05

A dihybrid cross has four phenotype classes. How many degrees of freedom?

Drawing conclusions

If χ² is below the critical value, the difference is not significant; if it is above, the difference is significant and the expected ratio is wrong.

If χ² is less than the critical value, the difference is not significant (p > 0.05). Accept the null hypothesis: any difference is due to chance and the data fit the expected ratio.

If χ² is greater than the critical value, the difference is significant (p < 0.05). Reject the null hypothesis: the difference is unlikely to be due to chance.

Example: 40.4 > 7.82 shows genes are not assorting independently, suggesting linkage. The test shows whether a difference is significant; it does not explain why.

24681012141618200.050.10.150.20.250.3xycritical value 7.82χ² distribution, 3 df
Chi-squared distribution with 3 degrees of freedom: the shaded tail beyond the critical value 7.82 is the 5% where the difference is significant.

χ² less than critical value

Significance:
Not significant (p > 0.05)
Null hypothesis:
Accept: difference due to chance

χ² greater than critical value

Significance:
Significant (p < 0.05)
Null hypothesis:
Reject: expected ratio not correct

χ² = 0.33 with 1 degree of freedom (critical value 3.84). What is the conclusion?

Using the test in genetics

Use χ² to test ratios such as 3 : 1, 1 : 2 : 1, 9 : 3 : 3 : 1, 1 : 1 : 1 : 1 or epistatic ratios, with expected numbers of at least 5.

A result that fits 9 : 3 : 3 : 1 supports independent assortment. A significant result for a test cross suggests the genes may be linked, or that other factors such as selection are involved.

Larger samples give more reliable results. If expected numbers are very small (below 5), the test is not reliable.

  1. 1

    Choose the expected ratio

    e.g. 3 : 1, 9 : 3 : 3 : 1, 1 : 1 : 1 : 1

  2. 2

    Check expected numbers

    each at least 5

  3. 3

    Calculate χ² and compare with the critical value

    at p = 0.05

  4. 4

    Conclude

    fits: supports independent assortment; does not fit: genes may be linked or selection involved

Using χ² in a genetics cross.

Fits expected ratio

Result:
Not significant
Suggests:
Supports independent assortment

Does not fit

Result:
Significant
Suggests:
Genes may be linked, or selection involved

A test cross is expected to give 1 : 1 : 1 : 1 but the χ² result is significant. What may this suggest?

Try an exam question

A student crossed two heterozygous plants and expected a 3 : 1 ratio. Of 160 offspring, 126 were dominant and 34 recessive. Calculate χ² and state the conclusion. Critical value at 5% for 1 degree of freedom = 3.84.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

How many round seeds does she expect among the 400 seeds?

1 mark, marked against the mark scheme

Revision notes