Chi-squared Test (AQA A-Level Biology): Revision Notes
Chi-squared Test
What is the chi-squared test?
The chi-squared (χ²) test is a statistical method used to test the null hypothesis. The null hypothesis assumes that any observed differences between sets of data are purely due to chance, with no statistically significant deviation from expected results.
For example, when tossing a coin 100 times, you would expect 50 heads and 50 tails. If you actually get 55 heads and 45 tails, the chi-squared test helps determine whether this deviation occurred by chance or indicates a bias in the coin.
The chi-squared test evaluates whether any deviation between observed and expected numbers in an investigation is statistically significant. This simple test can only be used when specific criteria are met:
- Sample size must be relatively large (over 20)
- Data must fall into discrete categories
- Only raw counts can be used (not percentages or rates)
- Used to compare experimental results with theoretical ones (such as genetic crosses with expected Mendelian ratios)
Critical Requirements for Chi-squared Test: The test is only valid when all criteria above are met. Using percentages or small sample sizes will give unreliable results.
Chi-squared formula and calculation
The chi-squared formula is:
Where:
- = observed numbers
- = expected numbers
- = sum of all categories
The process involves squaring the difference between observed and expected values to remove negative numbers, then dividing by the expected value to standardise the result.
Degrees of freedom
Before using chi-squared tables, you must calculate the degrees of freedom. This equals the number of classes (categories) minus one. For example, if results can be classified as heads or tails (2 classes), there is 1 degree of freedom.
Worked Example: Coin Toss Analysis
Using a coin toss example where 100 tosses yielded 55 heads and 45 tails:
| Class | Observed (O) | Expected (E) | O - E | (O - E)² | (O - E)²/E |
|---|---|---|---|---|---|
| Heads | 55 | 50 | +5 | 25 | 0.5 |
| Tails | 45 | 50 | -5 | 25 | 0.5 |
| Σ = 1.0 |
Therefore,
Using the chi-squared table
To determine if your calculated value is significant, compare it with critical values in a chi-squared distribution table using the appropriate degrees of freedom.
The table shows probability values that indicate the likelihood that any deviation is due to chance alone. The critical value used is p = 0.05, representing a 5% probability threshold accepted by statisticians.
The p = 0.05 Critical Threshold: This 5% probability threshold is the standard accepted by the scientific community. It means we accept a 5% chance of being wrong when rejecting the null hypothesis.
Interpreting results
For 1 degree of freedom (2 classes), a value of 1.0 falls between the table values of 0.45 and 1.32. This corresponds to probabilities between 50% and 25%, meaning there is a 25-50% chance the deviation occurred by chance.
Since this probability is greater than 0.05 (5%), the deviation is not significant and we accept the null hypothesis. The observed difference can be attributed to chance.
If the probability were less than 0.05 (5%), the deviation would be significant, the null hypothesis would be rejected, and we would conclude that some factor other than chance is affecting the results.
Chi-squared test in genetics
The chi-squared test proves particularly valuable in genetics for analysing whether observed ratios in genetic crosses match expected Mendelian ratios.
Genetic cross example
Consider a dihybrid cross between F₁ plants producing round, yellow seeds (known to be heterozygous). The expected F₂ ratio should be:
- 9 round, yellow seeds : 3 wrinkled, yellow seeds : 3 round, green seeds : 1 wrinkled, green seeds
This represents the classic 9:3:3:1 ratio expected from a dihybrid cross.
Worked Example: Genetic Cross Analysis
If 320 plants were obtained in the ratio 186:48:72:14, we can test whether this deviates significantly from the expected 9:3:3:1 ratio.
Step 1: Calculate expected numbers for each class
- Total plants = 320
- Round, yellow: (9/16) × 320 = 180
- Round, green: (3/16) × 320 = 60
- Wrinkled, yellow: (3/16) × 320 = 60
- Wrinkled, green: (1/16) × 320 = 20
Step 2: Apply chi-squared formula
| Class | Observed (O) | Expected (E) | O - E | (O - E)² | (O - E)²/E |
|---|---|---|---|---|---|
| Round, yellow | 186 | 180 | +6 | 36 | 0.2 |
| Round, green | 48 | 60 | -12 | 144 | 2.4 |
| Wrinkled, yellow | 72 | 60 | +12 | 144 | 2.4 |
| Wrinkled, green | 14 | 20 | -6 | 36 | 1.8 |
| Σ = 6.8 |
Step 3: Interpret results With 4 classes, there are 3 degrees of freedom. Using the chi-squared table, a value of 6.8 falls between 6.25 and 7.82, corresponding to probabilities between 10% and 5%.
Since the probability is greater than 0.05, we accept the null hypothesis and conclude that the results do not differ significantly from the expected 9:3:3:1 ratio. The observed deviation can be attributed to random chance.
Key Points to Remember:
- The chi-squared test determines whether observed data deviates significantly from expected results
- Use the formula with degrees of freedom = classes - 1
- Critical value is p = 0.05 - if probability > 0.05, accept null hypothesis (deviation due to chance)
- If probability < 0.05, reject null hypothesis (significant deviation indicates other factors involved)
- Particularly useful in genetics for testing whether crosses follow expected Mendelian ratios