Skip to main content
Examonaut

Topic 8A · Lesson 5 of 6

Testing ratios with chi-squared

The chi-squared test

Real results never match a predicted ratio exactly, because which gametes fuse is a matter of chance. The chi-squared test tells you whether the difference between what you observed and what you expected is small enough to be due to chance, or so big that something else must be going on (for example linkage, or a wrong hypothesis).

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

where OO is the observed number in a class, EE is the expected number in that class, and ∑\sum means "add up for all the classes". There are no units.

How to do it:

  1. Step 1: State the null hypothesis: there is no significant difference between the observed and expected results (any difference is due to chance). For a cross, this usually means "the results fit the expected ratio".
  2. Step 2: Calculate the expected numbers EE: total number of offspring × the fraction expected in each class.
  3. Step 3: For each class, work out (O−E)2÷E(O - E)^2 \div E, then add them up to get χ2\chi^2.
  4. Step 4: Degrees of freedom = number of classes − 1.
  5. Step 5: Look up the critical value at a probability of 0.05 (5%) for those degrees of freedom. Common values: 3.84 (1 degree of freedom), 5.99 (2), 7.82 (3).
  6. Step 6: If χ2\chi^2 is less than the critical value, accept the null hypothesis: the difference is not significant and is probably due to chance. If χ2\chi^2 is greater than the critical value, reject it: there is a significant difference, so something other than chance is affecting the results.

Worked example

A chi-squared test on a dihybrid cross

A cross between two RrYy plants gave 160 offspring: 97 round yellow, 26 round green, 28 wrinkled yellow and 9 wrinkled green. Do these results fit a 9:3:3:1 ratio?

Show solution
  1. Null hypothesis: there is no significant difference between the observed numbers and those expected from a 9:3:3:1 ratio.
  2. Expected numbers: the ratio has 9+3+3+1=169 + 3 + 3 + 1 = 16 parts, so one part is 160÷16=10160 \div 16 = 10. EE = 90, 30, 30 and 10.
  3. Round yellow: (97−90)2÷90=49÷90=0.544(97 - 90)^2 \div 90 = 49 \div 90 = 0.544.
  4. Round green: (26−30)2÷30=16÷30=0.533(26 - 30)^2 \div 30 = 16 \div 30 = 0.533.
  5. Wrinkled yellow: (28−30)2÷30=4÷30=0.133(28 - 30)^2 \div 30 = 4 \div 30 = 0.133.
  6. Wrinkled green: (9−10)2÷10=1÷10=0.100(9 - 10)^2 \div 10 = 1 \div 10 = 0.100.
  7. χ2=0.544+0.533+0.133+0.100=1.31\chi^2 = 0.544 + 0.533 + 0.133 + 0.100 = 1.31.
  8. Degrees of freedom =4−1=3= 4 - 1 = 3; critical value at p=0.05p = 0.05 is 7.82.
  9. 1.31<7.821.31 < 7.82, so we accept the null hypothesis: the results fit a 9:3:3:1 ratio, and the differences are probably due to chance. This supports the idea that the two genes are on different chromosomes and assort independently.

Worked example

Chi-squared shows linkagetop grade

Apply the chi-squared test to the fruit fly test cross above (42, 40, 9, 9), with a null hypothesis of a 1:1:1:1 ratio.

Show solution
  1. Expected: 100÷4=25100 \div 4 = 25 in each class.
  2. χ2=(42−25)225+(40−25)225+(9−25)225+(9−25)225=289+225+256+25625=41.0\chi^2 = \frac{(42-25)^2}{25} + \frac{(40-25)^2}{25} + \frac{(9-25)^2}{25} + \frac{(9-25)^2}{25} = \frac{289 + 225 + 256 + 256}{25} = 41.0.
  3. Degrees of freedom = 3; critical value 7.82.
  4. 41.0>7.8241.0 > 7.82, so reject the null hypothesis. The difference is significant: the probability that it is due to chance is less than 5%. The genes do not assort independently, which supports the conclusion that they are linked.
05104045χ²critical value 7.823 degrees of freedom, p = 0.051.31 (dihybrid cross)41.0 (fruit flies)accept null hypothesisdifference due to chancereject null hypothesissignificant difference

Practise this topic

Both are part of Premium.