3.8.9Additional lessons
Chi-Squared Test: Skills — IB Biology HL Revision Notes & Topical Questions
5 min read 5 parts Lesson 18 of 101
Section 1 of 5Purpose of the Test

The test shows whether a difference between observed and expected results is likely to be due to chance.
Categorical data
- The chi-squared test compares observed frequencies in categories with the frequencies expected if the null hypothesis were true.
Null hypothesis
- For two species, the null hypothesis states that there is no association between their distributions.
Contingency table
- Quadrat counts are placed in a table showing presence or absence of each species.
Frequencies only
- The test must be applied to counts, not percentages or means, and each expected value should ideally be at least five.
Section 2 of 5Carrying Out the Test
1
State the null hypothesis, for example that species A and B are distributed independently of each other.
2
Record the observed frequencies in a table and find the row and column totals.
3
Calculate each expected frequency as row total multiplied by column total, divided by the grand total.
4
Calculate χ² by adding (O − E)² ÷ E for every cell.
5
Find degrees of freedom as (rows − 1) × (columns − 1), then compare with the critical value at p = 0.05.
Section 3 of 5Interpreting the Result
Interpreting the Result
Critical value
- For one degree of freedom at p = 0.05 the critical value is 3.84.
Calculated is greater
- If χ² is larger than the critical value, reject the null hypothesis and conclude there is a significant association.
Calculated is smaller
- If χ² is below the critical value, do not reject the null hypothesis, as the difference could be due to chance.
Correlation not cause
- Association does not prove that one species affects the other, since a shared habitat factor could explain it.
| Degrees of freedom | Critical value (p = 0.05) |
|---|---|
| 1 | 3.84 |
| 2 | 5.99 |
| 3 | 7.81 |
Section 4 of 5Worked Example
Question
- In 50 quadrats, both species A and B were present in 20, A only in 8, B only in 12, and neither in 10.
- Test for association at p = 0.05.
- Row totals
- A present 28, A absent 22.
- Column totals: B present 32, B absent 18.
- Grand total 50.
- Expected values
- both present 28 × 32 ÷ 50 = 17.92;
- A only 28 × 18 ÷ 50 = 10.08;
- B only 22 × 32 ÷ 50 = 14.08;
- neither 22 × 18 ÷ 50 = 7.92.
- both present 28 × 32 ÷ 50 = 17.92;
- χ² = (20 − 17.92)² ÷ 17.92 + (8 − 10.08)² ÷ 10.08 + (12 − 14.08)² ÷ 14.08 + (10 − 7.92)² ÷ 7.92 = 0.24 + 0.43 + 0.31 + 0.55 = 1.52.
- Degrees of freedom = (2 − 1) × (2 − 1) = 1, so the critical value at p = 0.05 is 3.84.
Answer 1.52 is smaller than 3.84, so the null hypothesis is not rejected: there is no significant association between the two species.
Section 5 of 5Exam Checklist & Tips
3.8.9 – Key Points for the Exam
- Chi-squared test A statistical test comparing observed and expected frequencies.
- Null hypothesis The statement that there is no difference or association.
- Degrees of freedom The number of independent categories, here (rows − 1)(columns − 1).
- Expected frequency The count predicted if the null hypothesis is true.
- Critical value The threshold that χ² must exceed to be significant.
Common Mistakes
- Using percentages instead of actual counts in the test.
- Forgetting to compare with the critical value for the correct degrees of freedom.
- Stating that a non-significant result proves that no association exists.
- Calculating (O − E) ÷ E without squaring the difference.
Last updated:
\n